Fusion API User's Manual

Basic Concepts of Fusion's API

Creating Scripts and Add-Ins

Python Specific Issues

Python Add-in Template

C++ Specific Issues

Document and Assembly Structure

Fusion Solids and Surfaces

Custom Features

Units in Fusion

Events

Document Properties and the MFGDM API

Attributes

Custom Graphics

Canvases

Configurations

Volumetric Modeling

Using the Arrange Feature

+ User Interface Related Topics

User-Interface Customization

Commands

Command Inputs

Palettes and Browser Command Inputs

Opening Files from a Web Page

Working in a Seperate Thread

+ Manufacturing API (CAM)

Introduction to the CAM API

CAM Parameters

CAM Libraries

Feature Recognition

Machine/Avoid Functionality

Selection Filters

© Copyright Autodesk, Inc. Comment on this page.


Fusion 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 content is only accessible through the table of contents. On a computer, the table of contents is typically visible to the left of the content you are reading now. If the browser size is narrow or you're reading this on a smaller device, the table of contents might be collapsed. Look for the table of contents icon, as shown below on the left. Clicking this will open the table of contents as shown in the center below and clicking the "+" beside "Fusion API Reference Manual" will expand the tree to give you access to the full content of the reference manual, as shown below on the right.

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.

Searching the API Documentation

The Fusion help system has built-in support for searching. There is a search field near the top of the page, as shown below. Using this help supports filters to restrict the results but still often ends up with a large list of results that can be difficult to refine and pick the most appropriate topic. Better search results can usually be achieved by using a Google search. The entire help system is indexed by Google.

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


AccessibilityAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AccessibilityAnalyses.h>

Description

Provides access to any accessibility analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified AccessibilityAnalysis object using an index into the collection.
itemByName | A method that returns the specified AccessibilityAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of AccessibilityAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.accessibilityAnalyses

Version

Introduced in version January 2023


AccessibilityAnalyses.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Fusion/AccessibilityAnalyses.h>

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

Return Value

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

Version

Introduced in version January 2023


AccessibilityAnalyses.count Property

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

Description

Returns the number of AccessibilityAnalysis objects in the collection.

Syntax

  • Python
  • C++
"accessibilityAnalyses_var" is a variable referencing an AccessibilityAnalyses object.

# Get the value of the property.
propertyValue = accessibilityAnalyses_var.count
"accessibilityAnalyses_var" is a variable referencing an AccessibilityAnalyses object.
#include <Fusion/Fusion/AccessibilityAnalyses.h>

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalyses.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"accessibilityAnalyses_var" is a variable referencing an AccessibilityAnalyses object.

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

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalyses.item Method

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

Description

A method that returns the specified AccessibilityAnalysis object using an index into the collection.

Syntax

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

#include <Fusion/Fusion/AccessibilityAnalyses.h>

returnValue = accessibilityAnalyses_var->item(index);

Return Value

Type | Description
AccessibilityAnalysis | 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 2023


AccessibilityAnalyses.itemByName Method

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

Description

A method that returns the specified AccessibilityAnalysis object using the name of the analysis as displayed in the browser.

Syntax

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

#include <Fusion/Fusion/AccessibilityAnalyses.h>

returnValue = accessibilityAnalyses_var->itemByName(name);

Return Value

Type | Description
AccessibilityAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the AccessibilityAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


AccessibilityAnalyses.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"accessibilityAnalyses_var" is a variable referencing an AccessibilityAnalyses object.

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

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AccessibilityAnalysis.h>

Description

Represents any existing Accessibility Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AccessibilityAnalyses.item, AccessibilityAnalyses.itemByName

Version

Introduced in version January 2023


AccessibilityAnalysis.attributes Property

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

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

# Get the value of the property.
propertyValue = accessibilityAnalysis_var.attributes
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.
#include <Fusion/Fusion/AccessibilityAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = accessibilityAnalysis_var->attributes();

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Fusion/AccessibilityAnalysis.h>

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

Return Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.deleteMe Method

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

Description

A method that deletes this Analysis.

Syntax

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

#include <Fusion/Fusion/AccessibilityAnalysis.h>

returnValue = accessibilityAnalysis_var->deleteMe();

Return Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.entityToken Property

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

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

# Get the value of the property.
propertyValue = accessibilityAnalysis_var.entityToken
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.
#include <Fusion/Fusion/AccessibilityAnalysis.h>

// Get the value of the property.
string propertyValue = accessibilityAnalysis_var->entityToken();

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.isLightBulbOn Property

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

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

# Get the value of the property.
propertyValue = accessibilityAnalysis_var.isLightBulbOn

# Set the value of the property.
accessibilityAnalysis_var.isLightBulbOn = propertyValue
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.
#include <Fusion/Fusion/AccessibilityAnalysis.h>

// Get the value of the property.
boolean propertyValue = accessibilityAnalysis_var->isLightBulbOn();

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

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

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.isVisible Property

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

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

# Get the value of the property.
propertyValue = accessibilityAnalysis_var.isVisible
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.
#include <Fusion/Fusion/AccessibilityAnalysis.h>

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.name Property

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

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

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

# Set the value of the property.
accessibilityAnalysis_var.name = propertyValue
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.
#include <Fusion/Fusion/AccessibilityAnalysis.h>

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

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

Property Value

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

Version

Introduced in version January 2023


AccessibilityAnalysis.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"accessibilityAnalysis_var" is a variable referencing an AccessibilityAnalysis object.

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

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

Property Value

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

Version

Introduced in version January 2023


ActiveSelectionEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

This event fires whenever the contents of the active selection changes. This occurs as the user selects or unselects entities while using the Fusion Select command. The Select command is the default command that is always running if no other command is active. Pressing Escape terminates the currently active command and starts the Select command. If the Select command is running and you press Escape, it terminates the current Select command and starts a new one.

This event is only associated with the selection associated with the Select command and does not fire when any other command is running. The event fires when there is any change to the active selection, including when the selection is cleared when the Select command is terminated. It is also fired when the user clicks in an open area of the canvas to clear the current selection.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.activeSelectionChanged

Version

Introduced in version August 2020


ActiveSelectionEvent.add Method

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

Add a handler to be notified when the event occurs.

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.
returnValue = activeSelectionEvent_var.add(handler)
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

#include <Core/UserInterface/ActiveSelectionEvent.h>

returnValue = activeSelectionEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | ActiveSelectionEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version August 2020


ActiveSelectionEvent.classType Method

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

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

Syntax

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

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

#include <Core/UserInterface/ActiveSelectionEvent.h>

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

Return Value

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

Version

Introduced in version August 2020


ActiveSelectionEvent.isValid Property

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

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

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

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

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEvent.name Property

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

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

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEvent.objectType Property

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

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

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEvent.remove Method

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.
returnValue = activeSelectionEvent_var.remove(handler)
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

#include <Core/UserInterface/ActiveSelectionEvent.h>

returnValue = activeSelectionEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | ActiveSelectionEventHandler | The handler object to be removed from the event.

Version

Introduced in version August 2020


ActiveSelectionEvent.sender Property

Parent Object: ActiveSelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.

# Get the value of the property.
propertyValue = activeSelectionEvent_var.sender
"activeSelectionEvent_var" is a variable referencing an ActiveSelectionEvent object.
#include <Core/UserInterface/ActiveSelectionEvent.h>

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

The ActiveSelectionEventArgs provides information associated with the active selection changing. The event fires whenever the contents of the active selection changes. This occurs as the user selects or unselects entities while using the Fusion Select command. The Select command is the default command that is always running if no other command is active. Pressing Escape terminates the currently active command and starts the Select command. If the Select command is running and you press Escape, it terminates the current Select command and starts a new one.

An array or list of all the currently selected entities is returned. This is the same set of entities accessed through the UserInterface.activeSelection object. An empty array can be returned in the case where the selection has been cleared which can occur by the user unselecting and entity, terminating the select command pressing Escape or running another command or clicking the mouse in an open area of the canvas.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
currentSelection | The list of all of the current selections. This is the same set of selections accessed through the UserInterface.activeSelection object. An empty array can be returned in the case where the selection has been cleared which can occur by the user unselecting and entity, terminating the select command pressing Escape or running another command or clicking the mouse in an open area of the canvas.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2020


ActiveSelectionEventArgs.classType Method

Parent Object: ActiveSelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

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

Syntax

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

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

#include <Core/UserInterface/ActiveSelectionEventArgs.h>

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

Return Value

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

Version

Introduced in version August 2020


ActiveSelectionEventArgs.currentSelection Property

Parent Object: ActiveSelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

The list of all of the current selections. This is the same set of selections accessed through the UserInterface.activeSelection object. An empty array can be returned in the case where the selection has been cleared which can occur by the user unselecting and entity, terminating the select command pressing Escape or running another command or clicking the mouse in an open area of the canvas.

Syntax

  • Python
  • C++
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.

# Get the value of the property.
propertyValue = activeSelectionEventArgs_var.currentSelection
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.
#include <Core/UserInterface/ActiveSelectionEventArgs.h>

// Get the value of the property.
std::vector<Ptr<Selection>> propertyValue = activeSelectionEventArgs_var->currentSelection();

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEventArgs.firingEvent Property

Parent Object: ActiveSelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.

# Get the value of the property.
propertyValue = activeSelectionEventArgs_var.firingEvent
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.
#include <Core/UserInterface/ActiveSelectionEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = activeSelectionEventArgs_var->firingEvent();

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEventArgs.isValid Property

Parent Object: ActiveSelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

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

Syntax

  • Python
  • C++
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.

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

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEventArgs.objectType Property

Parent Object: ActiveSelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"activeSelectionEventArgs_var" is a variable referencing an ActiveSelectionEventArgs object.

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

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

Property Value

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

Version

Introduced in version August 2020


ActiveSelectionEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventHandler.h>

Description

The ActiveSelectionEventHandler is a client implemented class that can be added as a handler to a ActiveSelectionEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version August 2020


ActiveSelectionEventHandler.notify Method

Parent Object: ActiveSelectionEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ActiveSelectionEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"activeSelectionEventHandler_var" is a variable referencing an ActiveSelectionEventHandler object.
returnValue = activeSelectionEventHandler_var.notify(eventArgs)
"activeSelectionEventHandler_var" is a variable referencing an ActiveSelectionEventHandler object.

#include <Core/UserInterface/ActiveSelectionEventHandler.h>

returnValue = activeSelectionEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | ActiveSelectionEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version August 2020


AdditiveFFFLimitsMachineElement Object

Derived from: MachineElement Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Machine element representing limits for fused filament fabrication (FFF) machine motion and temperatures.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
staticTypeId | Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Properties

Name | Description
elementId | Identifier for this element. Unique within an element type.
homePosition | Position of the machine home location.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumBedTemperature | Maximum bed temperature in degrees C.
maximumXYAcceleration | Maximum supported acceleration for motion in the X or Y axes in cm/s^2.
maximumXYSpeed | Maximum supported speed for motion in the X or Y axes in cm/s.
maximumZAcceleration | Maximum supported acceleration for motion in the Z axis in cm/s^2.
maximumZSpeed | Maximum supported speed for motion in the Z axis in cm/s.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parkPosition | Position machine moves to when "parked".
typeId | Identifier for this type of machine element.

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.classType Method

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

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

Syntax

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

returnValue = adsk.cam.AdditiveFFFLimitsMachineElement.classType()
This is a static method.

#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

returnValue = adsk::cam::AdditiveFFFLimitsMachineElement::classType();

Return Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.elementId Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.elementId
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

// Get the value of the property.
string propertyValue = additiveFFFLimitsMachineElement_var->elementId();

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.homePosition Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Position of the machine home location.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.homePosition

# Set the value of the property.
additiveFFFLimitsMachineElement_var.homePosition = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.isValid Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

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

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.isValid
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.maximumBedTemperature Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Maximum bed temperature in degrees C.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.maximumBedTemperature

# Set the value of the property.
additiveFFFLimitsMachineElement_var.maximumBedTemperature = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.maximumXYAcceleration Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Maximum supported acceleration for motion in the X or Y axes in cm/s^2.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.maximumXYAcceleration

# Set the value of the property.
additiveFFFLimitsMachineElement_var.maximumXYAcceleration = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.maximumXYSpeed Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Maximum supported speed for motion in the X or Y axes in cm/s.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.maximumXYSpeed

# Set the value of the property.
additiveFFFLimitsMachineElement_var.maximumXYSpeed = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.maximumZAcceleration Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Maximum supported acceleration for motion in the Z axis in cm/s^2.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.maximumZAcceleration

# Set the value of the property.
additiveFFFLimitsMachineElement_var.maximumZAcceleration = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.maximumZSpeed Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Maximum supported speed for motion in the Z axis in cm/s.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.maximumZSpeed

# Set the value of the property.
additiveFFFLimitsMachineElement_var.maximumZSpeed = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.objectType Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.objectType
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.parkPosition Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Position machine moves to when "parked".

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.parkPosition

# Set the value of the property.
additiveFFFLimitsMachineElement_var.parkPosition = propertyValue
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.staticTypeId Method

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Syntax

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

returnValue = adsk.cam.AdditiveFFFLimitsMachineElement.staticTypeId()
This is a static method.

#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

returnValue = adsk::cam::AdditiveFFFLimitsMachineElement::staticTypeId();

Return Value

Type | Description
string | Returns identifier of this type.

Version

Introduced in version July 2023


AdditiveFFFLimitsMachineElement.typeId Property

Parent Object: AdditiveFFFLimitsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.

# Get the value of the property.
propertyValue = additiveFFFLimitsMachineElement_var.typeId
"additiveFFFLimitsMachineElement_var" is a variable referencing an AdditiveFFFLimitsMachineElement object.
#include <Cam/Machine/AdditiveFFFLimitsMachineElement.h>

// Get the value of the property.
string propertyValue = additiveFFFLimitsMachineElement_var->typeId();

Property Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement Object

Derived from: MachineElement Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Machine element representing the additive platform settings.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
staticTypeId | Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Properties

Name | Description
ceilingClearance | Clearance height used for automatically arranging parts which is the distance from the top of the build platform. Units are cm.
clearance | Clearance height used for automatically arranging parts and suggested height for positioning part on the build platform. Units are cm.
elementId | Identifier for this element. Unique within an element type.
frameWidth | Clearance width used for automatically arranging parts which is the distance from the edges of the build platform. Units are cm.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
origin | Origin point specifying the platform coordinates that correspond to the origin of the platform mesh. Units are cm.
size | Usable platform size. Units are cm.
typeId | Identifier for this type of machine element.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version July 2023


AdditivePlatformMachineElement.ceilingClearance Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Clearance height used for automatically arranging parts which is the distance from the top of the build platform. Units are cm.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.ceilingClearance

# Set the value of the property.
additivePlatformMachineElement_var.ceilingClearance = propertyValue
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

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

Property Value

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

Version

Introduced in version May 2025


AdditivePlatformMachineElement.classType Method

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

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

Syntax

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

returnValue = adsk.cam.AdditivePlatformMachineElement.classType()
This is a static method.

#include <Cam/Machine/AdditivePlatformMachineElement.h>

returnValue = adsk::cam::AdditivePlatformMachineElement::classType();

Return Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement.clearance Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Clearance height used for automatically arranging parts and suggested height for positioning part on the build platform. Units are cm.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.clearance

# Set the value of the property.
additivePlatformMachineElement_var.clearance = propertyValue
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

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

Property Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement.elementId Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.elementId
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

// Get the value of the property.
string propertyValue = additivePlatformMachineElement_var->elementId();

Property Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement.frameWidth Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Clearance width used for automatically arranging parts which is the distance from the edges of the build platform. Units are cm.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.frameWidth

# Set the value of the property.
additivePlatformMachineElement_var.frameWidth = propertyValue
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

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

Property Value

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

Version

Introduced in version May 2025


AdditivePlatformMachineElement.isValid Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

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

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.isValid
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

Property Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement.objectType Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.objectType
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

Property Value

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

Version

Introduced in version July 2023


AdditivePlatformMachineElement.origin Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Origin point specifying the platform coordinates that correspond to the origin of the platform mesh. Units are cm.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.origin

# Set the value of the property.
additivePlatformMachineElement_var.origin = propertyValue
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

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

Property Value

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

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version July 2023


AdditivePlatformMachineElement.size Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Usable platform size. Units are cm.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.size

# Set the value of the property.
additivePlatformMachineElement_var.size = propertyValue
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

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

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

Property Value

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

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version July 2023


AdditivePlatformMachineElement.staticTypeId Method

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Syntax

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

returnValue = adsk.cam.AdditivePlatformMachineElement.staticTypeId()
This is a static method.

#include <Cam/Machine/AdditivePlatformMachineElement.h>

returnValue = adsk::cam::AdditivePlatformMachineElement::staticTypeId();

Return Value

Type | Description
string | Returns identifier of this type.

Version

Introduced in version July 2023


AdditivePlatformMachineElement.typeId Property

Parent Object: AdditivePlatformMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/AdditivePlatformMachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.

# Get the value of the property.
propertyValue = additivePlatformMachineElement_var.typeId
"additivePlatformMachineElement_var" is a variable referencing an AdditivePlatformMachineElement object.
#include <Cam/Machine/AdditivePlatformMachineElement.h>

// Get the value of the property.
string propertyValue = additivePlatformMachineElement_var->typeId();

Property Value

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

Version

Introduced in version July 2023


AdditiveSetupUtility Object

Derived from: ModifyUtility Object
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

AdditiveSetupUtility provides functionality for modifications of additive setups.

Methods

Name | Description
assignPartsToBodyPreset | Preview Assigns an array of parts to the body preset operation corresponding to the chosen PrintSettingItem in the PrintSetting. If a part has been previously assigned to a different preset (i.e. the default preset), it will be removed from its previous owner to ensure a body can only be mapped to one preset. If the previous owner preset ends up being empty, it will be removed from the setup.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
removeExcessParts | Preview Remove components from setups, that are outside of the buildroom.
splitSupport | Preview Splits support structure of given target bodies into separate mesh body.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version September 2023


AdditiveSetupUtility.assignPartsToBodyPreset Method

Parent Object: AdditiveSetupUtility

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

Assigns an array of parts to the body preset operation corresponding to the chosen PrintSettingItem in the PrintSetting. If a part has been previously assigned to a different preset (i.e. the default preset), it will be removed from its previous owner to ensure a body can only be mapped to one preset. If the previous owner preset ends up being empty, it will be removed from the setup.

Syntax

  • Python
  • C++
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.
returnValue = additiveSetupUtility_var.assignPartsToBodyPreset(parts, presetName)
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.

#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

returnValue = additiveSetupUtility_var->assignPartsToBodyPreset(parts, presetName);

Return Value

Type | Description
Operation | The preset corresponding to the preset name. Returns null if the preset has been removed from the setup due to passing an an empty or invalid array.

Parameters

Name | Type | Description
parts | Base[] | Parts to be assigned to a preset. The array may contain BRepBody, MeshBody or Occurrence objects. If occurrences are passed in, the preset will contain their resolved bodies or meshes. If the array is empty, the preset will be removed from the setup, but the PrintSettingItem will stay in the PrintSetting.
presetName | string | The name of the PrintSettingItem defined in the PrintSetting, which serves as the basis for the to be created operation.

Version

Introduced in version July 2024


AdditiveSetupUtility.classType Method

Parent Object: AdditiveSetupUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

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

Syntax

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

returnValue = adsk.cam.AdditiveSetupUtility.classType()
This is a static method.

#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

returnValue = adsk::cam::AdditiveSetupUtility::classType();

Return Value

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

Version

Introduced in version September 2023


AdditiveSetupUtility.isValid Property

Parent Object: AdditiveSetupUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

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

Syntax

  • Python
  • C++
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.

# Get the value of the property.
propertyValue = additiveSetupUtility_var.isValid
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.
#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

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

Property Value

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

Version

Introduced in version September 2023


AdditiveSetupUtility.objectType Property

Parent Object: AdditiveSetupUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.

# Get the value of the property.
propertyValue = additiveSetupUtility_var.objectType
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.
#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

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

Property Value

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

Version

Introduced in version September 2023


AdditiveSetupUtility.removeExcessParts Method

Parent Object: AdditiveSetupUtility

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

Remove components from setups, that are outside of the buildroom.

Syntax

  • Python
  • C++
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.
returnValue = additiveSetupUtility_var.removeExcessParts()
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.

#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

returnValue = additiveSetupUtility_var->removeExcessParts();

Return Value

Type | Description
integer | Returns count of removed parts on success and -1 on failure.

Version

Introduced in version January 2024


AdditiveSetupUtility.splitSupport Method

Parent Object: AdditiveSetupUtility

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/AdditiveSetupUtility.h>

Description

Splits support structure of given target bodies into separate mesh body.

Syntax

  • Python
  • C++
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.
returnValue = additiveSetupUtility_var.splitSupport(targets, splitType)
"additiveSetupUtility_var" is a variable referencing an AdditiveSetupUtility object.

#include <Cam/ModifyUtility/AdditiveSetupUtility.h>

returnValue = additiveSetupUtility_var->splitSupport(targets, splitType);

Return Value

Type | Description
boolean | True on success, false on errors

Parameters

Name | Type | Description
targets | Base[] | Targets contain any input bodies whose support is to be inserted into a new mesh body. Input target must belong to the setup and must be part of the associated manufacturing model. Raises an error if any input target is not part of the setup or is not part of the associated manufacturing model.
splitType | SplitSupportTypes | The splitType defines the behavior for support that contains solid and open mesh geometry.

Version

Introduced in version September 2023


AllExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AllExtentDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Defines the inputs for a AllExtentDefinition object. This defines a feature extent where the direction can be positive, negative, or symmetric. Setting the direction to Symmetric specifies that the extrusion is through-all, and goes in both directions.

Remarks

This object is retired. Extents are now defined independently for both directions. To get the equivalent of what this object provided, you will create a ThroughAllExtentDefinition and apply it for the extent direction you want a through all type of extrusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
direction | Gets and sets the direction of the extent.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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


AllExtentDefinition.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Features/AllExtentDefinition.h>

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

Return Value

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

Version

Introduced in version March 2022


AllExtentDefinition.direction Property

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

Description

Gets and sets the direction of the extent.

Syntax

  • Python
  • C++
"allExtentDefinition_var" is a variable referencing an AllExtentDefinition object.

# Get the value of the property.
propertyValue = allExtentDefinition_var.direction

# Set the value of the property.
allExtentDefinition_var.direction = propertyValue
"allExtentDefinition_var" is a variable referencing an AllExtentDefinition object.
#include <Fusion/Features/AllExtentDefinition.h>

// Get the value of the property.
ExtentDirections propertyValue = allExtentDefinition_var->direction();

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

Property Value

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

Version

Introduced in version March 2022


AllExtentDefinition.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"allExtentDefinition_var" is a variable referencing an AllExtentDefinition object.

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

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

Property Value

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

Version

Introduced in version March 2022


AllExtentDefinition.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"allExtentDefinition_var" is a variable referencing an AllExtentDefinition object.

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

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

Property Value

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

Version

Introduced in version March 2022


AllExtentDefinition.parentFeature Property

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

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.

Syntax

  • Python
  • C++
"allExtentDefinition_var" is a variable referencing an AllExtentDefinition object.

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

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

Property Value

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

Version

Introduced in version March 2022


AlongEdgeRipFeatureDefinition Object

Derived from: RipFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

Description

The definition for an along edge rip.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
gapDistance | Gets the ModelParameter that defines the gap distance of the rip. The value can be edited by using the properties of 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.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
ripEdge | Gets and sets the input edge for an along edge rip.

Version

Introduced in version September 2023


AlongEdgeRipFeatureDefinition.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

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

Return Value

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

Version

Introduced in version September 2023


AlongEdgeRipFeatureDefinition.gapDistance Property

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

Description

Gets the ModelParameter that defines the gap distance of the rip. The value can be edited by using the properties of the returned ModelParameter object.

Syntax

  • Python
  • C++
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.

# Get the value of the property.
propertyValue = alongEdgeRipFeatureDefinition_var.gapDistance
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.
#include <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

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

Property Value

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

Version

Introduced in version September 2023


AlongEdgeRipFeatureDefinition.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.

# Get the value of the property.
propertyValue = alongEdgeRipFeatureDefinition_var.isValid
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.
#include <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

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

Property Value

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

Version

Introduced in version September 2023


AlongEdgeRipFeatureDefinition.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.

# Get the value of the property.
propertyValue = alongEdgeRipFeatureDefinition_var.objectType
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.
#include <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

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

Property Value

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

Version

Introduced in version September 2023


AlongEdgeRipFeatureDefinition.ripEdge Property

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

Description

Gets and sets the input edge for an along edge rip.

Syntax

  • Python
  • C++
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.

# Get the value of the property.
propertyValue = alongEdgeRipFeatureDefinition_var.ripEdge

# Set the value of the property.
alongEdgeRipFeatureDefinition_var.ripEdge = propertyValue
"alongEdgeRipFeatureDefinition_var" is a variable referencing an AlongEdgeRipFeatureDefinition object.
#include <Fusion/SheetMetal/AlongEdgeRipFeatureDefinition.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = alongEdgeRipFeatureDefinition_var->ripEdge();

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

Property Value

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

Version

Introduced in version September 2023


AlongPathTextDefinition Object

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

Description

Defines the information for text that follows along a path.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
characterSpacing | Gets and sets the spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.
horizontalAlignment | Gets and sets the horizontal alignment of the text with respect to the path curve.
isAbovePath | Gets and sets if the text should be positioned above or below the path 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketchText | Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.
path | Get and sets the entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.

Version

Introduced in version December 2020


AlongPathTextDefinition.characterSpacing Property

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

Description

Gets and sets the spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.characterSpacing

# Set the value of the property.
alongPathTextDefinition_var.characterSpacing = propertyValue
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

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

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

Property Value

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

Version

Introduced in version January 2021


AlongPathTextDefinition.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Sketch/AlongPathTextDefinition.h>

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

Return Value

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

Version

Introduced in version December 2020


AlongPathTextDefinition.horizontalAlignment Property

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

Description

Gets and sets the horizontal alignment of the text with respect to the path curve.

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.horizontalAlignment

# Set the value of the property.
alongPathTextDefinition_var.horizontalAlignment = propertyValue
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

// Get the value of the property.
HorizontalAlignments propertyValue = alongPathTextDefinition_var->horizontalAlignment();

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

Property Value

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

Version

Introduced in version December 2020


AlongPathTextDefinition.isAbovePath Property

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

Description

Gets and sets if the text should be positioned above or below the path entity.

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.isAbovePath

# Set the value of the property.
alongPathTextDefinition_var.isAbovePath = propertyValue
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

// Get the value of the property.
boolean propertyValue = alongPathTextDefinition_var->isAbovePath();

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

Property Value

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

Version

Introduced in version December 2020


AlongPathTextDefinition.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.isValid
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

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

Property Value

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

Version

Introduced in version December 2020


AlongPathTextDefinition.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.objectType
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

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

Property Value

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

Version

Introduced in version December 2020


AlongPathTextDefinition.parentSketchText Property

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

Description

Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.parentSketchText
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

// Get the value of the property.
Ptr<SketchText> propertyValue = alongPathTextDefinition_var->parentSketchText();

Property Value

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

Version

Introduced in version July 2022


AlongPathTextDefinition.path Property

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

Description

Get and sets the entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.

Syntax

  • Python
  • C++
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.

# Get the value of the property.
propertyValue = alongPathTextDefinition_var.path

# Set the value of the property.
alongPathTextDefinition_var.path = propertyValue
"alongPathTextDefinition_var" is a variable referencing an AlongPathTextDefinition object.
#include <Fusion/Sketch/AlongPathTextDefinition.h>

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

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

Property Value

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

Version

Introduced in version December 2020


Analyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Analyses.h>

Description

Provides access to the existing analysis results within a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified Analysis using an index into the collection.
itemByName | A method that returns the specified Analysis using the name of the analysis as it is displayed in the browser.

Properties

Name | Description
accessibilityAnalyses | Returns the AccessibilityAnalyses object, which provides access to any existing AccessibilityAnalysis objects in the design.
count | Returns the number of Analysis objects in the collection.
curvatureCombAnalyses | Returns the CurvatureCombAnalyses object, which provides access to any existing CurvatureCombAnalysis objects in the design.
curvatureMapAnalyses | Returns the CurvatureMapAnalyses object, which provides access to any existing CurvatureMapAnalysis objects in the design.
draftAnalyses | Returns the DraftAnalyses object, which provides access to any existing DraftAnalysis objects in the design.
isLightBulbOn | A property that gets and sets if the display is enabled for all Analysis objects in the design. If this is false, all Analysis results will be hidden. If this is true, the Analysis objects whose isLightBulbOn property is also true will be visible.
isoCurveAnalyses | Returns the IsoCurveAnalyses object, which provides access to any existing IsoCurveAnalysis objects 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.
minimumRadiusAnalyses | Returns the MinimumRadiusAnalyses object, which provides access to any existing MinimumRadiusAnalysis objects in the design.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sectionAnalyses | Returns the SectionAnalyses object, which provides access to any existing SectionAnalysis objects in the design.
zebraAnalyses | Returns the ZebraAnalyses object, which provides access to any existing ZebraAnalysis objects in the design.

Accessed From

Design.analyses, FlatPatternProduct.analyses, WorkingModel.analyses

Version

Introduced in version January 2023


Analyses.accessibilityAnalyses Property

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

Description

Returns the AccessibilityAnalyses object, which provides access to any existing AccessibilityAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.accessibilityAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<AccessibilityAnalyses> propertyValue = analyses_var->accessibilityAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Fusion/Analyses.h>

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

Return Value

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

Version

Introduced in version January 2023


Analyses.count Property

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

Description

Returns the number of Analysis objects in the collection.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.count
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

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

Property Value

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

Version

Introduced in version January 2023


Analyses.curvatureCombAnalyses Property

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

Description

Returns the CurvatureCombAnalyses object, which provides access to any existing CurvatureCombAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.curvatureCombAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<CurvatureCombAnalyses> propertyValue = analyses_var->curvatureCombAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.curvatureMapAnalyses Property

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

Description

Returns the CurvatureMapAnalyses object, which provides access to any existing CurvatureMapAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.curvatureMapAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<CurvatureMapAnalyses> propertyValue = analyses_var->curvatureMapAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.draftAnalyses Property

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

Description

Returns the DraftAnalyses object, which provides access to any existing DraftAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.draftAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<DraftAnalyses> propertyValue = analyses_var->draftAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.isLightBulbOn Property

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

Description

A property that gets and sets if the display is enabled for all Analysis objects in the design. If this is false, all Analysis results will be hidden. If this is true, the Analysis objects whose isLightBulbOn property is also true will be visible.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.isLightBulbOn

# Set the value of the property.
analyses_var.isLightBulbOn = propertyValue
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
boolean propertyValue = analyses_var->isLightBulbOn();

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

Property Value

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

Version

Introduced in version January 2023


Analyses.isoCurveAnalyses Property

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

Description

Returns the IsoCurveAnalyses object, which provides access to any existing IsoCurveAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.isoCurveAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<IsoCurveAnalyses> propertyValue = analyses_var->isoCurveAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

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

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

Property Value

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

Version

Introduced in version January 2023


Analyses.item Method

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

Description

A method that returns the specified Analysis using an index into the collection.

Syntax

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

#include <Fusion/Fusion/Analyses.h>

returnValue = analyses_var->item(index);

Return Value

Type | Description
Analysis | 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 2023


Analyses.itemByName Method

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

Description

A method that returns the specified Analysis using the name of the analysis as it is displayed in the browser.

Syntax

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

#include <Fusion/Fusion/Analyses.h>

returnValue = analyses_var->itemByName(name);

Return Value

Type | Description
Analysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the Analysis as it is displayed in the browser.

Version

Introduced in version January 2023


Analyses.minimumRadiusAnalyses Property

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

Description

Returns the MinimumRadiusAnalyses object, which provides access to any existing MinimumRadiusAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.minimumRadiusAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<MinimumRadiusAnalyses> propertyValue = analyses_var->minimumRadiusAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

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

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

Property Value

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

Version

Introduced in version January 2023


Analyses.sectionAnalyses Property

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

Description

Returns the SectionAnalyses object, which provides access to any existing SectionAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.sectionAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<SectionAnalyses> propertyValue = analyses_var->sectionAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analyses.zebraAnalyses Property

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

Description

Returns the ZebraAnalyses object, which provides access to any existing ZebraAnalysis objects in the design.

Syntax

  • Python
  • C++
"analyses_var" is a variable referencing an Analyses object.

# Get the value of the property.
propertyValue = analyses_var.zebraAnalyses
"analyses_var" is a variable referencing an Analyses object.
#include <Fusion/Fusion/Analyses.h>

// Get the value of the property.
Ptr<ZebraAnalyses> propertyValue = analyses_var->zebraAnalyses();

Property Value

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

Version

Introduced in version January 2023


Analysis Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Analysis.h>

Description

The base class Analysis object that represents all the types of analysis results.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.item, Analyses.itemByName

Derived Classes

AccessibilityAnalysis, CurvatureCombAnalysis, CurvatureMapAnalysis, DraftAnalysis, IsoCurveAnalysis, MinimumRadiusAnalysis, SectionAnalysis, ZebraAnalysis

Version

Introduced in version January 2023


Analysis.attributes Property

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

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

# Get the value of the property.
propertyValue = analysis_var.attributes
"analysis_var" is a variable referencing an Analysis object.
#include <Fusion/Fusion/Analysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = analysis_var->attributes();

Property Value

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

Version

Introduced in version January 2023


Analysis.classType Method

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

Description

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

Syntax

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

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

#include <Fusion/Fusion/Analysis.h>

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

Return Value

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

Version

Introduced in version January 2023


Analysis.deleteMe Method

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

Description

A method that deletes this Analysis.

Syntax

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

#include <Fusion/Fusion/Analysis.h>

returnValue = analysis_var->deleteMe();

Return Value

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

Version

Introduced in version January 2023


Analysis.entityToken Property

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

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

# Get the value of the property.
propertyValue = analysis_var.entityToken
"analysis_var" is a variable referencing an Analysis object.
#include <Fusion/Fusion/Analysis.h>

// Get the value of the property.
string propertyValue = analysis_var->entityToken();

Property Value

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

Version

Introduced in version January 2023


Analysis.isLightBulbOn Property

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

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

# Get the value of the property.
propertyValue = analysis_var.isLightBulbOn

# Set the value of the property.
analysis_var.isLightBulbOn = propertyValue
"analysis_var" is a variable referencing an Analysis object.
#include <Fusion/Fusion/Analysis.h>

// Get the value of the property.
boolean propertyValue = analysis_var->isLightBulbOn();

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

Property Value

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

Version

Introduced in version January 2023


Analysis.isValid Property

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

Description

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

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

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

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

Property Value

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

Version

Introduced in version January 2023


Analysis.isVisible Property

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

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

# Get the value of the property.
propertyValue = analysis_var.isVisible
"analysis_var" is a variable referencing an Analysis object.
#include <Fusion/Fusion/Analysis.h>

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

Property Value

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

Version

Introduced in version January 2023


Analysis.name Property

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

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

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

# Set the value of the property.
analysis_var.name = propertyValue
"analysis_var" is a variable referencing an Analysis object.
#include <Fusion/Fusion/Analysis.h>

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

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

Property Value

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

Version

Introduced in version January 2023


Analysis.objectType Property

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

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"analysis_var" is a variable referencing an Analysis object.

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

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

Property Value

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

Version

Introduced in version January 2023


AngleExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

Description

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

Description

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AngleExtentDefinition.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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 meaningful 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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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.deleteMe Method

Parent Object: AngleValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

Deletes this Command input.

Syntax

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

#include <Core/UserInterface/AngleValueCommandInput.h>

returnValue = angleValueCommandInput_var->deleteMe();

Return Value

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

Version

Introduced in version August 2020


AngleValueCommandInput.expression Property

Parent Object: AngleValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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 meaningful when the hasMaximumValue property returns True.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/AngleValueCommandInput.h>

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 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.

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


APIPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

Provides access to the various preferences associated with the API.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
debuggingPort | Gets and sets the port used when connecting to Visual Studio Code.
defaultAddInLanguage | Gets and sets the preference that controls which programming language should be used when creating a new add-in. One option is to prompt the user.
defaultPathForScriptsAndAddIns The default path where new scripts or add-ins will be created. Scripts will be created in a "Scripts" subdirectory and add-ins will be created in an "AddIns" subdirectory. This must be the full path to the parent folder.

This path is also where Fusion will look for any scripts and add-ins and automatically display them in the "Scripts and Add-Ins" dialog.
defaultScriptLanguage | Gets and sets the preference that controls which programming language should be used when creating a new script. One option is to prompt the user.
isDeveloperToolsEnabled | Gets and sets if access to "Developer Tools" should be enabled in pallets and BrowserCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.apiPreferences

Version

Introduced in version October 2023


APIPreferences.classType Method

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

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

Syntax

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

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

#include <Core/Application/APIPreferences.h>

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

Return Value

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

Version

Introduced in version October 2023


APIPreferences.debuggingPort Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

Gets and sets the port used when connecting to Visual Studio Code.

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

# Get the value of the property.
propertyValue = aPIPreferences_var.debuggingPort

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

// Get the value of the property.
integer propertyValue = aPIPreferences_var->debuggingPort();

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.defaultAddInLanguage Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

Gets and sets the preference that controls which programming language should be used when creating a new add-in. One option is to prompt the user.

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

# Get the value of the property.
propertyValue = aPIPreferences_var.defaultAddInLanguage

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

// Get the value of the property.
ProgrammingLanguages propertyValue = aPIPreferences_var->defaultAddInLanguage();

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.defaultPathForScriptsAndAddIns Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

The default path where new scripts or add-ins will be created. Scripts will be created in a "Scripts" subdirectory and add-ins will be created in an "AddIns" subdirectory. This must be the full path to the parent folder.

This path is also where Fusion will look for any scripts and add-ins and automatically display them in the "Scripts and Add-Ins" dialog.

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

# Get the value of the property.
propertyValue = aPIPreferences_var.defaultPathForScriptsAndAddIns

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

// Get the value of the property.
string propertyValue = aPIPreferences_var->defaultPathForScriptsAndAddIns();

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.defaultScriptLanguage Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

Gets and sets the preference that controls which programming language should be used when creating a new script. One option is to prompt the user.

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

# Get the value of the property.
propertyValue = aPIPreferences_var.defaultScriptLanguage

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

// Get the value of the property.
ProgrammingLanguages propertyValue = aPIPreferences_var->defaultScriptLanguage();

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.isDeveloperToolsEnabled Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

Gets and sets if access to "Developer Tools" should be enabled in pallets and BrowserCommandInputs.

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

# Get the value of the property.
propertyValue = aPIPreferences_var.isDeveloperToolsEnabled

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

// Get the value of the property.
boolean propertyValue = aPIPreferences_var->isDeveloperToolsEnabled();

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.isValid Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

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

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

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

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

Property Value

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

Version

Introduced in version October 2023


APIPreferences.objectType Property

Parent Object: APIPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/APIPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"aPIPreferences_var" is a variable referencing an APIPreferences object.

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

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

Property Value

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

Version

Introduced in version October 2023


Appearance Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

An appearance.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** Copies this appearance to the specified target.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, ConfigurationAppearanceCell.appearance, CustomGraphicsAppearanceColorEffect.appearance, FavoriteAppearances.add, FavoriteAppearances.item, FavoriteAppearances.itemById, FavoriteAppearances.itemByName, Material.appearance, MaterialPreferences.appearanceOverride, MeshBody.appearance, Occurrence.appearance

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Appearance.appearanceProperties Property

Parent Object: Appearance
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

returns the collection of Properties that define this appearance

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.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version August 2014


Appearance.classType Method

Parent Object: Appearance
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Copies this appearance to the specified target.

Remarks

This method has been retired and replaced by the addByCopyMethod on the Appearances object.

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 FavoriteAppearances object.

Version

Introduced in version August 2014
Retired in version July 2023


Appearance.deleteMe Method

Parent Object: Appearance
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

The unique internal ID of this Appearance.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

Returns true if this Appearance is used in the Design.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Appearance.objectType Property

Parent Object: Appearance
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearance.h>

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

A collection of appearances.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.appearances, FlatPatternProduct.appearances, MaterialLibrary.appearances, WorkingModel.appearances

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Appearances.addByCopy Method

Parent Object: Appearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

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.

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 Appearance name to apply to the copy.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version January 2016


Appearances.classType Method

Parent Object: Appearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

The number of Materials in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

Returns the specified Appearance using an index into the collection.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Appearances.itemById Method

Parent Object: Appearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

Returns the Appearance by it's internal unique ID.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

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.

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
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Appearances.objectType Property

Parent Object: Appearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

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

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

Changes the image of this texture.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

Returns a collection of the properties associated with this texture.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTexture.h>

Description

Gets the type of texture this appearance currently is.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

A texture value property associated with a material or appearance.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
value | Gets and sets this property value.

Version

Introduced in version August 2014


AppearanceTextureProperty.classType Method

Parent Object: AppearanceTextureProperty
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

Returns the unique ID of this property.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

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

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/AppearanceTextureProperty.h>

Description

Gets and sets this property value.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 is idle.
get | Access to the root Application object.
getLastError | Returns information about the last error that occurred.
log | Logs messages to either the TEXT COMMAND window or the Fusion app log file.
registerCustomEvent | This registers a new CustomEvent which is intended to be primarily 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.
applicationFolders | Returns the ApplicationFolders object which provides access to the paths of various folders associated with Fusion.
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.
fontNames | Returns the names of all of the fonts that are available in Fusion when creating text.
hasActiveJobs | Gets whether there are any active jobs.
importManager | Returns the ImportManager. You use the ImportManager to import files (of various neutral formats.) into existing components or new document.
isComponentColorsDisplayed | Get and sets if component colors are used when displaying the components within a design. This is the API equivalent of the "Display Component Colors" command.
isOffLine | Gets and sets if Fusion is offline or not.
isStartupComplete | Boolean property indicating whether Fusion 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointTolerance | The modeling tolerance used internally when comparing two points. The value is in centimeters.
preferences | Provides access to all of the application preferences.
scripts | Returns the Scripts object which provides the ability to manage scripts and add-ins.
supportedProductTypes | Returns an array containing the names of the products types currently supported by Fusion. For example, the name returned for Fusion 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 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.
dataFileComplete | The dataFileComplete event fires when a data file upload has completed including any cloud side translations.
dataFileCopyComplete | The dataFileCopyComplete event fires when a data file copy has completed including any PIM Data copy.
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 available 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 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 protocol handler to insert a file as new component. This event is fired at the beginning of the request but before Fusion has take any action so that it's still possible to cancel the operation.
mfgdmDataReady | Preview The mfgdmDataReady event fires when the MFGDM data structure for a document has been updated and properties to IDs and structure from the data model is ready.
onlineStatusChanged | The onlineStatusChanged event fires immediately after Fusion goes online or offline. This event fires whether or not the online status was changed deliberately by the user by using the Fusion 'Work Offline' command or because of inadvertent network/Internet connectivity issues. You can get the isOffline property of ApplicationEventArgs to determine whether Fusion 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 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 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 has take any action so that it's still possible to cancel the operation.
startupCompleted | The startupCompleted event fires after Fusion 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, DrawingDocument.parent, FusionDocument.parent

Version

Introduced in version August 2014


Application.activeDocument Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the current active document.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version August 2014


Application.activeEditObject Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the current active product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the currently active graphics view.

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 API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Application.applicationFolders Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the ApplicationFolders object which provides access to the paths of various folders associated with Fusion.

Syntax

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

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

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

Property Value

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

Version

Introduced in version September 2024


Application.cameraChanged Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_cameraChanged" is the event handler function.
futil.add_handler(application_var.cameraChanged, application_cameraChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the cameraChanged event.
def application_cameraChanged(args: adsk.core.CameraEventArgs):
    # Code to react to the event.
    app.log('In application_cameraChanged event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyCameraChangedHandler" is the name of the class that handles the event.
onCameraChanged = MyCameraChangedHandler()
application_var.cameraChanged.add(onCameraChanged)
handlers.append(onCameraChanged)

-------- Event handler class definition ---------
# Event handler for the cameraChanged event.
class MyCameraChangedHandler(adsk.core.CameraEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CameraEventArgs):
        # Code to react to the event.
        app.log('In MyCameraChangedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the User that is currently logged in.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the Data object which provides access the files.

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.dataFileComplete Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The dataFileComplete event fires when a data file upload has completed including any cloud side translations.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_dataFileComplete" is the event handler function.
futil.add_handler(application_var.dataFileComplete, application_dataFileComplete, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the dataFileComplete event.
def application_dataFileComplete(args: adsk.core.DataEventArgs):
    # Code to react to the event.
    app.log('In application_dataFileComplete event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDataFileCompleteHandler" is the name of the class that handles the event.
onDataFileComplete = MyDataFileCompleteHandler()
application_var.dataFileComplete.add(onDataFileComplete)
handlers.append(onDataFileComplete)

-------- Event handler class definition ---------
# Event handler for the dataFileComplete event.
class MyDataFileCompleteHandler(adsk.core.DataEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DataEventArgs):
        # Code to react to the event.
        app.log('In MyDataFileCompleteHandler event handler.')
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Dashboard/DataEvent.h>
#include <Core/Dashboard/DataEventHandler.h>
#include <Core/Dashboard/DataEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the dataFileComplete event.
class MyDataFileCompleteEventHandler : public adsk::core::DataEventHandler
{
public:
    void notify(const Ptr<DataEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDataFileCompleteEventHandler event handler.");
    }
} _dataFileComplete;

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

bool isOk = dataFileCompleteEvent->add(&_dataFileComplete);
if (!isOk)
    return;

Property Value

This is an event property that returns a DataEvent.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version January 2022


Application.dataFileCopyComplete Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The dataFileCopyComplete event fires when a data file copy has completed including any PIM Data copy.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_dataFileCopyComplete" is the event handler function.
futil.add_handler(application_var.dataFileCopyComplete, application_dataFileCopyComplete, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the dataFileCopyComplete event.
def application_dataFileCopyComplete(args: adsk.core.DataEventArgs):
    # Code to react to the event.
    app.log('In application_dataFileCopyComplete event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDataFileCopyCompleteHandler" is the name of the class that handles the event.
onDataFileCopyComplete = MyDataFileCopyCompleteHandler()
application_var.dataFileCopyComplete.add(onDataFileCopyComplete)
handlers.append(onDataFileCopyComplete)

-------- Event handler class definition ---------
# Event handler for the dataFileCopyComplete event.
class MyDataFileCopyCompleteHandler(adsk.core.DataEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DataEventArgs):
        # Code to react to the event.
        app.log('In MyDataFileCopyCompleteHandler event handler.')
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Dashboard/DataEvent.h>
#include <Core/Dashboard/DataEventHandler.h>
#include <Core/Dashboard/DataEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the dataFileCopyComplete event.
class MyDataFileCopyCompleteEventHandler : public adsk::core::DataEventHandler
{
public:
    void notify(const Ptr<DataEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDataFileCopyCompleteEventHandler event handler.");
    }
} _dataFileCopyComplete;

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

bool isOk = dataFileCopyCompleteEvent->add(&_dataFileCopyComplete);
if (!isOk)
    return;

Property Value

This is an event property that returns a DataEvent.

Version

Introduced in version October 2023


Application.documentActivated Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentActivated" is the event handler function.
futil.add_handler(application_var.documentActivated, application_documentActivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentActivated event.
def application_documentActivated(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentActivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentActivatedHandler" is the name of the class that handles the event.
onDocumentActivated = MyDocumentActivatedHandler()
application_var.documentActivated.add(onDocumentActivated)
handlers.append(onDocumentActivated)

-------- Event handler class definition ---------
# Event handler for the documentActivated event.
class MyDocumentActivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentActivatedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentActivating Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentActivating" is the event handler function.
futil.add_handler(application_var.documentActivating, application_documentActivating, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentActivating event.
def application_documentActivating(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentActivating event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentActivatingHandler" is the name of the class that handles the event.
onDocumentActivating = MyDocumentActivatingHandler()
application_var.documentActivating.add(onDocumentActivating)
handlers.append(onDocumentActivating)

-------- Event handler class definition ---------
# Event handler for the documentActivating event.
class MyDocumentActivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentActivatingHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentClosed Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentClosed" is the event handler function.
futil.add_handler(application_var.documentClosed, application_documentClosed, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentClosed event.
def application_documentClosed(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentClosed event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentClosedHandler" is the name of the class that handles the event.
onDocumentClosed = MyDocumentClosedHandler()
application_var.documentClosed.add(onDocumentClosed)
handlers.append(onDocumentClosed)

-------- Event handler class definition ---------
# Event handler for the documentClosed event.
class MyDocumentClosedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentClosedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentClosing Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentClosing" is the event handler function.
futil.add_handler(application_var.documentClosing, application_documentClosing, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentClosing event.
def application_documentClosing(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentClosing event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentClosingHandler" is the name of the class that handles the event.
onDocumentClosing = MyDocumentClosingHandler()
application_var.documentClosing.add(onDocumentClosing)
handlers.append(onDocumentClosing)

-------- Event handler class definition ---------
# Event handler for the documentClosing event.
class MyDocumentClosingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentClosingHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentCreated Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The DocumentCreated event fires when a new document is created.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentCreated" is the event handler function.
futil.add_handler(application_var.documentCreated, application_documentCreated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentCreated event.
def application_documentCreated(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentCreated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentCreatedHandler" is the name of the class that handles the event.
onDocumentCreated = MyDocumentCreatedHandler()
application_var.documentCreated.add(onDocumentCreated)
handlers.append(onDocumentCreated)

-------- Event handler class definition ---------
# Event handler for the documentCreated event.
class MyDocumentCreatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentCreatedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentDeactivated Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentDeactivated" is the event handler function.
futil.add_handler(application_var.documentDeactivated, application_documentDeactivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentDeactivated event.
def application_documentDeactivated(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentDeactivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentDeactivatedHandler" is the name of the class that handles the event.
onDocumentDeactivated = MyDocumentDeactivatedHandler()
application_var.documentDeactivated.add(onDocumentDeactivated)
handlers.append(onDocumentDeactivated)

-------- Event handler class definition ---------
# Event handler for the documentDeactivated event.
class MyDocumentDeactivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentDeactivatedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentDeactivating Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentDeactivating" is the event handler function.
futil.add_handler(application_var.documentDeactivating, application_documentDeactivating, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentDeactivating event.
def application_documentDeactivating(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentDeactivating event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentDeactivatingHandler" is the name of the class that handles the event.
onDocumentDeactivating = MyDocumentDeactivatingHandler()
application_var.documentDeactivating.add(onDocumentDeactivating)
handlers.append(onDocumentDeactivating)

-------- Event handler class definition ---------
# Event handler for the documentDeactivating event.
class MyDocumentDeactivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentDeactivatingHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentOpened Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The DocumentOpened event fires at the VERY end of a document being opened so the Document object is available 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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentOpened" is the event handler function.
futil.add_handler(application_var.documentOpened, application_documentOpened, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentOpened event.
def application_documentOpened(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentOpened event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentOpenedHandler" is the name of the class that handles the event.
onDocumentOpened = MyDocumentOpenedHandler()
application_var.documentOpened.add(onDocumentOpened)
handlers.append(onDocumentOpened)

-------- Event handler class definition ---------
# Event handler for the documentOpened event.
class MyDocumentOpenedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentOpenedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentOpening" is the event handler function.
futil.add_handler(application_var.documentOpening, application_documentOpening, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentOpening event.
def application_documentOpening(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentOpening event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentOpeningHandler" is the name of the class that handles the event.
onDocumentOpening = MyDocumentOpeningHandler()
application_var.documentOpening.add(onDocumentOpening)
handlers.append(onDocumentOpening)

-------- Event handler class definition ---------
# Event handler for the documentOpening event.
class MyDocumentOpeningHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentOpeningHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentSaved" is the event handler function.
futil.add_handler(application_var.documentSaved, application_documentSaved, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentSaved event.
def application_documentSaved(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentSaved event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentSavedHandler" is the name of the class that handles the event.
onDocumentSaved = MyDocumentSavedHandler()
application_var.documentSaved.add(onDocumentSaved)
handlers.append(onDocumentSaved)

-------- Event handler class definition ---------
# Event handler for the documentSaved event.
class MyDocumentSavedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentSavedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.documentSaving Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_documentSaving" is the event handler function.
futil.add_handler(application_var.documentSaving, application_documentSaving, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the documentSaving event.
def application_documentSaving(args: adsk.core.DocumentEventArgs):
    # Code to react to the event.
    app.log('In application_documentSaving event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyDocumentSavingHandler" is the name of the class that handles the event.
onDocumentSaving = MyDocumentSavingHandler()
application_var.documentSaving.add(onDocumentSaving)
handlers.append(onDocumentSaving)

-------- Event handler class definition ---------
# Event handler for the documentSaving event.
class MyDocumentSavingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DocumentEventArgs):
        # Code to react to the event.
        app.log('In MyDocumentSavingHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version May 2017


Application.executeTextCommand Method

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Executes the input text command.

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.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version May 2020


Application.favoriteAppearances Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the set of favorite appearances.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the set of favorite materials.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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 is idle.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version January 2017


Application.fontNames Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the names of all of the fonts that are available in Fusion when creating text.

Syntax

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

# Get the value of the property.
propertyValue = application_var.fontNames
"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->fontNames();

Property Value

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

Version

Introduced in version January 2023


Application.get Method

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Access to the root Application object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns information about the last error that occurred.

Syntax

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

# Uses no optional arguments.
(returnValue, description) = application_var.getLastError()

# Uses optional arguments.
(returnValue, description) = application_var.getLastError()

#include <Core/Application/Application.h

// Uses no optional arguments.
// Declare the output arguments.
integer returnValue = application_var->getLastError();

// Uses optional arguments.
// Declare the output arguments.
string description;

// Call the function.
Ptr<Application> 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. This is an optional argument whose default value is "".

Version

Introduced in version August 2014


Application.hasActiveJobs Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Gets whether there are any active jobs.

Syntax

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

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

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

Property Value

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

Version

Introduced in version September 2022


Application.importManager Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_insertedFromURL" is the event handler function.
futil.add_handler(application_var.insertedFromURL, application_insertedFromURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the insertedFromURL event.
def application_insertedFromURL(args: adsk.core.WebRequestEventArgs):
    # Code to react to the event.
    app.log('In application_insertedFromURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyInsertedFromURLHandler" is the name of the class that handles the event.
onInsertedFromURL = MyInsertedFromURLHandler()
application_var.insertedFromURL.add(onInsertedFromURL)
handlers.append(onInsertedFromURL)

-------- Event handler class definition ---------
# Event handler for the insertedFromURL event.
class MyInsertedFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WebRequestEventArgs):
        # Code to react to the event.
        app.log('In MyInsertedFromURLHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_insertingFromURL" is the event handler function.
futil.add_handler(application_var.insertingFromURL, application_insertingFromURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the insertingFromURL event.
def application_insertingFromURL(args: adsk.core.WebRequestEventArgs):
    # Code to react to the event.
    app.log('In application_insertingFromURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyInsertingFromURLHandler" is the name of the class that handles the event.
onInsertingFromURL = MyInsertingFromURLHandler()
application_var.insertingFromURL.add(onInsertingFromURL)
handlers.append(onInsertingFromURL)

-------- Event handler class definition ---------
# Event handler for the insertingFromURL event.
class MyInsertingFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WebRequestEventArgs):
        # Code to react to the event.
        app.log('In MyInsertingFromURLHandler event handler.')
--------- 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.isComponentColorsDisplayed Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Get and sets if component colors are used when displaying the components within a design. This is the API equivalent of the "Display Component Colors" command.

Syntax

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

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

# Set the value of the property.
application_var.isComponentColorsDisplayed = 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->isComponentColorsDisplayed();

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

Property Value

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

Version

Introduced in version May 2024


Application.isOffLine Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Gets and sets if Fusion is offline or not.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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.log Method

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Logs messages to either the TEXT COMMAND window or the Fusion app log file.

Syntax

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

# Uses no optional arguments.
returnValue = adsk.core.Application.log(message)

# Uses optional arguments.
returnValue = adsk.core.Application.log(message, level, type)
This is a static method.

#include <Core/Application/Application.h>

// Uses no optional arguments.
returnValue = adsk::core::Application::log(message);

// Uses optional arguments.
returnValue = adsk::core::Application::log(message, level, type);

Parameters

Name | Type | Description
message | string | The message to write to the log.
level | LogLevels | The log level. Default value is InfoLogLevel. This is only used when the log type is FileLogType where the log message will include the log level. This is an optional argument whose default value is LogLevels.InfoLogLevel.
type | LogTypes | The log type. The default value is ConsoleLogType to write the message to the TEXT COMMAND window. When the type is FileLogType, the message is written to Fusion's app log file which is the same file where Fusion writes all of its log messages. You can get the path and filename of the current log file by using the TEXT COMMAND window. In the lower-right corner you can choose "Txt", "Py", or "Js". Choose the "Txt" option and type "paths.get" in the input field and press return. A list of all of the various paths used by Fusion will be displayed in the TEXT COMMAND window. The line for "AppLogFilePath" has the full path to the log file. This is an optional argument whose default value is LogTypes.ConsoleLogType.

Version

Introduced in version July 2021


Application.materialLibraries Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the collection of material libraries currently available.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Application.measureManager Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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.mfgdmDataReady Event

Parent Object: Application

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

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

Description

The mfgdmDataReady event fires when the MFGDM data structure for a document has been updated and properties to IDs and structure from the data model is ready.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_mfgdmDataReady" is the event handler function.
futil.add_handler(application_var.mfgdmDataReady, application_mfgdmDataReady, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mfgdmDataReady event.
def application_mfgdmDataReady(args: adsk.core.MFGDMDataEventArgs):
    # Code to react to the event.
    app.log('In application_mfgdmDataReady event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyMfgdmDataReadyHandler" is the name of the class that handles the event.
onMfgdmDataReady = MyMfgdmDataReadyHandler()
application_var.mfgdmDataReady.add(onMfgdmDataReady)
handlers.append(onMfgdmDataReady)

-------- Event handler class definition ---------
# Event handler for the mfgdmDataReady event.
class MyMfgdmDataReadyHandler(adsk.core.MFGDMDataEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MFGDMDataEventArgs):
        # Code to react to the event.
        app.log('In MyMfgdmDataReadyHandler event handler.')
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/MFGDMDataEvent.h>
#include <Core/Application/MFGDMDataEventHandler.h>
#include <Core/Application/MFGDMDataEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mfgdmDataReady event.
class MyMfgdmDataReadyEventHandler : public adsk::core::MFGDMDataEventHandler
{
public:
    void notify(const Ptr<MFGDMDataEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyMfgdmDataReadyEventHandler event handler.");
    }
} _mfgdmDataReady;

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

bool isOk = mfgdmDataReadyEvent->add(&_mfgdmDataReady);
if (!isOk)
    return;

Property Value

This is an event property that returns a MFGDMDataEvent.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


Application.objectType Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_onlineStatusChanged" is the event handler function.
futil.add_handler(application_var.onlineStatusChanged, application_onlineStatusChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the onlineStatusChanged event.
def application_onlineStatusChanged(args: adsk.core.ApplicationEventArgs):
    # Code to react to the event.
    app.log('In application_onlineStatusChanged event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyOnlineStatusChangedHandler" is the name of the class that handles the event.
onOnlineStatusChanged = MyOnlineStatusChangedHandler()
application_var.onlineStatusChanged.add(onOnlineStatusChanged)
handlers.append(onOnlineStatusChanged)

-------- Event handler class definition ---------
# Event handler for the onlineStatusChanged event.
class MyOnlineStatusChangedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ApplicationEventArgs):
        # Code to react to the event.
        app.log('In MyOnlineStatusChangedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


Application.openedFromURL Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_openedFromURL" is the event handler function.
futil.add_handler(application_var.openedFromURL, application_openedFromURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the openedFromURL event.
def application_openedFromURL(args: adsk.core.WebRequestEventArgs):
    # Code to react to the event.
    app.log('In application_openedFromURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyOpenedFromURLHandler" is the name of the class that handles the event.
onOpenedFromURL = MyOpenedFromURLHandler()
application_var.openedFromURL.add(onOpenedFromURL)
handlers.append(onOpenedFromURL)

-------- Event handler class definition ---------
# Event handler for the openedFromURL event.
class MyOpenedFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WebRequestEventArgs):
        # Code to react to the event.
        app.log('In MyOpenedFromURLHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The openingFromURL event fires when the user has clicked a link in a web page that uses the Fusion 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 has take any action so that it's still possible to cancel the operation.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_openingFromURL" is the event handler function.
futil.add_handler(application_var.openingFromURL, application_openingFromURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the openingFromURL event.
def application_openingFromURL(args: adsk.core.WebRequestEventArgs):
    # Code to react to the event.
    app.log('In application_openingFromURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyOpeningFromURLHandler" is the name of the class that handles the event.
onOpeningFromURL = MyOpeningFromURLHandler()
application_var.openingFromURL.add(onOpeningFromURL)
handlers.append(onOpeningFromURL)

-------- Event handler class definition ---------
# Event handler for the openingFromURL event.
class MyOpeningFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WebRequestEventArgs):
        # Code to react to the event.
        app.log('In MyOpeningFromURLHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Provides access to all of the application preferences.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

This registers a new CustomEvent which is intended to be primarily 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.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version January 2017


Application.scripts Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the Scripts object which provides the ability to manage scripts and add-ins.

Syntax

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

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

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

Property Value

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

Version

Introduced in version October 2023


Application.startupCompleted Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The startupCompleted event fires after Fusion 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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_startupCompleted" is the event handler function.
futil.add_handler(application_var.startupCompleted, application_startupCompleted, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the startupCompleted event.
def application_startupCompleted(args: adsk.core.ApplicationEventArgs):
    # Code to react to the event.
    app.log('In application_startupCompleted event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "MyStartupCompletedHandler" is the name of the class that handles the event.
onStartupCompleted = MyStartupCompletedHandler()
application_var.startupCompleted.add(onStartupCompleted)
handlers.append(onStartupCompleted)

-------- Event handler class definition ---------
# Event handler for the startupCompleted event.
class MyStartupCompletedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ApplicationEventArgs):
        # Code to react to the event.
        app.log('In MyStartupCompletedHandler event handler.')
--------- 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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


Application.supportedProductTypes Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns an array containing the names of the products types currently supported by Fusion. For example, the name returned for Fusion 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Unregisters an existing CustomEvent.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Version

Introduced in version January 2017


Application.userId Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Provides access to functionality specific to the user interface.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Application.userName Property

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The modeling tolerance used when comparing vector angles. The value is in radians.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

Returns the current version of the Fusion application.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

An event endpoint that supports the connection to ApplicationCommandEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

Adds an event handler object to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

Provides a set of arguments from a firing ApplicationCommandEvent to an ApplicationCommandEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

Returns the CommandDefinition object for the command the event is being fired for.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

Returns the unique id of the command the event if being fired for.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventArgs.h>

Description

Returns the reason the command is being terminated. This property should be ignored for all events besides the commandTerminated event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ApplicationCommandEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"applicationCommandEventHandler_var" is a variable referencing an ApplicationCommandEventHandler object.
returnValue = applicationCommandEventHandler_var.notify(eventArgs)
"applicationCommandEventHandler_var" is a variable referencing an ApplicationCommandEventHandler object.

#include <Core/UserInterface/ApplicationCommandEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

An ApplicationEvent represents a Fusion application related event. For example, startupCompleted or OnlineStatusChanged

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


ApplicationEvent.add Method

Parent Object: ApplicationEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

Add a handler to be notified when the event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

The ApplicationEventArgs provides information associated with an application event. Note that some properties are not available on every event

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Samples

Name | Description
Application Event API Sample | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


ApplicationEventArgs.classType Method

Parent Object: ApplicationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

Gets if the client computer has access to the Internet.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

Gets and sets if Fusion is offline or not.

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 | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


ApplicationEventArgs.isValid Property

Parent Object: ApplicationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventHandler.h>

Description

The ApplicationEventHandler is a client implemented class that can be added as a handler to an ApplicationEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Samples

Name | Description
Application Event API Sample | Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Version

Introduced in version January 2016


ApplicationEventHandler.notify Method

Parent Object: ApplicationEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"applicationEventHandler_var" is a variable referencing an ApplicationEventHandler object.
returnValue = applicationEventHandler_var.notify(eventArgs)
"applicationEventHandler_var" is a variable referencing an ApplicationEventHandler object.

#include <Core/Application/ApplicationEventHandler.h>

returnValue = 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


ApplicationFolders Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

The ApplicationFolders object provides access to the paths of various folders associated with Fusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
appLogFilePath | Returns the full filename for the current application log file.
appStoreInstallPath | Returns the path where apps from the Autodesk App Store are installed.
defaultPathForScriptsAndAddIns | Gets and sets the default path for scripts and add-ins. This is the same as the defaultPathForScriptsAndAddIns property on the APIPreferences object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialsPath | Returns the path where user-created material and appearance libraries are saved.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
optionsPath | Returns the path to the user-specific folder where Fusion saves various options.
rootPath | Returns the path to the version-specific folder where Fusion is installed.
userDataPath | Returns the path where some user-specific data is stored.

Accessed From

Application.applicationFolders

Version

Introduced in version September 2024


ApplicationFolders.appLogFilePath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the full filename for the current application log file.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->appLogFilePath();

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.appStoreInstallPath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the path where apps from the Autodesk App Store are installed.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->appStoreInstallPath();

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.classType Method

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

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

Syntax

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

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

#include <Core/Application/ApplicationFolders.h>

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

Return Value

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

Version

Introduced in version September 2024


ApplicationFolders.defaultPathForScriptsAndAddIns Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Gets and sets the default path for scripts and add-ins. This is the same as the defaultPathForScriptsAndAddIns property on the APIPreferences object.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

# Get the value of the property.
propertyValue = applicationFolders_var.defaultPathForScriptsAndAddIns

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

// Get the value of the property.
string propertyValue = applicationFolders_var->defaultPathForScriptsAndAddIns();

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

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.isValid Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

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

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

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

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.materialsPath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the path where user-created material and appearance libraries are saved.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->materialsPath();

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.objectType Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

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

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.optionsPath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the path to the user-specific folder where Fusion saves various options.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->optionsPath();

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.rootPath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the path to the version-specific folder where Fusion is installed.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->rootPath();

Property Value

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

Version

Introduced in version September 2024


ApplicationFolders.userDataPath Property

Parent Object: ApplicationFolders
Defined in namespace "adsk::core" and the header file is <Core/Application/ApplicationFolders.h>

Description

Returns the path where some user-specific data is stored.

Syntax

  • Python
  • C++
"applicationFolders_var" is a variable referencing an ApplicationFolders object.

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

// Get the value of the property.
string propertyValue = applicationFolders_var->userDataPath();

Property Value

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

Version

Introduced in version September 2024


Arc2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 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 | Gets 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Returns a NURBS curve that is geometrically identical to the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets and sets the center position of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Creates and returns an independent copy of this Arc2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

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 are used as a wrapper to work with raw 2D arc information.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Creates a transient 2D arc by specifying 3 points. 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets and sets the end angle of the arc in radians, where 0 is along the x axis.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets the position of the end point of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets all of the data defining the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets if the sweep direction of the arc is clockwise or counterclockwise.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets and sets the radius of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Sets all of the data defining the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets and sets the start angle of the arc in radians, where 0 is along the x axis.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Gets the position of the start point of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 the normal of the arc.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radius | Gets and sets the radius of the arc.
referenceVector | Gets 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 API Sample | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Arc3D.asNurbsCurve Property

Parent Object: Arc3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Returns a NURBS curve that is geometrically identical to the arc.

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.

Samples

Name | Description
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Version

Introduced in version August 2014


Arc3D.center Property

Parent Object: Arc3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets and sets the center position of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Creates and returns an independent copy of this Arc3D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Creates a transient 3D arc object by specifying a center point and radius.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Creates a transient 3D arc by specifying 3 points. A transient arc is not displayed or saved in a document. Transient arcs are used as a wrapper to work with raw 3D arc information.

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.

Samples

Name | Description
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Version

Introduced in version August 2014


Arc3D.curveType Property

Parent Object: Arc3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets the end point of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


Arc3D.getData Method

Parent Object: Arc3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets all of the data defining the arc.

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 API Sample | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Arc3D.isValid Property

Parent Object: Arc3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

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

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets the normal of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets and sets the radius of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets the reference vector of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Sets all of the data defining the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Sets the normal and reference vectors of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Gets the start point of the arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Arc3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

The Area properties of a sketch profile or planar surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, FlatPatternProduct.areaProperties, Profile.areaProperties, WorkingModel.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Returns the accuracy that was used for the calculation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Gets the area in the square centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Method that returns the moments of inertia about the centroid. Unit for returned values is kg*cm^2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Method that returns the principal axes.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Method that returns the moments of inertia about the principal axes. Unit for returned values is kg*cm^2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/AreaProperties.h>

Description

Gets the angle of rotation of the principal axes.

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


Arrange2DDefinition Object

Arrange2DDefinition Object Preview

Derived from: ArrangeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object defines all of the settings associated with a 2D arrangement. This is used for both rectangular and true shape arrangements, but some properties are ignored in some cases.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
globalQuantity | Returns the parameter that controls the global quantity. You can modify the value by using the properties on the returned ModelParameter object.
globalRotation | Gets and sets the global rotation type.
grainDirection Defines the angle of the grain direction of the envelope. An angle of 0 is in the X direction of the envelope. You can modify the value by using the properties on the returned ModelParameter object.

This is only valid when the solver type is True Shape and it returns null in all other cases.
isCreateCopies | Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.
isGlobalDirectionFaceUp | Gets and sets the global direction for selected faces. When true, the components specified by selecting a face will be oriented such that the selection face will be oriented upward in the arrangement.
isPartInPartAllowed Gets and sets if parts can be nested within void areas of other parts.

This is only used when the solver type is 2D True Shape and is ignored for 2D Rectangular solutions.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Version

Introduced in version January 2025


Arrange2DDefinition.classType Method

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange2DDefinition.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.globalQuantity Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Returns the parameter that controls the global quantity. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.globalQuantity
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.globalRotation Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Gets and sets the global rotation type.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.globalRotation

# Set the value of the property.
arrange2DDefinition_var.globalRotation = propertyValue
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

// Get the value of the property.
ArrangeRotationTypes propertyValue = arrange2DDefinition_var->globalRotation();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.grainDirection Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Defines the angle of the grain direction of the envelope. An angle of 0 is in the X direction of the envelope. You can modify the value by using the properties on the returned ModelParameter object.

This is only valid when the solver type is True Shape and it returns null in all other cases.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.grainDirection
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.isCreateCopies Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.isCreateCopies
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

// Get the value of the property.
boolean propertyValue = arrange2DDefinition_var->isCreateCopies();

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.isGlobalDirectionFaceUp Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Gets and sets the global direction for selected faces. When true, the components specified by selecting a face will be oriented such that the selection face will be oriented upward in the arrangement.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.isGlobalDirectionFaceUp

# Set the value of the property.
arrange2DDefinition_var.isGlobalDirectionFaceUp = propertyValue
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

// Get the value of the property.
boolean propertyValue = arrange2DDefinition_var->isGlobalDirectionFaceUp();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.isPartInPartAllowed Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Gets and sets if parts can be nested within void areas of other parts.

This is only used when the solver type is 2D True Shape and is ignored for 2D Rectangular solutions.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.isPartInPartAllowed

# Set the value of the property.
arrange2DDefinition_var.isPartInPartAllowed = propertyValue
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

// Get the value of the property.
boolean propertyValue = arrange2DDefinition_var->isPartInPartAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.isValid Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

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

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.isValid
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.objectType Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.objectType
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DDefinition.solverType Property

Parent Object: Arrange2DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DDefinition.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.

# Get the value of the property.
propertyValue = arrange2DDefinition_var.solverType
"arrange2DDefinition_var" is a variable referencing an Arrange2DDefinition object.
#include <Fusion/Arrange/Arrange2DDefinition.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrange2DDefinition_var->solverType();

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput Object

Arrange2DEnvelopeInput Object Preview

Derived from: ArrangeEnvelopeInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The Arrange2DEnvelopeInput is a base class used to define the various settings common to the envelopes defined by a plane or by profiles and planar faces.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
frameWidth Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
isFlipped | Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectSpacing Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
placementClearance Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Derived Classes

Arrange2DPlaneEnvelopeInput, Arrange2DProfileOrFaceEnvelopeInput

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.classType Method

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.frameWidth Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.frameWidth

# Set the value of the property.
arrange2DEnvelopeInput_var.frameWidth = propertyValue
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DEnvelopeInput_var->frameWidth();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.isFlipped Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.isFlipped

# Set the value of the property.
arrange2DEnvelopeInput_var.isFlipped = propertyValue
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DEnvelopeInput_var->isFlipped();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.isPartialArrangeAllowed Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.isPartialArrangeAllowed

# Set the value of the property.
arrange2DEnvelopeInput_var.isPartialArrangeAllowed = propertyValue
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DEnvelopeInput_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.isValid Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

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

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.isValid
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.objectSpacing Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.objectSpacing

# Set the value of the property.
arrange2DEnvelopeInput_var.objectSpacing = propertyValue
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DEnvelopeInput_var->objectSpacing();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.objectType Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.objectType
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DEnvelopeInput.placementClearance Property

Parent Object: Arrange2DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DEnvelopeInput.h>

Description

Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DEnvelopeInput_var.placementClearance

# Set the value of the property.
arrange2DEnvelopeInput_var.placementClearance = propertyValue
"arrange2DEnvelopeInput_var" is a variable referencing an Arrange2DEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DEnvelopeInput_var->placementClearance();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput Object

Arrange2DPlaneEnvelopeInput Object Preview

Derived from: Arrange2DEnvelopeInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object is used to specify the input needed to define a 2D rectangular envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
envelopeSpacing For a 2D plane envelope, this defines the spacing between envelopes when there is more than one.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
frameWidth Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
isFlipped | Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.
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 length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
objectSpacing Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
originXOffset Gets and sets the X offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
originYOffset Gets and sets the Y offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
placementClearance Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
plane | Gets and sets the construction plane that will be used for this envelope.
quantity Specifies the number of envelopes that can be used. The default value is -1 which means there is no limit.

This value will become a parameter when the arrangement is created. When created with a real value it must be a whole number. You can also use a string where it is interpreted the same as when entered in the command dialog. The expression must result in a unitless whole number. It's also possible to use an equation like "Total / 4" where "Total" is an existing parameter and be evenly divided by four.
width Gets and sets the width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Accessed From

ArrangeFeatureInput.setPlaneEnvelope

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.classType Method

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.envelopeSpacing Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

For a 2D plane envelope, this defines the spacing between envelopes when there is more than one.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.envelopeSpacing

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.envelopeSpacing = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->envelopeSpacing();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.frameWidth Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.frameWidth

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.frameWidth = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->frameWidth();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.isFlipped Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.isFlipped

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.isFlipped = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DPlaneEnvelopeInput_var->isFlipped();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.isPartialArrangeAllowed Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.isPartialArrangeAllowed

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.isPartialArrangeAllowed = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DPlaneEnvelopeInput_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.isValid Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

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

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.isValid
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.length Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.length

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.length = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->length();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.objectSpacing Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.objectSpacing

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.objectSpacing = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->objectSpacing();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.objectType Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.objectType
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.originXOffset Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets the X offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.originXOffset

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.originXOffset = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->originXOffset();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.originYOffset Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets the Y offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.originYOffset

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.originYOffset = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->originYOffset();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.placementClearance Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.placementClearance

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.placementClearance = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->placementClearance();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.plane Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets the construction plane that will be used for this envelope.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.plane

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.plane = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = arrange2DPlaneEnvelopeInput_var->plane();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.quantity Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Specifies the number of envelopes that can be used. The default value is -1 which means there is no limit.

This value will become a parameter when the arrangement is created. When created with a real value it must be a whole number. You can also use a string where it is interpreted the same as when entered in the command dialog. The expression must result in a unitless whole number. It's also possible to use an equation like "Total / 4" where "Total" is an existing parameter and be evenly divided by four.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.quantity

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.quantity = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->quantity();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DPlaneEnvelopeInput.width Property

Parent Object: Arrange2DPlaneEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

Description

Gets and sets the width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DPlaneEnvelopeInput_var.width

# Set the value of the property.
arrange2DPlaneEnvelopeInput_var.width = propertyValue
"arrange2DPlaneEnvelopeInput_var" is a variable referencing an Arrange2DPlaneEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DPlaneEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DPlaneEnvelopeInput_var->width();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput Object

Arrange2DProfileOrFaceEnvelopeInput Object Preview

Derived from: Arrange2DEnvelopeInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object is used to specify the input needed to define an envelope using profiles and planar faces to define the envelope shapes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
frameWidth Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
isFlipped | Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectSpacing Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
placementClearance Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
profilesOrFaces | Gets and sets an array that contains a combination of Profile and planar BRepFace objects that will be used to define the shape of the envelopes.

Accessed From

ArrangeFeatureInput.setProfileOrFaceEnvelope

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.classType Method

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.frameWidth Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.frameWidth

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.frameWidth = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->frameWidth();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.isFlipped Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Specifies if the arrangement of objects is so they are above or X-Y plane of the envelope. Defaults to false so the objects are above the construction plane, profile or face.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.isFlipped

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.isFlipped = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->isFlipped();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.isPartialArrangeAllowed Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.isPartialArrangeAllowed

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.isPartialArrangeAllowed = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.isValid Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

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

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.isValid
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.objectSpacing Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.objectSpacing

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.objectSpacing = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->objectSpacing();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.objectType Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.objectType
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.placementClearance Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.placementClearance

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.placementClearance = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->placementClearance();

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

Property Value

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

Version

Introduced in version January 2025


Arrange2DProfileOrFaceEnvelopeInput.profilesOrFaces Property

Parent Object: Arrange2DProfileOrFaceEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

Description

Gets and sets an array that contains a combination of Profile and planar BRepFace objects that will be used to define the shape of the envelopes.

Syntax

  • Python
  • C++
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange2DProfileOrFaceEnvelopeInput_var.profilesOrFaces

# Set the value of the property.
arrange2DProfileOrFaceEnvelopeInput_var.profilesOrFaces = propertyValue
"arrange2DProfileOrFaceEnvelopeInput_var" is a variable referencing an Arrange2DProfileOrFaceEnvelopeInput object.
#include <Fusion/Arrange/Arrange2DProfileOrFaceEnvelopeInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = arrange2DProfileOrFaceEnvelopeInput_var->profilesOrFaces();

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

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version January 2025


Arrange3DDefinition Object

Arrange3DDefinition Object Preview

Derived from: ArrangeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object defines all of the settings associated with a 3D arrangement.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isCreateCopies | Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Version

Introduced in version January 2025


Arrange3DDefinition.classType Method

Parent Object: Arrange3DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange3DDefinition.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange3DDefinition.isCreateCopies Property

Parent Object: Arrange3DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Description

Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.

Syntax

  • Python
  • C++
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.

# Get the value of the property.
propertyValue = arrange3DDefinition_var.isCreateCopies
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.
#include <Fusion/Arrange/Arrange3DDefinition.h>

// Get the value of the property.
boolean propertyValue = arrange3DDefinition_var->isCreateCopies();

Property Value

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

Version

Introduced in version January 2025


Arrange3DDefinition.isValid Property

Parent Object: Arrange3DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Description

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

Syntax

  • Python
  • C++
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.

# Get the value of the property.
propertyValue = arrange3DDefinition_var.isValid
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.
#include <Fusion/Arrange/Arrange3DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DDefinition.objectType Property

Parent Object: Arrange3DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.

# Get the value of the property.
propertyValue = arrange3DDefinition_var.objectType
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.
#include <Fusion/Arrange/Arrange3DDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DDefinition.solverType Property

Parent Object: Arrange3DDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DDefinition.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.

# Get the value of the property.
propertyValue = arrange3DDefinition_var.solverType
"arrange3DDefinition_var" is a variable referencing an Arrange3DDefinition object.
#include <Fusion/Arrange/Arrange3DDefinition.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrange3DDefinition_var->solverType();

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition Object

Arrange3DEnvelopeDefinition Object Preview

Derived from: ArrangeEnvelopeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The Arrange3DEnvelope object represents an 3D arrange envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
ceilingClearance | Returns the parameter that controls the clearance of the objects from the top of the envelope volume. You can modify the value by using the properties on the returned ModelParameter object.
frameWidth | Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.
height | Returns the parameter that controls the height of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed for this envelope.
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 parameter that controls the length of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.
objectSpacing | Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
originXOffset | Returns the parameter that controls the X offset of the envelope volume from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.
originYOffset | Returns the parameter that controls the Y offset of the envelope volume from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.
parentArrange | Returns the parent ArrangeFeature this envelope is associated with.
placementClearance | Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.
plane | Gets and sets the ConstructionPlane the envelope is defined on.
width | Returns the parameter that controls the width of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.ceilingClearance Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the clearance of the objects from the top of the envelope volume. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.ceilingClearance
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.classType Method

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.frameWidth Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.frameWidth
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.height Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the height of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.height
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.isPartialArrangeAllowed Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Gets and sets if a partial arrange is allowed for this envelope.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.isPartialArrangeAllowed

# Set the value of the property.
arrange3DEnvelopeDefinition_var.isPartialArrangeAllowed = propertyValue
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrange3DEnvelopeDefinition_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.isValid Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

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

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.isValid
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.length Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the length of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.length
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.objectSpacing Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.objectSpacing
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.objectType Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.objectType
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.originXOffset Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the X offset of the envelope volume from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.originXOffset
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.originYOffset Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the Y offset of the envelope volume from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.originYOffset
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.parentArrange Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parent ArrangeFeature this envelope is associated with.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.parentArrange
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrange3DEnvelopeDefinition_var->parentArrange();

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.placementClearance Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.placementClearance
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.plane Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Gets and sets the ConstructionPlane the envelope is defined on.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.plane

# Set the value of the property.
arrange3DEnvelopeDefinition_var.plane = propertyValue
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = arrange3DEnvelopeDefinition_var->plane();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeDefinition.width Property

Parent Object: Arrange3DEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope volume. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeDefinition_var.width
"arrange3DEnvelopeDefinition_var" is a variable referencing an Arrange3DEnvelopeDefinition object.
#include <Fusion/Arrange/Arrange3DEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput Object

Arrange3DEnvelopeInput Object Preview

Derived from: ArrangeEnvelopeInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object is used to specify the input needed to define a 3D envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
ceilingClearance Gets and sets the ceiling clearance of the 3D envelope. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
frameWidth Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
height Gets and sets height of the envelope. This is the size of the envelope as measured along the Z axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.
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 length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
objectSpacing Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
originXOffset Gets and sets the X offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
originYOffset Gets and sets the Y offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
placementClearance Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
plane | Gets and sets the construction plane that will be used for this envelope.
width Gets and sets width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Accessed From

ArrangeFeatureInput.set3DEnvelope

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.ceilingClearance Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets the ceiling clearance of the 3D envelope. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.ceilingClearance

# Set the value of the property.
arrange3DEnvelopeInput_var.ceilingClearance = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->ceilingClearance();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.classType Method

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.frameWidth Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.frameWidth

# Set the value of the property.
arrange3DEnvelopeInput_var.frameWidth = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->frameWidth();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.height Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets height of the envelope. This is the size of the envelope as measured along the Z axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.height

# Set the value of the property.
arrange3DEnvelopeInput_var.height = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->height();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.isPartialArrangeAllowed Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.isPartialArrangeAllowed

# Set the value of the property.
arrange3DEnvelopeInput_var.isPartialArrangeAllowed = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrange3DEnvelopeInput_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.isValid Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

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

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.isValid
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.length Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.length

# Set the value of the property.
arrange3DEnvelopeInput_var.length = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->length();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.objectSpacing Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.objectSpacing

# Set the value of the property.
arrange3DEnvelopeInput_var.objectSpacing = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->objectSpacing();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.objectType Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.objectType
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.originXOffset Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets the X offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.originXOffset

# Set the value of the property.
arrange3DEnvelopeInput_var.originXOffset = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->originXOffset();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.originYOffset Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets the Y offset of the envelope from the origin of the construction plane. This value defaults to zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.originYOffset

# Set the value of the property.
arrange3DEnvelopeInput_var.originYOffset = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->originYOffset();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.placementClearance Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.placementClearance

# Set the value of the property.
arrange3DEnvelopeInput_var.placementClearance = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->placementClearance();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.plane Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets the construction plane that will be used for this envelope.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.plane

# Set the value of the property.
arrange3DEnvelopeInput_var.plane = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = arrange3DEnvelopeInput_var->plane();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DEnvelopeInput.width Property

Parent Object: Arrange3DEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DEnvelopeInput.h>

Description

Gets and sets width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Syntax

  • Python
  • C++
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.

# Get the value of the property.
propertyValue = arrange3DEnvelopeInput_var.width

# Set the value of the property.
arrange3DEnvelopeInput_var.width = propertyValue
"arrange3DEnvelopeInput_var" is a variable referencing an Arrange3DEnvelopeInput object.
#include <Fusion/Arrange/Arrange3DEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrange3DEnvelopeInput_var->width();

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope Object

Arrange3DResultEnvelope Object Preview

Derived from: ArrangeResultEnvelope Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents the arrange envelope result of a 3D arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
boundingBox | The bounding box of this result. The coordinates are defined with respect to the root component base coordinate system.
envelopeDefinition Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
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 envelope as seen in the browser.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrences | Returns a collection object of the occurrences in this envelope.
parentFeature | Returns the ArrangeFeature object this result is for.

Version

Introduced in version January 2025


Arrange3DResultEnvelope.boundingBox Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

The bounding box of this result. The coordinates are defined with respect to the root component base coordinate system.

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.boundingBox
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = arrange3DResultEnvelope_var->boundingBox();

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.classType Method

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

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

Return Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.envelopeDefinition Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.envelopeDefinition
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeEnvelopeDefinition> propertyValue = arrange3DResultEnvelope_var->envelopeDefinition();

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.isValid Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

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

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.isValid
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.name Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

Gets and sets the name of the envelope as seen in the browser.

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

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

# Set the value of the property.
arrange3DResultEnvelope_var.name = propertyValue
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

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

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.objectType Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.objectType
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

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

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.occurrences Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

Returns a collection object of the occurrences in this envelope.

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.occurrences
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeOccurrenceResults> propertyValue = arrange3DResultEnvelope_var->occurrences();

Property Value

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

Version

Introduced in version January 2025


Arrange3DResultEnvelope.parentFeature Property

Parent Object: Arrange3DResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/Arrange3DResultEnvelope.h>

Description

Returns the ArrangeFeature object this result is for.

Syntax

  • Python
  • C++
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.

# Get the value of the property.
propertyValue = arrange3DResultEnvelope_var.parentFeature
"arrange3DResultEnvelope_var" is a variable referencing an Arrange3DResultEnvelope object.
#include <Fusion/Arrange/Arrange3DResultEnvelope.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent Object

ArrangeComponent Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Defines a component within an arrangement. This specifies an occurrence along with additional arrangement information. This object is the API equivalent of a single line within the component list shown in the Arrange dialog. This object is used for both the creation of a new Arrange feature and querying and modifying an existing Arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 ArrangeComponent from the arrangement.
setRotationUsingEdge | Sets the rotation angle using the specified edge such that the edge is pointing in the zero rotation angle. This is a convenience method to set the rotation angle. The rotation property can be used to accomplish the same result. This is only valid for 2D True Shape arrangements and will fail for 2D rectangular and 3D arrangements.

Properties

Name | Description
isDirectionFlipped Specifies if the direction is flipped from it's default direction.

For a component defined by a face the default direction is defined by the selected face and the isGlobalDirectionFaceUp property of the Arrange2DDefinition associated with the parent ArrangeFeature object.

For a component defined by an occurrence, the default direction orients the occurrence such that the largest face points downward.

For a 3D arrange, this property is ignored and the orientation of the part is the same as it exists in the original assembly.
isFiller Specifies if this component will be used to fill any left over empty space in the available envelopes.

This is only valid for 2D True Shape arrangements and is ignored for 2D rectangular and 3D arrangements.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrence | Returns the Occurrence associated with this ArrangeComponent. If an Occurrence was used to define this ArrangeComponent, this will return the same thing as the occurrenceOrFace. If a BRepFace was used to define this ArrangeComponent, this will return the Occurrence the face is in. This is a convenience property to make accessing the occurrence simpler.
occurrenceOrFace | The BRepFace or Occurrence that was used to identify this ArrangeComponent.
parentArrangeFeature | Returns the ArrangeFeature this ArrangeComponent is associated with. This property returns null in the case where a feature hasn't been created yet and there is only an ArrangeFeatureInput.
priority Specifies the nesting priority for this component.

For a 3D arrange, this property is ignored and setting it will fail.
quantity Specifies the quantity of this component to use in the arrange. This defaults to -1, which indicates that the global quantity is to be used.

For a 3D arrange, this property is ignored and the quantity is always one.
rotation Gets and sets the rotation angle of this ArrangeComponent. The value is defined in Radians, is relative to the zero direction vector returned by the zeroDirectionVector property, and is in a counterclockwise direction.

This is only valid for 2D True Shape arrangements and is ignored for 2D rectangular and 3D arrangements.
rotationType Gets and sets the rotation type for this ArrangeComponent. This defaults to use the global rotation type defined for the arrangement.

For a 3D arrange, this property is ignored.
upDirection | Returns a vector that is the up direction of this ArrangeComponent.
zeroDirection | Returns a vector that is the zero degree direction of this ArrangeComponent.

Accessed From

ArrangeComponents.add, ArrangeComponents.item, ArrangeFeature.unusedComponents, ArrangeOccurrenceResult.arrangeComponent

Version

Introduced in version January 2025


ArrangeComponent.classType Method

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeComponent.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeComponent.deleteMe Method

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Deletes this ArrangeComponent from the arrangement.

Syntax

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

#include <Fusion/Arrange/ArrangeComponent.h>

returnValue = arrangeComponent_var->deleteMe();

Return Value

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

Version

Introduced in version January 2025


ArrangeComponent.isDirectionFlipped Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Specifies if the direction is flipped from it's default direction.

For a component defined by a face the default direction is defined by the selected face and the isGlobalDirectionFaceUp property of the Arrange2DDefinition associated with the parent ArrangeFeature object.

For a component defined by an occurrence, the default direction orients the occurrence such that the largest face points downward.

For a 3D arrange, this property is ignored and the orientation of the part is the same as it exists in the original assembly.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.isDirectionFlipped

# Set the value of the property.
arrangeComponent_var.isDirectionFlipped = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
boolean propertyValue = arrangeComponent_var->isDirectionFlipped();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.isFiller Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Specifies if this component will be used to fill any left over empty space in the available envelopes.

This is only valid for 2D True Shape arrangements and is ignored for 2D rectangular and 3D arrangements.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.isFiller

# Set the value of the property.
arrangeComponent_var.isFiller = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
boolean propertyValue = arrangeComponent_var->isFiller();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.isValid Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

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

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.isValid
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.objectType Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.objectType
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.occurrence Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Returns the Occurrence associated with this ArrangeComponent. If an Occurrence was used to define this ArrangeComponent, this will return the same thing as the occurrenceOrFace. If a BRepFace was used to define this ArrangeComponent, this will return the Occurrence the face is in. This is a convenience property to make accessing the occurrence simpler.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.occurrence
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = arrangeComponent_var->occurrence();

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.occurrenceOrFace Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

The BRepFace or Occurrence that was used to identify this ArrangeComponent.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.occurrenceOrFace
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.parentArrangeFeature Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Returns the ArrangeFeature this ArrangeComponent is associated with. This property returns null in the case where a feature hasn't been created yet and there is only an ArrangeFeatureInput.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.parentArrangeFeature
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeComponent_var->parentArrangeFeature();

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.priority Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Specifies the nesting priority for this component.

For a 3D arrange, this property is ignored and setting it will fail.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.priority

# Set the value of the property.
arrangeComponent_var.priority = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
ArrangePriorities propertyValue = arrangeComponent_var->priority();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.quantity Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Specifies the quantity of this component to use in the arrange. This defaults to -1, which indicates that the global quantity is to be used.

For a 3D arrange, this property is ignored and the quantity is always one.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.quantity

# Set the value of the property.
arrangeComponent_var.quantity = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
integer propertyValue = arrangeComponent_var->quantity();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.rotation Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Gets and sets the rotation angle of this ArrangeComponent. The value is defined in Radians, is relative to the zero direction vector returned by the zeroDirectionVector property, and is in a counterclockwise direction.

This is only valid for 2D True Shape arrangements and is ignored for 2D rectangular and 3D arrangements.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.rotation

# Set the value of the property.
arrangeComponent_var.rotation = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.rotationType Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Gets and sets the rotation type for this ArrangeComponent. This defaults to use the global rotation type defined for the arrangement.

For a 3D arrange, this property is ignored.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.rotationType

# Set the value of the property.
arrangeComponent_var.rotationType = propertyValue
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

// Get the value of the property.
ArrangeRotationTypes propertyValue = arrangeComponent_var->rotationType();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.setRotationUsingEdge Method

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Sets the rotation angle using the specified edge such that the edge is pointing in the zero rotation angle. This is a convenience method to set the rotation angle. The rotation property can be used to accomplish the same result.

This is only valid for 2D True Shape arrangements and will fail for 2D rectangular and 3D arrangements.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
returnValue = arrangeComponent_var.setRotationUsingEdge(edge)
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

#include <Fusion/Arrange/ArrangeComponent.h>

returnValue = arrangeComponent_var->setRotationUsingEdge(edge);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
edge | BRepEdge | The BRepEdge object being used to define rotation of the component.

Version

Introduced in version January 2025


ArrangeComponent.upDirection Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Returns a vector that is the up direction of this ArrangeComponent.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.upDirection
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponent.zeroDirection Property

Parent Object: ArrangeComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponent.h>

Description

Returns a vector that is the zero degree direction of this ArrangeComponent.

Syntax

  • Python
  • C++
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.

# Get the value of the property.
propertyValue = arrangeComponent_var.zeroDirection
"arrangeComponent_var" is a variable referencing an ArrangeComponent object.
#include <Fusion/Arrange/ArrangeComponent.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponents Object

ArrangeComponents Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The collection of ArrangeComponent objects associated with an arrangement. This provides access to existing ArrangeComponent objects and supports adding new components to the the arrangement. An ArrangeComponent object defines an occurrence along with additional arrangement information. This object is used for both the creation of a new Arrange feature and querying and modifying an existing Arrange feature.

Methods

Name | Description
add | Adds a new ArrangeComponent object 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 | Returns an ArrangeComponent object using an index into the collection.

Properties

Name | Description
count | Returns the number of ArrangeComponent 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangeFeature.arrangeComponents, ArrangeFeatureInput.arrangeComponents

Version

Introduced in version January 2025


ArrangeComponents.add Method

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

Adds a new ArrangeComponent object to the collection.

Syntax

  • Python
  • C++
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.
returnValue = arrangeComponents_var.add(occurrenceOrFace)
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.

#include <Fusion/Arrange/ArrangeComponents.h>

returnValue = arrangeComponents_var->add(occurrenceOrFace);

Return Value

Type | Description
ArrangeComponent | Returns the created ArrangeComponent where you can use properties on it to define the various other settings supported to control how the component is arranged.

Parameters

Name | Type | Description
occurrenceOrFace | Base | For a 2D arrange this can be an Occurrence or BRepFace object that defines which component to use. If a BRepFace object is used, the face is used to orient the part in the arrangement and will face up or down depending on the isGlobalDirectionFaceUp property on the ArrangeFeature2DInput object. For a 2D arrange, if an Occurrence is provided, the Occurrence will be oriented in the arrangement such that the largest face points downward. For a 3D arrange this can be an Occurrence or BRepFace object but if a BRepFace is provided it does not define the orientation but is only used to get the parent Occurrence. For a 3D arrange the arranged occurrences have the same orientation as the original occurrence but are positioned within the 3D envelope.

Version

Introduced in version January 2025


ArrangeComponents.classType Method

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeComponents.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeComponents.count Property

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

Returns the number of ArrangeComponent objects in the collection.

Syntax

  • Python
  • C++
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.

# Get the value of the property.
propertyValue = arrangeComponents_var.count
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.
#include <Fusion/Arrange/ArrangeComponents.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponents.isValid Property

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

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

Syntax

  • Python
  • C++
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.

# Get the value of the property.
propertyValue = arrangeComponents_var.isValid
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.
#include <Fusion/Arrange/ArrangeComponents.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeComponents.item Method

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

Returns an ArrangeComponent object using an index into the collection.

Syntax

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

#include <Fusion/Arrange/ArrangeComponents.h>

returnValue = arrangeComponents_var->item(index);

Return Value

Type | Description
ArrangeComponent | 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 2025


ArrangeComponents.objectType Property

Parent Object: ArrangeComponents

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeComponents.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.

# Get the value of the property.
propertyValue = arrangeComponents_var.objectType
"arrangeComponents_var" is a variable referencing an ArrangeComponents object.
#include <Fusion/Arrange/ArrangeComponents.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition Object

ArrangeDefinition Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeDefinition object is the base class for the ArrangeDefinition2D and ArrangeDefinition3D objects. It provides access to the information that defines an existing Arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isCreateCopies | Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Accessed From

ArrangeFeature.definition

Derived Classes

Arrange2DDefinition, Arrange3DDefinition

Version

Introduced in version January 2025


ArrangeDefinition.classType Method

Parent Object: ArrangeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeDefinition.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeDefinition.isCreateCopies Property

Parent Object: ArrangeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Description

Gets if the original components were moved to create the arrangement or copied were created. This value can only be set when creating a new arrangement.

Syntax

  • Python
  • C++
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.

# Get the value of the property.
propertyValue = arrangeDefinition_var.isCreateCopies
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.
#include <Fusion/Arrange/ArrangeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinition_var->isCreateCopies();

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition.isValid Property

Parent Object: ArrangeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Description

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

Syntax

  • Python
  • C++
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.

# Get the value of the property.
propertyValue = arrangeDefinition_var.isValid
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.
#include <Fusion/Arrange/ArrangeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition.objectType Property

Parent Object: ArrangeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.

# Get the value of the property.
propertyValue = arrangeDefinition_var.objectType
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.
#include <Fusion/Arrange/ArrangeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition.solverType Property

Parent Object: ArrangeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.

# Get the value of the property.
propertyValue = arrangeDefinition_var.solverType
"arrangeDefinition_var" is a variable referencing an ArrangeDefinition object.
#include <Fusion/Arrange/ArrangeDefinition.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrangeDefinition_var->solverType();

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput Object

ArrangeDefinition2DInput Object Preview

Derived from: ArrangeDefinitionInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object defines all of the settings associated with a 2D arrangement. This is used for both rectangular and true shape arrangements, but some properties are ignored in some cases.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
globalQuantity Gets and sets the global quantity, which is the default quantity value for components. This defaults to 1.

This value will become a parameter when the arrangement is created. When created with a real value it must be a whole number. You can also use a string where it is interpreted the same as when entered in the command dialog. The expression must result in a unitless whole number. It's also possible to use an equation like "Total / 4" where "Total" is an existing parameter and be evenly divided by four.
globalRotation | Gets and sets the global rotation type. This defaults to AllRotationsArrangeRotationType.
grainDirection Defines the angle of the grain direction of the envelope. This is only used when the solver type is True Shape. An angle of 0 is in the X direction of the envelope, and the default value is zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in radians. If you use a string, it is evaluated the same as a value would be in the command dialog and uses degrees as the units. For example, if you specify "45" it will result in a 45 degree grain direction. Using a string you can also define an equation for the expression, "PartAngle / 2" where "PartAngle"
isCreateCopies | Gets and set if the original components will be moved or copied to create the arrangement. This defaults to true.
isGlobalDirectionFaceUp | Gets and sets the global direction for input faces. When true, the components specified by selecting a face will be oriented such that the selection face will be oriented upward in the arrangement. This defaults to true.
isPartInPartAllowed Gets and sets if parts can be nested within void areas of other parts. This defaults to true.

This is only used when the solver type is 2D True Shape and is ignored for 2D Rectangular solutions.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Version

Introduced in version January 2025


ArrangeDefinition2DInput.classType Method

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.globalQuantity Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets and sets the global quantity, which is the default quantity value for components. This defaults to 1.

This value will become a parameter when the arrangement is created. When created with a real value it must be a whole number. You can also use a string where it is interpreted the same as when entered in the command dialog. The expression must result in a unitless whole number. It's also possible to use an equation like "Total / 4" where "Total" is an existing parameter and be evenly divided by four.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.globalQuantity

# Set the value of the property.
arrangeDefinition2DInput_var.globalQuantity = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrangeDefinition2DInput_var->globalQuantity();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.globalRotation Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets and sets the global rotation type. This defaults to AllRotationsArrangeRotationType.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.globalRotation

# Set the value of the property.
arrangeDefinition2DInput_var.globalRotation = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
ArrangeRotationTypes propertyValue = arrangeDefinition2DInput_var->globalRotation();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.grainDirection Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Defines the angle of the grain direction of the envelope. This is only used when the solver type is True Shape. An angle of 0 is in the X direction of the envelope, and the default value is zero.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in radians. If you use a string, it is evaluated the same as a value would be in the command dialog and uses degrees as the units. For example, if you specify "45" it will result in a 45 degree grain direction. Using a string you can also define an equation for the expression, "PartAngle / 2" where "PartAngle"

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.grainDirection

# Set the value of the property.
arrangeDefinition2DInput_var.grainDirection = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrangeDefinition2DInput_var->grainDirection();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.isCreateCopies Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets and set if the original components will be moved or copied to create the arrangement. This defaults to true.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.isCreateCopies

# Set the value of the property.
arrangeDefinition2DInput_var.isCreateCopies = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinition2DInput_var->isCreateCopies();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.isGlobalDirectionFaceUp Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets and sets the global direction for input faces. When true, the components specified by selecting a face will be oriented such that the selection face will be oriented upward in the arrangement. This defaults to true.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.isGlobalDirectionFaceUp

# Set the value of the property.
arrangeDefinition2DInput_var.isGlobalDirectionFaceUp = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinition2DInput_var->isGlobalDirectionFaceUp();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.isPartInPartAllowed Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets and sets if parts can be nested within void areas of other parts. This defaults to true.

This is only used when the solver type is 2D True Shape and is ignored for 2D Rectangular solutions.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.isPartInPartAllowed

# Set the value of the property.
arrangeDefinition2DInput_var.isPartInPartAllowed = propertyValue
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinition2DInput_var->isPartInPartAllowed();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.isValid Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

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

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.isValid
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.objectType Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.objectType
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition2DInput.solverType Property

Parent Object: ArrangeDefinition2DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition2DInput.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition2DInput_var.solverType
"arrangeDefinition2DInput_var" is a variable referencing an ArrangeDefinition2DInput object.
#include <Fusion/Arrange/ArrangeDefinition2DInput.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrangeDefinition2DInput_var->solverType();

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition3DInput Object

ArrangeDefinition3DInput Object Preview

Derived from: ArrangeDefinitionInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object defines all of the settings associated with a 3D arrangement.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isCreateCopies | Gets and set if the original components will be moved or copied to create the arrangement. This 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Version

Introduced in version January 2025


ArrangeDefinition3DInput.classType Method

Parent Object: ArrangeDefinition3DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeDefinition3DInput.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeDefinition3DInput.isCreateCopies Property

Parent Object: ArrangeDefinition3DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Description

Gets and set if the original components will be moved or copied to create the arrangement. This defaults to true.

Syntax

  • Python
  • C++
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition3DInput_var.isCreateCopies

# Set the value of the property.
arrangeDefinition3DInput_var.isCreateCopies = propertyValue
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.
#include <Fusion/Arrange/ArrangeDefinition3DInput.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinition3DInput_var->isCreateCopies();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition3DInput.isValid Property

Parent Object: ArrangeDefinition3DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Description

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

Syntax

  • Python
  • C++
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition3DInput_var.isValid
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.
#include <Fusion/Arrange/ArrangeDefinition3DInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition3DInput.objectType Property

Parent Object: ArrangeDefinition3DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition3DInput_var.objectType
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.
#include <Fusion/Arrange/ArrangeDefinition3DInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinition3DInput.solverType Property

Parent Object: ArrangeDefinition3DInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinition3DInput.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.

# Get the value of the property.
propertyValue = arrangeDefinition3DInput_var.solverType
"arrangeDefinition3DInput_var" is a variable referencing an ArrangeDefinition3DInput object.
#include <Fusion/Arrange/ArrangeDefinition3DInput.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrangeDefinition3DInput_var->solverType();

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinitionInput Object

ArrangeDefinitionInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeDefinition object is the base class for the ArrangeDefinition2D and ArrangeDefinition3D objects. It provides access to the information that defines an existing Arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isCreateCopies | Gets and set if the original components will be moved or copied to create the arrangement. This 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Gets the type of arrange feature defined by this definition.

Accessed From

ArrangeFeatureInput.definition

Derived Classes

ArrangeDefinition2DInput, ArrangeDefinition3DInput

Version

Introduced in version January 2025


ArrangeDefinitionInput.classType Method

Parent Object: ArrangeDefinitionInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeDefinitionInput.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeDefinitionInput.isCreateCopies Property

Parent Object: ArrangeDefinitionInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Description

Gets and set if the original components will be moved or copied to create the arrangement. This defaults to true.

Syntax

  • Python
  • C++
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.

# Get the value of the property.
propertyValue = arrangeDefinitionInput_var.isCreateCopies

# Set the value of the property.
arrangeDefinitionInput_var.isCreateCopies = propertyValue
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.
#include <Fusion/Arrange/ArrangeDefinitionInput.h>

// Get the value of the property.
boolean propertyValue = arrangeDefinitionInput_var->isCreateCopies();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinitionInput.isValid Property

Parent Object: ArrangeDefinitionInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Description

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

Syntax

  • Python
  • C++
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.

# Get the value of the property.
propertyValue = arrangeDefinitionInput_var.isValid
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.
#include <Fusion/Arrange/ArrangeDefinitionInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinitionInput.objectType Property

Parent Object: ArrangeDefinitionInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.

# Get the value of the property.
propertyValue = arrangeDefinitionInput_var.objectType
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.
#include <Fusion/Arrange/ArrangeDefinitionInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeDefinitionInput.solverType Property

Parent Object: ArrangeDefinitionInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeDefinitionInput.h>

Description

Gets the type of arrange feature defined by this definition.

Syntax

  • Python
  • C++
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.

# Get the value of the property.
propertyValue = arrangeDefinitionInput_var.solverType
"arrangeDefinitionInput_var" is a variable referencing an ArrangeDefinitionInput object.
#include <Fusion/Arrange/ArrangeDefinitionInput.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrangeDefinitionInput_var->solverType();

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition Object

ArrangeEnvelopeDefinition Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeEnvelope object is the base class for the different types of arrangement envelopes and provides access to the information that defines the envelope(s). This defines the settings of the envelope and the EnvelopeResult provides access to the resulting envelope and its contents.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
frameWidth | Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed for this envelope.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectSpacing | Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentArrange | Returns the parent ArrangeFeature this envelope is associated with.
placementClearance | Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.

Accessed From

Arrange3DResultEnvelope.envelopeDefinition, ArrangeFeature.envelopeDefinition, ArrangePlaneResultEnvelope.envelopeDefinition, ArrangeProfileOrFaceResultEnvelope.envelopeDefinition, ArrangeResultEnvelope.envelopeDefinition

Derived Classes

Arrange3DEnvelopeDefinition, ArrangePlaneEnvelopeDefinition, ArrangeProfileOrFaceEnvelopeDefinition

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.classType Method

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.frameWidth Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.frameWidth
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.isPartialArrangeAllowed Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

Gets and sets if a partial arrange is allowed for this envelope.

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.isPartialArrangeAllowed

# Set the value of the property.
arrangeEnvelopeDefinition_var.isPartialArrangeAllowed = propertyValue
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangeEnvelopeDefinition_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.isValid Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

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

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.isValid
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.objectSpacing Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.objectSpacing
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.objectType Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.objectType
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.parentArrange Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

Returns the parent ArrangeFeature this envelope is associated with.

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.parentArrange
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeEnvelopeDefinition_var->parentArrange();

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeDefinition.placementClearance Property

Parent Object: ArrangeEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

Description

Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeEnvelopeDefinition_var.placementClearance
"arrangeEnvelopeDefinition_var" is a variable referencing an ArrangeEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeEnvelopeDefinition.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput Object

ArrangeEnvelopeInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The base class used to define the arrange envelope when creating an Arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
frameWidth Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectSpacing Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
placementClearance Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Derived Classes

Arrange2DEnvelopeInput, Arrange3DEnvelopeInput

Version

Introduced in version January 2025


ArrangeEnvelopeInput.classType Method

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.frameWidth Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

Specifies the minimum distance between the components in the arrangement and the envelope frame.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.frameWidth

# Set the value of the property.
arrangeEnvelopeInput_var.frameWidth = propertyValue
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrangeEnvelopeInput_var->frameWidth();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.isPartialArrangeAllowed Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

Gets and sets if a partial arrange is allowed. If true, it will still create a result when there is not enough space on the envelope to fit all of the components. Components are arranged until all the available space is used up. The components that were not included in the partial arrangement are highlighted in the components list. If the envelope size increases, the arrangement recalculates to include the components that did not previously fit in the arrangement.

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.isPartialArrangeAllowed

# Set the value of the property.
arrangeEnvelopeInput_var.isPartialArrangeAllowed = propertyValue
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

// Get the value of the property.
boolean propertyValue = arrangeEnvelopeInput_var->isPartialArrangeAllowed();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.isValid Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

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

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.isValid
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.objectSpacing Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

Specifies the minimum clearance between components in the arrangement. for a 3D layout this also specified the distance between the components in the Z direction.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.objectSpacing

# Set the value of the property.
arrangeEnvelopeInput_var.objectSpacing = propertyValue
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrangeEnvelopeInput_var->objectSpacing();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.objectType Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.objectType
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeEnvelopeInput.placementClearance Property

Parent Object: ArrangeEnvelopeInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeEnvelopeInput.h>

Description

Specifies the distance of the components and the bottom of the envelope. This raises the components above the X-Y plane of the specified construction plane.

This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. You can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "ToolDia + 2 mm" where "ToolDia" is an existing parameter.

Syntax

  • Python
  • C++
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.

# Get the value of the property.
propertyValue = arrangeEnvelopeInput_var.placementClearance

# Set the value of the property.
arrangeEnvelopeInput_var.placementClearance = propertyValue
"arrangeEnvelopeInput_var" is a variable referencing an ArrangeEnvelopeInput object.
#include <Fusion/Arrange/ArrangeEnvelopeInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = arrangeEnvelopeInput_var->placementClearance();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature Object

ArrangeFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents an Arrange feature within a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
arrangeComponents Returns the collection of ArrangeComponent objects that are being arranged.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
arrangeStatistics | Returns statistics about the arrangement in JSON format as a string. Each item in the JSON is identified with its English name, and the current localized name is also provided. The values follow the API rules, where all length values are in centimeters, and areas are in square centimeters. The returned JSON may include additional values in the future, so code consuming this output should be tolerant of new fields.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
definition Returns a definition object that provides access to the information defining this arrange feature and provides access to the resulting arrangement of occurrences.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
envelopeDefinition Returns the envelope definition associated with this arrangement.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
resultEnvelopes | Returns the resulting envelopes and their contents.
timelineObject | Returns the timeline object associated with this feature.
unusedComponents Returns an array of ArrangeComponent objects that did not fit in the arrangement. This is most useful in the case where partial arrange has been enabled, which means some components may have been arranged and others were left out.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Accessed From

Arrange3DEnvelopeDefinition.parentArrange, Arrange3DResultEnvelope.parentFeature, ArrangeComponent.parentArrangeFeature, ArrangeEnvelopeDefinition.parentArrange, ArrangeFeature.createForAssemblyContext, ArrangeFeature.nativeObject, ArrangeFeatures.add, ArrangeFeatures.item, ArrangeFeatures.itemByName, ArrangePlaneEnvelopeDefinition.parentArrange, ArrangePlaneResultEnvelope.parentFeature, ArrangeProfileOrFaceEnvelopeDefinition.parentArrange, ArrangeProfileOrFaceResultEnvelope.parentFeature, ArrangeResultEnvelope.parentFeature

Version

Introduced in version January 2025


ArrangeFeature.arrangeComponents Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the collection of ArrangeComponent objects that are being arranged.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.arrangeComponents
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<ArrangeComponents> propertyValue = arrangeFeature_var->arrangeComponents();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.arrangeStatistics Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns statistics about the arrangement in JSON format as a string. Each item in the JSON is identified with its English name, and the current localized name is also provided. The values follow the API rules, where all length values are in centimeters, and areas are in square centimeters. The returned JSON may include additional values in the future, so code consuming this output should be tolerant of new fields.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.arrangeStatistics
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
string propertyValue = arrangeFeature_var->arrangeStatistics();

Property Value

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

Version

Introduced in version July 2025


ArrangeFeature.assemblyContext Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.assemblyContext
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = arrangeFeature_var->assemblyContext();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.attributes Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.attributes
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = arrangeFeature_var->attributes();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.baseFeature Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.baseFeature
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = arrangeFeature_var->baseFeature();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.bodies Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.bodies
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = arrangeFeature_var->bodies();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.classType Method

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

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

Syntax

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

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

#include <Fusion/Arrange/ArrangeFeature.h>

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

Return Value

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

Version

Introduced in version January 2025


ArrangeFeature.createForAssemblyContext Method

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
returnValue = arrangeFeature_var.createForAssemblyContext(occurrence)
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

#include <Fusion/Arrange/ArrangeFeature.h>

returnValue = arrangeFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ArrangeFeature | 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 2025


ArrangeFeature.definition Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns a definition object that provides access to the information defining this arrange feature and provides access to the resulting arrangement of occurrences.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.definition
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<ArrangeDefinition> propertyValue = arrangeFeature_var->definition();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.deleteMe Method

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

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

#include <Fusion/Arrange/ArrangeFeature.h>

returnValue = arrangeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2025


ArrangeFeature.dissolve Method

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
returnValue = arrangeFeature_var.dissolve()
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

#include <Fusion/Arrange/ArrangeFeature.h>

returnValue = arrangeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2025


ArrangeFeature.entityToken Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.entityToken
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
string propertyValue = arrangeFeature_var->entityToken();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.envelopeDefinition Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the envelope definition associated with this arrangement.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.envelopeDefinition
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<ArrangeEnvelopeDefinition> propertyValue = arrangeFeature_var->envelopeDefinition();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.errorOrWarningMessage Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.errorOrWarningMessage
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
string propertyValue = arrangeFeature_var->errorOrWarningMessage();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.faces Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.faces
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = arrangeFeature_var->faces();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.healthState Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.healthState
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = arrangeFeature_var->healthState();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.isParametric Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.isParametric
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
boolean propertyValue = arrangeFeature_var->isParametric();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.isSuppressed Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.isSuppressed

# Set the value of the property.
arrangeFeature_var.isSuppressed = propertyValue
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
boolean propertyValue = arrangeFeature_var->isSuppressed();

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

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.isValid Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

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

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.isValid
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

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

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.linkedFeatures Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.linkedFeatures
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = arrangeFeature_var->linkedFeatures();

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.name Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

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

# Set the value of the property.
arrangeFeature_var.name = propertyValue
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

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

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

Property Value

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

Version

Introduced in version January 2025


ArrangeFeature.nativeObject Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

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.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.nativeObject
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeFeature_var->nativeObject();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangeFeature.objectType Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.objectType
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
string propertyValue = arrangeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeFeature.parentComponent Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.parentComponent
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = arrangeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2025


ArrangeFeature.resultEnvelopes Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the resulting envelopes and their contents.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.resultEnvelopes
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<ArrangeResultEnvelopes> propertyValue = arrangeFeature_var->resultEnvelopes();

Property Value

This is a read only property whose value is an ArrangeResultEnvelopes.

Version

Introduced in version January 2025


ArrangeFeature.timelineObject Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.timelineObject
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = arrangeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2025


ArrangeFeature.unusedComponents Property

Parent Object: ArrangeFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeature.h>

Description

Returns an array of ArrangeComponent objects that did not fit in the arrangement. This is most useful in the case where partial arrange has been enabled, which means some components may have been arranged and others were left out.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.

# Get the value of the property.
propertyValue = arrangeFeature_var.unusedComponents
"arrangeFeature_var" is a variable referencing an ArrangeFeature object.
#include <Fusion/Arrange/ArrangeFeature.h>

// Get the value of the property.
std::vector<Ptr<ArrangeComponent>> propertyValue = arrangeFeature_var->unusedComponents();

Property Value

This is a read only property whose value is an array of type ArrangeComponent.

Version

Introduced in version January 2025


ArrangeFeatureInput Object

ArrangeFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeFeatureInput object is the base class for the different types of input objects used to create an arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
set3DEnvelope | Defines a 3D envelope input. Only a single envelope input can exist at time. Calling this method will cause any existing envelope input object to be invalid.
setPlaneEnvelope | Defines an envelope input defined by a plane for the arrange feature. Only a single envelope input can exist at a time. Calling this method will cause any existing envelope object input that has been created for this input to be invalid.
setProfileOrFaceEnvelope | Defines an envelope defined by one or more profiles or planar faces. Only a single envelope input can exist at time. Calling this method will cause any existing envelope input object to be invalid.

Properties

Name | Description
arrangeComponents | Returns the ArrangeComponents object associated with this input. Use this to add and define the components that will be arranged.
definition | Returns a definition input object that provides access to the information to define an arrange feature. This will return different types of definition inputs depending on the solver type specified when creating the input.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
solverType | Returns the arrange feature solver type defined by this input.

Accessed From

ArrangeFeatures.createInput

Version

Introduced in version January 2025


ArrangeFeatureInput.arrangeComponents Property

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Returns the ArrangeComponents object associated with this input. Use this to add and define the components that will be arranged.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

# Get the value of the property.
propertyValue = arrangeFeatureInput_var.arrangeComponents
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
#include <Fusion/Arrange/ArrangeFeatureInput.h>

// Get the value of the property.
Ptr<ArrangeComponents> propertyValue = arrangeFeatureInput_var->arrangeComponents();

Property Value

This is a read only property whose value is an ArrangeComponents.

Version

Introduced in version January 2025


ArrangeFeatureInput.classType Method

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeFeatureInput.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeFeatureInput.h>

returnValue = adsk::fusion::ArrangeFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeFeatureInput.definition Property

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Returns a definition input object that provides access to the information to define an arrange feature. This will return different types of definition inputs depending on the solver type specified when creating the input.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

# Get the value of the property.
propertyValue = arrangeFeatureInput_var.definition
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
#include <Fusion/Arrange/ArrangeFeatureInput.h>

// Get the value of the property.
Ptr<ArrangeDefinitionInput> propertyValue = arrangeFeatureInput_var->definition();

Property Value

This is a read only property whose value is an ArrangeDefinitionInput.

Version

Introduced in version January 2025


ArrangeFeatureInput.isValid Property

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

# Get the value of the property.
propertyValue = arrangeFeatureInput_var.isValid
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
#include <Fusion/Arrange/ArrangeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = arrangeFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeFeatureInput.objectType Property

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

# Get the value of the property.
propertyValue = arrangeFeatureInput_var.objectType
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
#include <Fusion/Arrange/ArrangeFeatureInput.h>

// Get the value of the property.
string propertyValue = arrangeFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeFeatureInput.set3DEnvelope Method

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Defines a 3D envelope input. Only a single envelope input can exist at time. Calling this method will cause any existing envelope input object to be invalid.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
returnValue = arrangeFeatureInput_var.set3DEnvelope(plane, length, width, height)
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

#include <Fusion/Arrange/ArrangeFeatureInput.h>

returnValue = arrangeFeatureInput_var->set3DEnvelope(plane, length, width, height);

Return Value

Type | Description
Arrange3DEnvelopeInput | Returns the created Arrange3DEnvelopeInput object or null if the creation fails.

Parameters

Name | Type | Description
plane | ConstructionPlane | The Construction plane the envelope will be on.
length | ValueInput | The length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane. This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
width | ValueInput | The width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane. This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
height | ValueInput | The height of the envelope. This is the size of the envelope as measured along the Z axis of the specified construction plane. This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Version

Introduced in version January 2025


ArrangeFeatureInput.setPlaneEnvelope Method

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Defines an envelope input defined by a plane for the arrange feature. Only a single envelope input can exist at a time. Calling this method will cause any existing envelope object input that has been created for this input to be invalid.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
returnValue = arrangeFeatureInput_var.setPlaneEnvelope(plane, length, width)
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

#include <Fusion/Arrange/ArrangeFeatureInput.h>

returnValue = arrangeFeatureInput_var->setPlaneEnvelope(plane, length, width);

Return Value

Type | Description
Arrange2DPlaneEnvelopeInput | Returns the created Arrange2DPlaneEnvelopeInput object or null if the creation fails.

Parameters

Name | Type | Description
plane | ConstructionPlane | The Construction plane the envelope will be on.
length | ValueInput | The length of the envelope. This is the size of the envelope as measured along the X axis of the specified construction plane. This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.
width | ValueInput | The width of the envelope. This is the size of the envelope as measured along the Y axis of the specified construction plane. This value will become a parameter when the arrangement is created. If the ValueInput is created using a real number it is in centimeters. If you use a string, it is evaluated the same as a value would be in the command dialog and uses the current document units. For example, if the document units are inch and you specific "0.25" it will result in 1/4 inch clearance. Using a string, you can also specify the units as part of the expression, such as "0.25 in + 2 mm". And you can define equations like "PartSize + 2 mm" where "PartSize" is an existing parameter.

Version

Introduced in version January 2025


ArrangeFeatureInput.setProfileOrFaceEnvelope Method

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Defines an envelope defined by one or more profiles or planar faces. Only a single envelope input can exist at time. Calling this method will cause any existing envelope input object to be invalid.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
returnValue = arrangeFeatureInput_var.setProfileOrFaceEnvelope(profilesOrFaces)
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

#include <Fusion/Arrange/ArrangeFeatureInput.h>

returnValue = arrangeFeatureInput_var->setProfileOrFaceEnvelope(profilesOrFaces);

Return Value

Type | Description
Arrange2DProfileOrFaceEnvelopeInput | Returns the created Arrange2DProfileOrFaceEnvelopeInput object or null if the creation fails.

Parameters

Name | Type | Description
profilesOrFaces | Base[] | An array of Profile and planar BRepFace objects that define the shape of the available envelopes.

Version

Introduced in version January 2025


ArrangeFeatureInput.solverType Property

Parent Object: ArrangeFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatureInput.h>

Description

Returns the arrange feature solver type defined by this input.

Syntax

  • Python
  • C++
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.

# Get the value of the property.
propertyValue = arrangeFeatureInput_var.solverType
"arrangeFeatureInput_var" is a variable referencing an ArrangeFeatureInput object.
#include <Fusion/Arrange/ArrangeFeatureInput.h>

// Get the value of the property.
ArrangeSolverTypes propertyValue = arrangeFeatureInput_var->solverType();

Property Value

This is a read only property whose value is an ArrangeSolverTypes.

Version

Introduced in version January 2025


ArrangeFeatures Object

ArrangeFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Provides access to the Arrange features in a component and provides the functionality to create new Arrange features

Methods

Name | Description
add | Creates a new Arrange feature. Use the create2DInput or create3DInput method to first create an input object and fully define the required input. Then, pass that input object to the add method to create the Arrange 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 new ArrangeFeatureInput object. An ArrangeFeatureInput object is the logical equivalent to the command dialog when creating an Arrange feature. It provides access to the various options and collects all the required input when creating an Arrange feature. Once fully defined, you pass this into the add method to create the Arrange feature.
item | Returns the specified Arrange feature using an index into the collection.
itemByName | Returns the specified Arrange feature using the name of the feature.

Properties

Name | Description
count | Returns the number of Arrange features in the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.arrangeFeatures

Version

Introduced in version January 2025


ArrangeFeatures.add Method

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Creates a new Arrange feature. Use the create2DInput or create3DInput method to first create an input object and fully define the required input. Then, pass that input object to the add method to create the Arrange feature.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
returnValue = arrangeFeatures_var.add(input)
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

#include <Fusion/Arrange/ArrangeFeatures.h>

returnValue = arrangeFeatures_var->add(input);

Return Value

Type | Description
ArrangeFeature | Returns the newly created ArrangeFeature object.

Parameters

Name | Type | Description
input | ArrangeFeatureInput | The ArrangeFeature2DInput or ArrangeFeature3DInput object that defines the required information needed to create a new Arrange feature. An ArrangeFeatureInput object is the logical equivalent to the command dialog when creating an Arrange feature. It provides access to the various options and collects all of the required input when creating an Arrange feature and call the add method is the API equivalent to clicking the OK button on the command dialog to create the Arrange feature.

Version

Introduced in version January 2025


ArrangeFeatures.classType Method

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeFeatures.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeFeatures.h>

returnValue = adsk::fusion::ArrangeFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeFeatures.count Property

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Returns the number of Arrange features in the component.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

# Get the value of the property.
propertyValue = arrangeFeatures_var.count
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
#include <Fusion/Arrange/ArrangeFeatures.h>

// Get the value of the property.
uinteger propertyValue = arrangeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


ArrangeFeatures.createInput Method

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Creates a new ArrangeFeatureInput object. An ArrangeFeatureInput object is the logical equivalent to the command dialog when creating an Arrange feature. It provides access to the various options and collects all the required input when creating an Arrange feature. Once fully defined, you pass this into the add method to create the Arrange feature.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
returnValue = arrangeFeatures_var.createInput(solverType)
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

#include <Fusion/Arrange/ArrangeFeatures.h>

returnValue = arrangeFeatures_var->createInput(solverType);

Return Value

Type | Description
ArrangeFeatureInput | Returns an ArrangeFeatureInput object or null in the case of failure.

Parameters

Name | Type | Description
solverType | ArrangeSolverTypes | Specify if the input will be used to define a "2D True Shape", "2D Rectangular", or "3D" type of arrange feature.

Version

Introduced in version January 2025


ArrangeFeatures.isValid Property

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

# Get the value of the property.
propertyValue = arrangeFeatures_var.isValid
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
#include <Fusion/Arrange/ArrangeFeatures.h>

// Get the value of the property.
boolean propertyValue = arrangeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeFeatures.item Method

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Returns the specified Arrange feature using an index into the collection.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
returnValue = arrangeFeatures_var.item(index)
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

#include <Fusion/Arrange/ArrangeFeatures.h>

returnValue = arrangeFeatures_var->item(index);

Return Value

Type | Description
ArrangeFeature | 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 2025


ArrangeFeatures.itemByName Method

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

Returns the specified Arrange feature using the name of the feature.

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
returnValue = arrangeFeatures_var.itemByName(name)
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

#include <Fusion/Arrange/ArrangeFeatures.h>

returnValue = arrangeFeatures_var->itemByName(name);

Return Value

Type | Description
ArrangeFeature | Returns the specified Arrange feature, if it exists. Otherwise it returns null.

Parameters

Name | Type | Description
name | string | The name of the Arrange feature as seen in the timeline.

Version

Introduced in version January 2025


ArrangeFeatures.objectType Property

Parent Object: ArrangeFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.

# Get the value of the property.
propertyValue = arrangeFeatures_var.objectType
"arrangeFeatures_var" is a variable referencing an ArrangeFeatures object.
#include <Fusion/Arrange/ArrangeFeatures.h>

// Get the value of the property.
string propertyValue = arrangeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeOccurrenceResult Object

ArrangeOccurrenceResult Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeOccurrence object represents a single occurrence within an Arrange envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
arrangeComponent | The ArrangeComponent from the Arrange definition that resulted in the create of this occurrence.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrence | The Occurrence object in the Arrange envelope.
parentEnvelope | The Arrange envelope this occurrence is within.

Accessed From

ArrangeOccurrenceResults.item

Version

Introduced in version January 2025


ArrangeOccurrenceResult.arrangeComponent Property

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

The ArrangeComponent from the Arrange definition that resulted in the create of this occurrence.

Syntax

  • Python
  • C++
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResult_var.arrangeComponent
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.
#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

// Get the value of the property.
Ptr<ArrangeComponent> propertyValue = arrangeOccurrenceResult_var->arrangeComponent();

Property Value

This is a read only property whose value is an ArrangeComponent.

Version

Introduced in version January 2025


ArrangeOccurrenceResult.classType Method

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeOccurrenceResult.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

returnValue = adsk::fusion::ArrangeOccurrenceResult::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeOccurrenceResult.isValid Property

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResult_var.isValid
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.
#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

// Get the value of the property.
boolean propertyValue = arrangeOccurrenceResult_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeOccurrenceResult.objectType Property

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResult_var.objectType
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.
#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

// Get the value of the property.
string propertyValue = arrangeOccurrenceResult_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeOccurrenceResult.occurrence Property

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

The Occurrence object in the Arrange envelope.

Syntax

  • Python
  • C++
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResult_var.occurrence
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.
#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = arrangeOccurrenceResult_var->occurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2025


ArrangeOccurrenceResult.parentEnvelope Property

Parent Object: ArrangeOccurrenceResult

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResult.h>

Description

The Arrange envelope this occurrence is within.

Syntax

  • Python
  • C++
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResult_var.parentEnvelope
"arrangeOccurrenceResult_var" is a variable referencing an ArrangeOccurrenceResult object.
#include <Fusion/Arrange/ArrangeOccurrenceResult.h>

// Get the value of the property.
Ptr<ArrangeResultEnvelope> propertyValue = arrangeOccurrenceResult_var->parentEnvelope();

Property Value

This is a read only property whose value is an ArrangeResultEnvelope.

Version

Introduced in version January 2025


ArrangeOccurrenceResults Object

ArrangeOccurrenceResults Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A collection that contains the occurrences in an Arrange envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Arrange occurrence using an index into the collection.

Properties

Name | Description
count | Returns the number of Arrange 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arrange3DResultEnvelope.occurrences, ArrangePlaneResultEnvelope.occurrences, ArrangeProfileOrFaceResultEnvelope.occurrences, ArrangeResultEnvelope.occurrences

Version

Introduced in version January 2025


ArrangeOccurrenceResults.classType Method

Parent Object: ArrangeOccurrenceResults

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeOccurrenceResults.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeOccurrenceResults.h>

returnValue = adsk::fusion::ArrangeOccurrenceResults::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeOccurrenceResults.count Property

Parent Object: ArrangeOccurrenceResults

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Description

Returns the number of Arrange occurrences in the collection.

Syntax

  • Python
  • C++
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResults_var.count
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.
#include <Fusion/Arrange/ArrangeOccurrenceResults.h>

// Get the value of the property.
uinteger propertyValue = arrangeOccurrenceResults_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


ArrangeOccurrenceResults.isValid Property

Parent Object: ArrangeOccurrenceResults

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResults_var.isValid
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.
#include <Fusion/Arrange/ArrangeOccurrenceResults.h>

// Get the value of the property.
boolean propertyValue = arrangeOccurrenceResults_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeOccurrenceResults.item Method

Parent Object: ArrangeOccurrenceResults

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Description

Returns the specified Arrange occurrence using an index into the collection.

Syntax

  • Python
  • C++
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.
returnValue = arrangeOccurrenceResults_var.item(index)
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.

#include <Fusion/Arrange/ArrangeOccurrenceResults.h>

returnValue = arrangeOccurrenceResults_var->item(index);

Return Value

Type | Description
ArrangeOccurrenceResult | 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 2025


ArrangeOccurrenceResults.objectType Property

Parent Object: ArrangeOccurrenceResults

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeOccurrenceResults.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.

# Get the value of the property.
propertyValue = arrangeOccurrenceResults_var.objectType
"arrangeOccurrenceResults_var" is a variable referencing an ArrangeOccurrenceResults object.
#include <Fusion/Arrange/ArrangeOccurrenceResults.h>

// Get the value of the property.
string propertyValue = arrangeOccurrenceResults_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition Object

ArrangePlaneEnvelopeDefinition Object Preview

Derived from: ArrangeEnvelopeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangePlaneEnvelope object represents an arrange envelope defined by a construction plane. This defines the settings of the envelope and the EnvelopeResult provides access to the resulting envelope and its contents.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
envelopeSpacing | Returns the parameter that controls the offset distance between envelopes when there is more than one. You can modify the value by using the properties on the returned ModelParameter object.
frameWidth | Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed for this envelope.
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 parameter that controls the length of the envelope frame. This defines the You can modify the value by using the properties on the returned ModelParameter object.
objectSpacing | Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
originXOffset | Returns the parameter that controls the X offset of the frame from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.
originYOffset | Returns the parameter that controls the Y offset of the frame from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.
parentArrange | Returns the parent ArrangeFeature this envelope is associated with.
placementClearance | Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.
plane | Gets and sets the ConstructionPlane the envelope is defined on.
quantity | Returns the parameter that defines the number of envelopes that can be created. A value of -1 indicates that there is no limit.
width | Returns the parameter that controls the width of the envelope frame. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.classType Method

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangePlaneEnvelopeDefinition.classType()
This is a static method.

#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

returnValue = adsk::fusion::ArrangePlaneEnvelopeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.envelopeSpacing Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the offset distance between envelopes when there is more than one. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.envelopeSpacing
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->envelopeSpacing();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.frameWidth Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.frameWidth
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->frameWidth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.isPartialArrangeAllowed Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Gets and sets if a partial arrange is allowed for this envelope.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.isPartialArrangeAllowed

# Set the value of the property.
arrangePlaneEnvelopeDefinition_var.isPartialArrangeAllowed = propertyValue
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangePlaneEnvelopeDefinition_var->isPartialArrangeAllowed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangePlaneEnvelopeDefinition_var->isPartialArrangeAllowed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.isValid Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.isValid
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangePlaneEnvelopeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.length Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the length of the envelope frame. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.length
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->length();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.objectSpacing Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.objectSpacing
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->objectSpacing();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.objectType Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.objectType
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
string propertyValue = arrangePlaneEnvelopeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.originXOffset Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the X offset of the frame from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.originXOffset
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->originXOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.originYOffset Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the Y offset of the frame from the origin of the construction plane. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.originYOffset
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->originYOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.parentArrange Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parent ArrangeFeature this envelope is associated with.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.parentArrange
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangePlaneEnvelopeDefinition_var->parentArrange();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.placementClearance Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.placementClearance
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->placementClearance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.plane Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Gets and sets the ConstructionPlane the envelope is defined on.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.plane

# Set the value of the property.
arrangePlaneEnvelopeDefinition_var.plane = propertyValue
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = arrangePlaneEnvelopeDefinition_var->plane();

// Set the value of the property, where value_var is a ConstructionPlane.
bool returnValue = arrangePlaneEnvelopeDefinition_var->plane(value_var);

Property Value

This is a read/write property whose value is a ConstructionPlane.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.quantity Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that defines the number of envelopes that can be created. A value of -1 indicates that there is no limit.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.quantity
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->quantity();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneEnvelopeDefinition.width Property

Parent Object: ArrangePlaneEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope frame. This defines the You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangePlaneEnvelopeDefinition_var.width
"arrangePlaneEnvelopeDefinition_var" is a variable referencing an ArrangePlaneEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangePlaneEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangePlaneEnvelopeDefinition_var->width();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope Object

ArrangePlaneResultEnvelope Object Preview

Derived from: ArrangeResultEnvelope Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents the arrange result of a single envelope that is defined on a plane.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
boundingBox | The bounding box of the this result. The coordinates are defined using the coordinate system of the construction plane used to define the envelope.
envelopeDefinition Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
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 envelope as seen in the browser.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrences | Returns a collection object of the occurrences in this envelope.
parentFeature | Returns the ArrangeFeature object this result is for.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.boundingBox Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

The bounding box of the this result. The coordinates are defined using the coordinate system of the construction plane used to define the envelope.

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.boundingBox
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
Ptr<BoundingBox2D> propertyValue = arrangePlaneResultEnvelope_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox2D.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.classType Method

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangePlaneResultEnvelope.classType()
This is a static method.

#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

returnValue = adsk::fusion::ArrangePlaneResultEnvelope::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.envelopeDefinition Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.envelopeDefinition
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeEnvelopeDefinition> propertyValue = arrangePlaneResultEnvelope_var->envelopeDefinition();

Property Value

This is a read only property whose value is an ArrangeEnvelopeDefinition.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.isValid Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.isValid
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
boolean propertyValue = arrangePlaneResultEnvelope_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.name Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Gets and sets the name of the envelope as seen in the browser.

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.name

# Set the value of the property.
arrangePlaneResultEnvelope_var.name = propertyValue
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangePlaneResultEnvelope_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = arrangePlaneResultEnvelope_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.objectType Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.objectType
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangePlaneResultEnvelope_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.occurrences Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Returns a collection object of the occurrences in this envelope.

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.occurrences
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeOccurrenceResults> propertyValue = arrangePlaneResultEnvelope_var->occurrences();

Property Value

This is a read only property whose value is an ArrangeOccurrenceResults.

Version

Introduced in version January 2025


ArrangePlaneResultEnvelope.parentFeature Property

Parent Object: ArrangePlaneResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

Description

Returns the ArrangeFeature object this result is for.

Syntax

  • Python
  • C++
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.

# Get the value of the property.
propertyValue = arrangePlaneResultEnvelope_var.parentFeature
"arrangePlaneResultEnvelope_var" is a variable referencing an ArrangePlaneResultEnvelope object.
#include <Fusion/Arrange/ArrangePlaneResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangePlaneResultEnvelope_var->parentFeature();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition Object

ArrangeProfileOrFaceEnvelopeDefinition Object Preview

Derived from: ArrangeEnvelopeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeProfileEnvelopeDefinition object represents envelopes defined by a profile or face in an Arrange feature. This defines the settings of the envelope and the EnvelopeResult provides access to the resulting envelope and its contents.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
frameWidth | Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.
isPartialArrangeAllowed | Gets and sets if a partial arrange is allowed for this envelope.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectSpacing | Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentArrange | Returns the parent ArrangeFeature this envelope is associated with.
placementClearance | Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.
profilesAndFaces | Gets and sets an array containing any combination of Profile and planar BRepFace objects. These objects define the shapes of the envelopes. Currently, if a Profile is used, it must be the only Profile in its parent sketch.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.classType Method

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeProfileOrFaceEnvelopeDefinition.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

returnValue = adsk::fusion::ArrangeProfileOrFaceEnvelopeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.frameWidth Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Returns the parameter that controls the width of the envelope frame. This defines the offset distance of the objects from the edge of the frame. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.frameWidth
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->frameWidth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.isPartialArrangeAllowed Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Gets and sets if a partial arrange is allowed for this envelope.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.isPartialArrangeAllowed

# Set the value of the property.
arrangeProfileOrFaceEnvelopeDefinition_var.isPartialArrangeAllowed = propertyValue
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->isPartialArrangeAllowed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangeProfileOrFaceEnvelopeDefinition_var->isPartialArrangeAllowed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.isValid Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.isValid
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
boolean propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.objectSpacing Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Returns the parameter that controls the space between objects in the arrangement. You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.objectSpacing
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->objectSpacing();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.objectType Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.objectType
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
string propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.parentArrange Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Returns the parent ArrangeFeature this envelope is associated with.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.parentArrange
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->parentArrange();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.placementClearance Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Returns the parameter that controls the offset of the objects from the base plane of the arrangement (the "up" direction). You can modify the value by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.placementClearance
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->placementClearance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


ArrangeProfileOrFaceEnvelopeDefinition.profilesAndFaces Property

Parent Object: ArrangeProfileOrFaceEnvelopeDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

Description

Gets and sets an array containing any combination of Profile and planar BRepFace objects. These objects define the shapes of the envelopes. Currently, if a Profile is used, it must be the only Profile in its parent sketch.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var.profilesAndFaces

# Set the value of the property.
arrangeProfileOrFaceEnvelopeDefinition_var.profilesAndFaces = propertyValue
"arrangeProfileOrFaceEnvelopeDefinition_var" is a variable referencing an ArrangeProfileOrFaceEnvelopeDefinition object.
#include <Fusion/Arrange/ArrangeProfileOrFaceEnvelopeDefinition.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = arrangeProfileOrFaceEnvelopeDefinition_var->profilesAndFaces();

// Set the value of the property, where value_var is a Base.
bool returnValue = arrangeProfileOrFaceEnvelopeDefinition_var->profilesAndFaces(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope Object

ArrangeProfileOrFaceResultEnvelope Object Preview

Derived from: ArrangeResultEnvelope Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents the arrange envelope result of a profile or face defined arrange feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
envelopeDefinition Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
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 envelope as seen in the browser.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrences | Returns a collection object of the occurrences in this envelope.
parentFeature | Returns the ArrangeFeature object this result is for.
profileOrFace | Returns the Profile or BRepFace object that defines the shape of this result envelope.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.classType Method

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeProfileOrFaceResultEnvelope.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

returnValue = adsk::fusion::ArrangeProfileOrFaceResultEnvelope::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.envelopeDefinition Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.envelopeDefinition
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeEnvelopeDefinition> propertyValue = arrangeProfileOrFaceResultEnvelope_var->envelopeDefinition();

Property Value

This is a read only property whose value is an ArrangeEnvelopeDefinition.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.isValid Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.isValid
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
boolean propertyValue = arrangeProfileOrFaceResultEnvelope_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.name Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Gets and sets the name of the envelope as seen in the browser.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.name

# Set the value of the property.
arrangeProfileOrFaceResultEnvelope_var.name = propertyValue
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangeProfileOrFaceResultEnvelope_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = arrangeProfileOrFaceResultEnvelope_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.objectType Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.objectType
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangeProfileOrFaceResultEnvelope_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.occurrences Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Returns a collection object of the occurrences in this envelope.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.occurrences
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeOccurrenceResults> propertyValue = arrangeProfileOrFaceResultEnvelope_var->occurrences();

Property Value

This is a read only property whose value is an ArrangeOccurrenceResults.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.parentFeature Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Returns the ArrangeFeature object this result is for.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.parentFeature
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeProfileOrFaceResultEnvelope_var->parentFeature();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangeProfileOrFaceResultEnvelope.profileOrFace Property

Parent Object: ArrangeProfileOrFaceResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

Description

Returns the Profile or BRepFace object that defines the shape of this result envelope.

Syntax

  • Python
  • C++
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeProfileOrFaceResultEnvelope_var.profileOrFace
"arrangeProfileOrFaceResultEnvelope_var" is a variable referencing an ArrangeProfileOrFaceResultEnvelope object.
#include <Fusion/Arrange/ArrangeProfileOrFaceResultEnvelope.h>

// Get the value of the property.
Ptr<Base> propertyValue = arrangeProfileOrFaceResultEnvelope_var->profileOrFace();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2025


ArrangeResultEnvelope Object

ArrangeResultEnvelope Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The ArrangeResult object represents the results of an arrangement for a single envelope.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
envelopeDefinition Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)
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 envelope as seen in the browser.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrences | Returns a collection object of the occurrences in this envelope.
parentFeature | Returns the ArrangeFeature object this result is for.

Accessed From

ArrangeOccurrenceResult.parentEnvelope, ArrangeResultEnvelopes.item

Derived Classes

Arrange3DResultEnvelope, ArrangePlaneResultEnvelope, ArrangeProfileOrFaceResultEnvelope

Version

Introduced in version January 2025


ArrangeResultEnvelope.classType Method

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeResultEnvelope.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeResultEnvelope.h>

returnValue = adsk::fusion::ArrangeResultEnvelope::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeResultEnvelope.envelopeDefinition Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Returns the envelope definition that provides the settings for this envelope.

To use this property, you need to position the timeline marker immediately before the Arrange feature. This can be accomplished using the following code: arrangeFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.envelopeDefinition
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeEnvelopeDefinition> propertyValue = arrangeResultEnvelope_var->envelopeDefinition();

Property Value

This is a read only property whose value is an ArrangeEnvelopeDefinition.

Version

Introduced in version January 2025


ArrangeResultEnvelope.isValid Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.isValid
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
boolean propertyValue = arrangeResultEnvelope_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeResultEnvelope.name Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Gets and sets the name of the envelope as seen in the browser.

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.name

# Set the value of the property.
arrangeResultEnvelope_var.name = propertyValue
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangeResultEnvelope_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = arrangeResultEnvelope_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


ArrangeResultEnvelope.objectType Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.objectType
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
string propertyValue = arrangeResultEnvelope_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeResultEnvelope.occurrences Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Returns a collection object of the occurrences in this envelope.

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.occurrences
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeOccurrenceResults> propertyValue = arrangeResultEnvelope_var->occurrences();

Property Value

This is a read only property whose value is an ArrangeOccurrenceResults.

Version

Introduced in version January 2025


ArrangeResultEnvelope.parentFeature Property

Parent Object: ArrangeResultEnvelope

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelope.h>

Description

Returns the ArrangeFeature object this result is for.

Syntax

  • Python
  • C++
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.

# Get the value of the property.
propertyValue = arrangeResultEnvelope_var.parentFeature
"arrangeResultEnvelope_var" is a variable referencing an ArrangeResultEnvelope object.
#include <Fusion/Arrange/ArrangeResultEnvelope.h>

// Get the value of the property.
Ptr<ArrangeFeature> propertyValue = arrangeResultEnvelope_var->parentFeature();

Property Value

This is a read only property whose value is an ArrangeFeature.

Version

Introduced in version January 2025


ArrangeResultEnvelopes Object

ArrangeResultEnvelopes Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Provides access to the results of an arrangement. For 3D arrangements, this will always contain a single result. For plane or profile envelopes this can contain multiple envelope results.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Arrange envelope result using an index into the collection.

Properties

Name | Description
count | Returns the number of Arrange envelope results for this Arrange 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangeFeature.resultEnvelopes

Version

Introduced in version January 2025


ArrangeResultEnvelopes.classType Method

Parent Object: ArrangeResultEnvelopes

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ArrangeResultEnvelopes.classType()
This is a static method.

#include <Fusion/Arrange/ArrangeResultEnvelopes.h>

returnValue = adsk::fusion::ArrangeResultEnvelopes::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ArrangeResultEnvelopes.count Property

Parent Object: ArrangeResultEnvelopes

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Description

Returns the number of Arrange envelope results for this Arrange feature.

Syntax

  • Python
  • C++
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.

# Get the value of the property.
propertyValue = arrangeResultEnvelopes_var.count
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.
#include <Fusion/Arrange/ArrangeResultEnvelopes.h>

// Get the value of the property.
uinteger propertyValue = arrangeResultEnvelopes_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


ArrangeResultEnvelopes.isValid Property

Parent Object: ArrangeResultEnvelopes

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.

# Get the value of the property.
propertyValue = arrangeResultEnvelopes_var.isValid
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.
#include <Fusion/Arrange/ArrangeResultEnvelopes.h>

// Get the value of the property.
boolean propertyValue = arrangeResultEnvelopes_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeResultEnvelopes.item Method

Parent Object: ArrangeResultEnvelopes

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Description

Returns the specified Arrange envelope result using an index into the collection.

Syntax

  • Python
  • C++
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.
returnValue = arrangeResultEnvelopes_var.item(index)
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.

#include <Fusion/Arrange/ArrangeResultEnvelopes.h>

returnValue = arrangeResultEnvelopes_var->item(index);

Return Value

Type | Description
ArrangeResultEnvelope | 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 2025


ArrangeResultEnvelopes.objectType Property

Parent Object: ArrangeResultEnvelopes

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Arrange/ArrangeResultEnvelopes.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.

# Get the value of the property.
propertyValue = arrangeResultEnvelopes_var.objectType
"arrangeResultEnvelopes_var" is a variable referencing an ArrangeResultEnvelopes object.
#include <Fusion/Arrange/ArrangeResultEnvelopes.h>

// Get the value of the property.
string propertyValue = arrangeResultEnvelopes_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ArrangeSelection Object

Derived from: GeometrySelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Class for arrange selections. Provides access to the selected geometry and its properties.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
customQuantity | Preview Gets and sets the custom quantity. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. The default value for this property is 1. Note: If customQuantity is called, isUsingCustomQuantity will be set to true automatically.
customRotationX | Preview Gets and sets the rotation increments (in degrees) for the x-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable x-axis rotation for this selection, customRotationX must be set to 0. The default value for this property is 45 degrees. Note: If customRotationX is called, isUsingCustomRotationX will be set to true automatically.
customRotationY | Preview Gets and sets the rotation increments (in degrees) for the y-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable y-axis rotation for this selection, customRotationY must be set to 0. The default value for this property is 45 degrees. Note: If customRotationY is called, isUsingCustomRotationY will be set to true automatically.
customRotationZ | Preview Gets and sets the rotation increments (in degrees) for the z-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable z-axis rotation for this selection, customRotationZ must be set to 0. The default value for this property is 45 degrees. Note: If customRotationZ is called, isUsingCustomRotationZ will be set to true automatically.
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Gets and sets the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isUsingCustomQuantity | Preview Gets and sets if custom quantity is used for this element. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. If isUsingCustomQuantity is false, the global quantity of the operation's parameter "arrange_global_quantity" is used. The default value for this property false.
isUsingCustomRotationX | Preview Gets and sets if custom rotation is used for the x-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationX is false, the rotation of the operation's parameter "arrange_rotation_x" is used. The default value for this property false.
isUsingCustomRotationY | Preview Gets and sets if custom rotation is used for the y-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationY is false, the rotation of the operation's parameter "arrange_rotation_y" is used. The default value for this property false.
isUsingCustomRotationZ | Preview Gets and sets if custom rotation is used for the z-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationZ is false, the rotation of the operation's parameter "arrange_rotation_z" is used. The default value for this property 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
priorityType | Gets and sets the priority value for each element in the selection list. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. The default value for this property is MediumArrangePriorityType.
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

ArrangeSelections.createNewArrangeSelection, ArrangeSelections.item

Version

Introduced in version March 2024


ArrangeSelection.classType Method

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ArrangeSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/ArrangeSelection.h>

returnValue = adsk::cam::ArrangeSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


ArrangeSelection.customQuantity Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the custom quantity. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. The default value for this property is 1. Note: If customQuantity is called, isUsingCustomQuantity will be set to true automatically.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.customQuantity

# Set the value of the property.
arrangeSelection_var.customQuantity = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
uinteger propertyValue = arrangeSelection_var->customQuantity();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = arrangeSelection_var->customQuantity(value_var);

Property Value

This is a read/write property whose value is a uinteger.

Version

Introduced in version January 2025


ArrangeSelection.customRotationX Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the rotation increments (in degrees) for the x-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable x-axis rotation for this selection, customRotationX must be set to 0. The default value for this property is 45 degrees. Note: If customRotationX is called, isUsingCustomRotationX will be set to true automatically.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.customRotationX

# Set the value of the property.
arrangeSelection_var.customRotationX = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
double propertyValue = arrangeSelection_var->customRotationX();

// Set the value of the property, where value_var is a double.
bool returnValue = arrangeSelection_var->customRotationX(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2025


ArrangeSelection.customRotationY Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the rotation increments (in degrees) for the y-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable y-axis rotation for this selection, customRotationY must be set to 0. The default value for this property is 45 degrees. Note: If customRotationY is called, isUsingCustomRotationY will be set to true automatically.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.customRotationY

# Set the value of the property.
arrangeSelection_var.customRotationY = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
double propertyValue = arrangeSelection_var->customRotationY();

// Set the value of the property, where value_var is a double.
bool returnValue = arrangeSelection_var->customRotationY(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2025


ArrangeSelection.customRotationZ Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the rotation increments (in degrees) for the z-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. To disable z-axis rotation for this selection, customRotationZ must be set to 0. The default value for this property is 45 degrees. Note: If customRotationZ is called, isUsingCustomRotationZ will be set to true automatically.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.customRotationZ

# Set the value of the property.
arrangeSelection_var.customRotationZ = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
double propertyValue = arrangeSelection_var->customRotationZ();

// Set the value of the property, where value_var is a double.
bool returnValue = arrangeSelection_var->customRotationZ(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2025


ArrangeSelection.error Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.error
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
string propertyValue = arrangeSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ArrangeSelection.hasError Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.hasError
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


ArrangeSelection.hasWarning Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.hasWarning
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


ArrangeSelection.inputGeometry Property

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.inputGeometry

# Set the value of the property.
arrangeSelection_var.inputGeometry = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
Ptr<Base> propertyValue = arrangeSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = arrangeSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


ArrangeSelection.isUsingCustomQuantity Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets if custom quantity is used for this element. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. If isUsingCustomQuantity is false, the global quantity of the operation's parameter "arrange_global_quantity" is used. The default value for this property false.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.isUsingCustomQuantity

# Set the value of the property.
arrangeSelection_var.isUsingCustomQuantity = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->isUsingCustomQuantity();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangeSelection_var->isUsingCustomQuantity(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeSelection.isUsingCustomRotationX Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets if custom rotation is used for the x-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationX is false, the rotation of the operation's parameter "arrange_rotation_x" is used. The default value for this property false.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.isUsingCustomRotationX

# Set the value of the property.
arrangeSelection_var.isUsingCustomRotationX = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->isUsingCustomRotationX();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangeSelection_var->isUsingCustomRotationX(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeSelection.isUsingCustomRotationY Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets if custom rotation is used for the y-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationY is false, the rotation of the operation's parameter "arrange_rotation_y" is used. The default value for this property false.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.isUsingCustomRotationY

# Set the value of the property.
arrangeSelection_var.isUsingCustomRotationY = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->isUsingCustomRotationY();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangeSelection_var->isUsingCustomRotationY(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeSelection.isUsingCustomRotationZ Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets if custom rotation is used for the z-axis. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. To enable any rotation the parameter "arrange_rotation_group" of the operation must be set to true. If isUsingCustomRotationZ is false, the rotation of the operation's parameter "arrange_rotation_z" is used. The default value for this property true.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.isUsingCustomRotationZ

# Set the value of the property.
arrangeSelection_var.isUsingCustomRotationZ = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->isUsingCustomRotationZ();

// Set the value of the property, where value_var is a boolean.
bool returnValue = arrangeSelection_var->isUsingCustomRotationZ(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


ArrangeSelection.isValid Property

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.isValid
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
boolean propertyValue = arrangeSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


ArrangeSelection.objectType Property

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.objectType
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
string propertyValue = arrangeSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ArrangeSelection.priorityType Property

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets and sets the priority value for each element in the selection list. This function is not available in Fusion for Personal Use. Throws an exception when calling this function in Fusion for Personal Use. The default value for this property is MediumArrangePriorityType.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.priorityType

# Set the value of the property.
arrangeSelection_var.priorityType = propertyValue
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
ArrangePriorityTypes propertyValue = arrangeSelection_var->priorityType();

// Set the value of the property, where value_var is an ArrangePriorityTypes.
bool returnValue = arrangeSelection_var->priorityType(value_var);

Property Value

This is a read/write property whose value is an ArrangePriorityTypes.

Version

Introduced in version March 2024


ArrangeSelection.value Property

Parent Object: ArrangeSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.value
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = arrangeSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version March 2024


ArrangeSelection.warning Property

Parent Object: ArrangeSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.

# Get the value of the property.
propertyValue = arrangeSelection_var.warning
"arrangeSelection_var" is a variable referencing an ArrangeSelection object.
#include <Cam/GeometrySelections/ArrangeSelection.h>

// Get the value of the property.
string propertyValue = arrangeSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ArrangeSelections Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Collection for all arrange selections to be passed to a CAMArrangeParameterValue object. This is a read-only container. It returns the arrange selections associated with the parent parameter value object, but does not write to it. To apply changes done to the collection and the selections it contains, CAMArrangeParameterValue.applyArrangeSelections() needs to be called.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 entries.
createNewArrangeSelection | Creates a new occurrence selection meant for arrange operations and adds it to the end of the collection.
item | Function that returns the specified arrange selection object using an index into the collection.
remove | Function that removes the specified arrange selection object using an index in the collection.
removeByObject | Function that removes the specified arrange selection object from the collection.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMArrangeParameterValue.getArrangeSelections

Version

Introduced in version March 2024


ArrangeSelections.classType Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ArrangeSelections.classType()
This is a static method.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = adsk::cam::ArrangeSelections::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


ArrangeSelections.clear Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Clears all entries.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
returnValue = arrangeSelections_var.clear()
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = arrangeSelections_var->clear();

Version

Introduced in version March 2024


ArrangeSelections.count Property

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

# Get the value of the property.
propertyValue = arrangeSelections_var.count
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
#include <Cam/GeometrySelections/ArrangeSelections.h>

// Get the value of the property.
uinteger propertyValue = arrangeSelections_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ArrangeSelections.createNewArrangeSelection Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Creates a new occurrence selection meant for arrange operations and adds it to the end of the collection.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
returnValue = arrangeSelections_var.createNewArrangeSelection()
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = arrangeSelections_var->createNewArrangeSelection();

Return Value

Type | Description
ArrangeSelection | Returns newly created ArrangeSelection.

Version

Introduced in version March 2024


ArrangeSelections.isValid Property

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

# Get the value of the property.
propertyValue = arrangeSelections_var.isValid
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
#include <Cam/GeometrySelections/ArrangeSelections.h>

// Get the value of the property.
boolean propertyValue = arrangeSelections_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


ArrangeSelections.item Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Function that returns the specified arrange selection object using an index into the collection.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
returnValue = arrangeSelections_var.item(index)
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = arrangeSelections_var->item(index);

Return Value

Type | Description
ArrangeSelection | 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 2024


ArrangeSelections.objectType Property

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

# Get the value of the property.
propertyValue = arrangeSelections_var.objectType
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
#include <Cam/GeometrySelections/ArrangeSelections.h>

// Get the value of the property.
string propertyValue = arrangeSelections_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ArrangeSelections.remove Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Function that removes the specified arrange selection object using an index in the collection.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
returnValue = arrangeSelections_var.remove(index)
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = arrangeSelections_var->remove(index);

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to remove. The first item in the collection has an index of 0.

Version

Introduced in version March 2024


ArrangeSelections.removeByObject Method

Parent Object: ArrangeSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ArrangeSelections.h>

Description

Function that removes the specified arrange selection object from the collection.

Syntax

  • Python
  • C++
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.
returnValue = arrangeSelections_var.removeByObject(selection)
"arrangeSelections_var" is a variable referencing an ArrangeSelections object.

#include <Cam/GeometrySelections/ArrangeSelections.h>

returnValue = arrangeSelections_var->removeByObject(selection);

Parameters

Name | Type | Description
selection | ArrangeSelection | The item within the collection to remove. Throws an exception if the arrange selection is not part of the given selection.

Version

Introduced in version March 2024


AsBuiltJoint Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Represent an as-built joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsCylindricalJointMotion | Redefines the relationship between the two joint geometries as a cylindrical joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsPinSlotJointMotion | Redefines the relationship between the two joint geometries as a pin-slot joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsPlanarJointMotion | Redefines the relationship between the two joint geometries as a planar joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsRevoluteJointMotion | Redefines the relationship between the two joint geometries as a revolute joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsRigidJointMotion | Redefines the relationship between the two joint geometries as a rigid joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
setAsSliderJointMotion | Redefines the relationship between the two joint geometries as a slider joint. To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(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 as-built joint.
entityToken Returns a token for the AsBuiltJoint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same as-built joint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

To set this property, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
transform Returns the position and orientation of the joint geometry associated with this as-built joint. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

Accessed From

AsBuiltJoint.createForAssemblyContext, AsBuiltJoint.nativeObject, AsBuiltJointList.item, AsBuiltJointList.itemByName, AsBuiltJoints.add, AsBuiltJoints.item, AsBuiltJoints.itemByName, Component.allAsBuiltJoints, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns the collection of attributes associated with this as-built joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Deletes this as-built joint.

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.entityToken Property

Parent Object: AsBuiltJoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns a token for the AsBuiltJoint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same as-built joint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.entityToken
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
string propertyValue = asBuiltJoint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


AsBuiltJoint.geometry Property

Parent Object: AsBuiltJoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

To set this property, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Gets and sets if this as-built joint is suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns a JointMotion object that defines the motion relationship between the two geometries.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

The name of the as-built joint as it is displayed in the timeline and the browser. The name can be changed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Specifies the first of two occurrences the joint is between.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Specifies the second of two occurrences the joint is between.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns the parent component that owns this AsBuiltJoint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a ball joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a cylindrical joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a pin-slot joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a planar joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a revolute joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a rigid joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Redefines the relationship between the two joint geometries as a slider joint.

To use this method, you need to position the timeline marker to immediately before this as-built joint. This can be accomplished using the following code: thisAsBuiltJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns the timeline object associated with this as-built joint.

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


AsBuiltJoint.transform Property

Parent Object: AsBuiltJoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoint.h>

Description

Returns the position and orientation of the joint geometry associated with this as-built joint. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.transform
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = asBuiltJoint_var->transform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version November 2024


AsBuiltJointInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines all of the information needed to create an as-built joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Specifies the position of the joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Specifies the first of two occurrences the joint is between.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Specifies the second of two occurrences the joint is between.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a ball joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a cylindrical joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a pin-slot joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a planar joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a revolute joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a rigid joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointInput.h>

Description

Defines the relationship between the two joint geometries as a slider joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

A list of as-built joints.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Occurrence.asBuiltJoints

Version

Introduced in version January 2016


AsBuiltJointList.classType Method

Parent Object: AsBuiltJointList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

Returns number of as-built joints in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

Function that returns the specified as-built joint using an index into the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

Function that returns the specified as-built joint using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJointList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.asBuiltJoints, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Creates a new as-built joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Returns number of joint origins in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Function that returns the specified as-built joint using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

Function that returns the specified as-built joint using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AsBuiltJoints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


AssemblyConstraint Object

AssemblyConstraint Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents an assembly constraint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 assembly constraint.

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 assembly constraint.
entityToken Returns a token for the assembly constraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same assembly constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
geometricRelationships | Returns the set of geometric relationships used for this assembly constraint.
healthState | Returns the current health state of the assembly constraint.
isLightBulbOn | Gets and sets if the light bulb of this assembly constraint, as displayed in the browser, is on or off. An assembly constraint will only be visible if the light bulb is switched on. However, the light bulb can be on and the assembly constraint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the light bulb of the parent Joints folder is off.
isSuppressed | Gets and sets if this assembly constraint is suppressed. If suppressed, all of the assembly constraints within the will be 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 assembly constraint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.
name | Gets and sets the name of the assembly constraint. This is the name 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this assembly constraint.
timelineObject | Returns the timeline object associated with this assembly constraint.

Accessed From

AssemblyConstraint.createForAssemblyContext, AssemblyConstraint.nativeObject, AssemblyConstraints.add, AssemblyConstraints.item, AssemblyConstraints.itemByName, Component.allAssemblyConstraints, FlatPatternComponent.allAssemblyConstraints

Version

Introduced in version July 2025


AssemblyConstraint.assemblyContext Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

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.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.assemblyContext
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = assemblyConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2025


AssemblyConstraint.attributes Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns the collection of attributes associated with this assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.attributes
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = assemblyConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2025


AssemblyConstraint.classType Method

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AssemblyConstraint.classType()
This is a static method.

#include <Fusion/Components/AssemblyConstraint.h>

returnValue = adsk::fusion::AssemblyConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


AssemblyConstraint.createForAssemblyContext Method

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

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.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
returnValue = assemblyConstraint_var.createForAssemblyContext(occurrence)
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

#include <Fusion/Components/AssemblyConstraint.h>

returnValue = assemblyConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
AssemblyConstraint | 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 2025


AssemblyConstraint.deleteMe Method

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Deletes this assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
returnValue = assemblyConstraint_var.deleteMe()
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

#include <Fusion/Components/AssemblyConstraint.h>

returnValue = assemblyConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete is successful.

Version

Introduced in version July 2025


AssemblyConstraint.entityToken Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns a token for the assembly constraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same assembly constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.entityToken
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
string propertyValue = assemblyConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


AssemblyConstraint.errorOrWarningMessage Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

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.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.errorOrWarningMessage
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
string propertyValue = assemblyConstraint_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


AssemblyConstraint.geometricRelationships Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns the set of geometric relationships used for this assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.geometricRelationships
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<GeometricRelationships> propertyValue = assemblyConstraint_var->geometricRelationships();

Property Value

This is a read only property whose value is a GeometricRelationships.

Version

Introduced in version July 2025


AssemblyConstraint.healthState Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns the current health state of the assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.healthState
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
FeatureHealthStates propertyValue = assemblyConstraint_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2025


AssemblyConstraint.isLightBulbOn Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Gets and sets if the light bulb of this assembly constraint, as displayed in the browser, is on or off. An assembly constraint will only be visible if the light bulb is switched on. However, the light bulb can be on and the assembly constraint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the light bulb of the parent Joints folder is off.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.isLightBulbOn

# Set the value of the property.
assemblyConstraint_var.isLightBulbOn = propertyValue
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraint_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = assemblyConstraint_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraint.isSuppressed Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Gets and sets if this assembly constraint is suppressed. If suppressed, all of the assembly constraints within the will be suppressed.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.isSuppressed

# Set the value of the property.
assemblyConstraint_var.isSuppressed = propertyValue
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraint_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = assemblyConstraint_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraint.isValid Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.isValid
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraint.isVisible Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Gets whether the assembly constraint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.isVisible
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraint_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraint.name Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Gets and sets the name of the assembly constraint. This is the name seen in the browser and timeline.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.name

# Set the value of the property.
assemblyConstraint_var.name = propertyValue
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
string propertyValue = assemblyConstraint_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = assemblyConstraint_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


AssemblyConstraint.nativeObject Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

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.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.nativeObject
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<AssemblyConstraint> propertyValue = assemblyConstraint_var->nativeObject();

Property Value

This is a read only property whose value is an AssemblyConstraint.

Version

Introduced in version July 2025


AssemblyConstraint.objectType Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.objectType
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
string propertyValue = assemblyConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


AssemblyConstraint.parentComponent Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns the parent component that owns this assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.parentComponent
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<Component> propertyValue = assemblyConstraint_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2025


AssemblyConstraint.timelineObject Property

Parent Object: AssemblyConstraint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraint.h>

Description

Returns the timeline object associated with this assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.

# Get the value of the property.
propertyValue = assemblyConstraint_var.timelineObject
"assemblyConstraint_var" is a variable referencing an AssemblyConstraint object.
#include <Fusion/Components/AssemblyConstraint.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = assemblyConstraint_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2025


AssemblyConstraintInput Object

AssemblyConstraintInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraintInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Defines all of the information required to create a new assembly constraint. This object provides equivalent functionality to the Assembly Relationships command dialog in that it gathers the required information to create an assembly constraint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
geometricRelationships | Returns the collection object used to define the geometric relationships that the constraints will be inferred from. A geometric relationship defines a pair of entities, if the relationships is flipped, and the offset or angle value.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AssemblyConstraints.createInput

Version

Introduced in version July 2025


AssemblyConstraintInput.classType Method

Parent Object: AssemblyConstraintInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraintInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AssemblyConstraintInput.classType()
This is a static method.

#include <Fusion/Components/AssemblyConstraintInput.h>

returnValue = adsk::fusion::AssemblyConstraintInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


AssemblyConstraintInput.geometricRelationships Property

Parent Object: AssemblyConstraintInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraintInput.h>

Description

Returns the collection object used to define the geometric relationships that the constraints will be inferred from. A geometric relationship defines a pair of entities, if the relationships is flipped, and the offset or angle value.

Syntax

  • Python
  • C++
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.

# Get the value of the property.
propertyValue = assemblyConstraintInput_var.geometricRelationships
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.
#include <Fusion/Components/AssemblyConstraintInput.h>

// Get the value of the property.
Ptr<GeometricRelationships> propertyValue = assemblyConstraintInput_var->geometricRelationships();

Property Value

This is a read only property whose value is a GeometricRelationships.

Version

Introduced in version July 2025


AssemblyConstraintInput.isValid Property

Parent Object: AssemblyConstraintInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraintInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.

# Get the value of the property.
propertyValue = assemblyConstraintInput_var.isValid
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.
#include <Fusion/Components/AssemblyConstraintInput.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraintInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraintInput.objectType Property

Parent Object: AssemblyConstraintInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraintInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.

# Get the value of the property.
propertyValue = assemblyConstraintInput_var.objectType
"assemblyConstraintInput_var" is a variable referencing an AssemblyConstraintInput object.
#include <Fusion/Components/AssemblyConstraintInput.h>

// Get the value of the property.
string propertyValue = assemblyConstraintInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


AssemblyConstraints Object

AssemblyConstraints Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The collection of assembly constraints in this component. This provides access to all existing assembly constraints and supports the ability to create new assembly constraints.

Methods

Name | Description
add | Creates a new assembly constraint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 assembly constraint input to define an assembly constraint. Use functionality on the returned AssemblyConstraintInput to define the input needed to create an assembly constraint.
item | Function that returns the specified assembly constraint using an index into the collection.
itemByName | Function that returns the specified assembly constraint object using a name.

Properties

Name | Description
count | Returns the number of assembly constraint 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.assemblyConstraints, FlatPatternComponent.assemblyConstraints

Version

Introduced in version July 2025


AssemblyConstraints.add Method

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Creates a new assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
returnValue = assemblyConstraints_var.add(input)
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

#include <Fusion/Components/AssemblyConstraints.h>

returnValue = assemblyConstraints_var->add(input);

Return Value

Type | Description
AssemblyConstraint | Returns the newly created AssemblyConstraint or null in the case of failure.

Parameters

Name | Type | Description
input | AssemblyConstraintInput | The AssemblyConstraintInput object that defines the geometry and various inputs that define an assembly constraint. An AssemblyConstraintInput object is created using the AssemblyConstraints.createInput method.

Version

Introduced in version July 2025


AssemblyConstraints.classType Method

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AssemblyConstraints.classType()
This is a static method.

#include <Fusion/Components/AssemblyConstraints.h>

returnValue = adsk::fusion::AssemblyConstraints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


AssemblyConstraints.count Property

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Returns the number of assembly constraint objects in the collection.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

# Get the value of the property.
propertyValue = assemblyConstraints_var.count
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
#include <Fusion/Components/AssemblyConstraints.h>

// Get the value of the property.
uinteger propertyValue = assemblyConstraints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2025


AssemblyConstraints.createInput Method

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Creates an assembly constraint input to define an assembly constraint. Use functionality on the returned AssemblyConstraintInput to define the input needed to create an assembly constraint.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
returnValue = assemblyConstraints_var.createInput()
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

#include <Fusion/Components/AssemblyConstraints.h>

returnValue = assemblyConstraints_var->createInput();

Return Value

Type | Description
AssemblyConstraintInput | Returns an AssemblyConstraintInput.

Version

Introduced in version July 2025


AssemblyConstraints.isValid Property

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

# Get the value of the property.
propertyValue = assemblyConstraints_var.isValid
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
#include <Fusion/Components/AssemblyConstraints.h>

// Get the value of the property.
boolean propertyValue = assemblyConstraints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


AssemblyConstraints.item Method

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Function that returns the specified assembly constraint using an index into the collection.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
returnValue = assemblyConstraints_var.item(index)
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

#include <Fusion/Components/AssemblyConstraints.h>

returnValue = assemblyConstraints_var->item(index);

Return Value

Type | Description
AssemblyConstraint | 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 2025


AssemblyConstraints.itemByName Method

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

Function that returns the specified assembly constraint object using a name.

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
returnValue = assemblyConstraints_var.itemByName(name)
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

#include <Fusion/Components/AssemblyConstraints.h>

returnValue = assemblyConstraints_var->itemByName(name);

Return Value

Type | Description
AssemblyConstraint | 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 July 2025


AssemblyConstraints.objectType Property

Parent Object: AssemblyConstraints

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/AssemblyConstraints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.

# Get the value of the property.
propertyValue = assemblyConstraints_var.objectType
"assemblyConstraints_var" is a variable referencing an AssemblyConstraints object.
#include <Fusion/Components/AssemblyConstraints.h>

// Get the value of the property.
string propertyValue = assemblyConstraints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


AtCenterHolePositionDefinition Object

Derived from: HolePositionDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned at the center of a circular or elliptical edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

Returns the circular or elliptical edge the hole is centered at.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/AtCenterHolePositionDefinition.h>

Description

Returns the plane that defines the orientation and start of the hole.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Represents an attribute associated with a specific entity, Product, or Document. An attribute is a named value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, Drawing.findAttributes, FlatPatternProduct.findAttributes, Product.findAttributes, WorkingModel.findAttributes

Version

Introduced in version May 2016


Attribute.classType Method

Parent Object: Attribute
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Deletes this attribute.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Gets the name of the group this attribute is a part of.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

Gets the name of the attribute.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attribute.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Provides access to attributes associated with a specific entity, Product, or Document. Also supports the creation of new attributes.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AccessibilityAnalysis.attributes, Analysis.attributes, ArrangeFeature.attributes, AsBuiltJoint.attributes, AssemblyConstraint.attributes, BaseFeature.attributes, BossFeature.attributes, BoundaryFillFeature.attributes, BoxFeature.attributes, BRepBody.attributes, BRepEdge.attributes, BRepFace.attributes, BRepVertex.attributes, CAM.attributes, CAMAdditiveContainer.attributes, CAMFolder.attributes, CAMHoleRecognition.attributes, CAMPattern.attributes, ChamferFeature.attributes, CircularPatternConstraint.attributes, CircularPatternFeature.attributes, CoilFeature.attributes, CoincidentConstraint.attributes, CoincidentToSurfaceConstraint.attributes, CollinearConstraint.attributes, CombineFeature.attributes, Component.attributes, ConcentricConstraint.attributes, ConstructionAxis.attributes, ConstructionPlane.attributes, ConstructionPoint.attributes, CopyPasteBody.attributes, CurvatureCombAnalysis.attributes, CurvatureMapAnalysis.attributes, CustomFeature.attributes, CustomFeatureParameter.attributes, CutPasteBody.attributes, CylinderFeature.attributes, DeleteFaceFeature.attributes, Design.attributes, Document.attributes, DraftAnalysis.attributes, DraftFeature.attributes, Drawing.attributes, DrawingDocument.attributes, EqualConstraint.attributes, ExtendFeature.attributes, ExtrudeFeature.attributes, Feature.attributes, FilletFeature.attributes, FlangeFeature.attributes, FlatPattern.attributes, FlatPatternComponent.attributes, FlatPatternProduct.attributes, FormFeature.attributes, FusionDocument.attributes, GeometricConstraint.attributes, HoleFeature.attributes, HorizontalConstraint.attributes, HorizontalPointsConstraint.attributes, IsoCurveAnalysis.attributes, Joint.attributes, JointOrigin.attributes, LineOnPlanarSurfaceConstraint.attributes, LineParallelToPlanarSurfaceConstraint.attributes, LoftFeature.attributes, MeshBody.attributes, MeshCombineFaceGroupsFeature.attributes, MeshCombineFeature.attributes, MeshConvertFeature.attributes, MeshFeature.attributes, MeshGenerateFaceGroupsFeature.attributes, MeshReduceFeature.attributes, MeshRemeshFeature.attributes, MeshRepairFeature.attributes, MeshReverseNormalFeature.attributes, MeshSeparateFeature.attributes, MeshShellFeature.attributes, MeshSmoothFeature.attributes, MidPointConstraint.attributes, MinimumRadiusAnalysis.attributes, MirrorFeature.attributes, ModelParameter.attributes, MoveFeature.attributes, NCProgram.attributes, Occurrence.attributes, OffsetConstraint.attributes, OffsetFacesFeature.attributes, OffsetFeature.attributes, Operation.attributes, OperationBase.attributes, ParallelConstraint.attributes, Parameter.attributes, PatchFeature.attributes, PathPatternFeature.attributes, PerpendicularConstraint.attributes, PerpendicularToSurfaceConstraint.attributes, PipeFeature.attributes, PolygonConstraint.attributes, Product.attributes, RectangularPatternConstraint.attributes, RectangularPatternFeature.attributes, RefoldFeature.attributes, RemoveFeature.attributes, ReplaceFaceFeature.attributes, ReverseNormalFeature.attributes, RevolveFeature.attributes, RibFeature.attributes, RigidGroup.attributes, RipFeature.attributes, RuledSurfaceFeature.attributes, RuleFilletFeature.attributes, ScaleFeature.attributes, SectionAnalysis.attributes, Setup.attributes, ShellFeature.attributes, SilhouetteSplitFeature.attributes, Sketch.attributes, SketchAngularDimension.attributes, SketchArc.attributes, SketchCircle.attributes, SketchConcentricCircleDimension.attributes, SketchConicCurve.attributes, SketchControlPointSpline.attributes, SketchCurve.attributes, SketchDiameterDimension.attributes, SketchDimension.attributes, SketchDistanceBetweenLineAndPlanarSurfaceDimension.attributes, SketchDistanceBetweenPointAndSurfaceDimension.attributes, SketchEllipse.attributes, SketchEllipseMajorRadiusDimension.attributes, SketchEllipseMinorRadiusDimension.attributes, SketchEllipticalArc.attributes, SketchEntity.attributes, SketchFittedSpline.attributes, SketchFixedSpline.attributes, SketchLine.attributes, SketchLinearDiameterDimension.attributes, SketchLinearDimension.attributes, SketchOffsetCurvesDimension.attributes, SketchOffsetDimension.attributes, SketchPoint.attributes, SketchRadialDimension.attributes, SketchTangentDistanceDimension.attributes, SketchText.attributes, SmoothConstraint.attributes, SphereFeature.attributes, SplitBodyFeature.attributes, SplitFaceFeature.attributes, StitchFeature.attributes, SurfaceDeleteFaceFeature.attributes, SweepFeature.attributes, SymmetryConstraint.attributes, TangentConstraint.attributes, TangentRelationship.attributes, TessellateFeature.attributes, ThickenFeature.attributes, ThreadFeature.attributes, TorusFeature.attributes, TrimFeature.attributes, UnfoldFeature.attributes, UnstitchFeature.attributes, UntrimFeature.attributes, UserParameter.attributes, VerticalConstraint.attributes, VerticalPointsConstraint.attributes, VolumetricCustomFeature.attributes, VolumetricModelToMeshFeature.attributes, WebFeature.attributes, WorkingModel.attributes, ZebraAnalysis.attributes

Version

Introduced in version May 2016


Attributes.add Method

Parent Object: Attributes
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Returns the number of attributes in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Returns the specified attribute using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Returns the specified attribute using the name of the attribute.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

Returns an array of all of the attributes that belong to the specified group.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Attributes.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Represents the set of information specific to a ball joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion

Version

Introduced in version July 2015


BallJointMotion.classType Method

Parent Object: BallJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion

Version

Introduced in version July 2015


BallJointMotion.pitchValue Property

Parent Object: BallJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Gets and sets the pitch value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Gets and sets the roll value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BallJointMotion.h>

Description

Gets and sets the yaw value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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

Defined in namespace "adsk::core" and the header file is <Core/Application/Base.h>

Description

The base class that all other classes are derived from.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ActiveSelectionEvent.sender, AlongPathTextDefinition.path, Appearance.parent, AppearanceTextureProperty.parent, Application.activeEditObject, ApplicationCommandEvent.sender, ApplicationEvent.sender, Arrange2DProfileOrFaceEnvelopeInput.profilesOrFaces, ArrangeComponent.occurrenceOrFace, ArrangeProfileOrFaceEnvelopeDefinition.profilesAndFaces, ArrangeProfileOrFaceResultEnvelope.profileOrFace, ArrangeSelection.inputGeometry, ArrangeSelection.value, AtCenterHolePositionDefinition.planarEntity, Attribute.parent, BallJointMotion.customPitchDirectionEntity, BallJointMotion.customYawDirectionEntity, BetweenPointsRipFeatureDefinition.pointOneEntity, BetweenPointsRipFeatureDefinition.pointTwoEntity, BooleanParameterValue.parent, BooleanProperty.parent, BRepBody.findByTempId, C3MFExportOptions.geometry, CadContours2dParameterValue.parent, CadMachineAvoidGroupsParameterValue.parent, CadObjectParameterValue.parent, CadObjectParameterValue.value, CAM3MFExportOptions.exportObject, CAMAdditiveBuildExportOptions.exportObject, CAMAdditiveContainer.parent, CAMArrangeParameterValue.parent, CameraEvent.sender, CAMExportOptions.exportObject, CAMFolder.parent, CAMHoleRecognition.parent, CAMPattern.parent, Canvas.planarEntity, CanvasInput.planarEntity, ChainSelection.inputGeometry, ChainSelection.value, ChildOperationList.item, ChildOperationList.itemByName, ChildOperationList.itemByOperationId, ChoiceParameterValue.parent, ChoiceProperty.parent, CircularPatternFeature.axis, CircularPatternFeatureInput.axis, CoilFeatureInput.basePlane, CoincidentToSurfaceConstraint.surface, ColorProperty.parent, Command.editingFeature, CommandControl.parent, CommandCreatedEvent.sender, CommandEvent.sender, ConfigurationAppearanceColumn.entity, ConfigurationFeatureAspectColumn.feature, ConfigurationJointSnap.jointGeometry, ConfigurationJointSnapColumn.feature, ConfigurationJointSnapColumn.joint, ConfigurationMaterialColumn.entity, ConfigurationSuppressColumn.feature, ConfigurationVisibilityColumn.entity, 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, ConstructionPlaneOffsetThroughPointDefinition.planarEntity, ConstructionPlaneOffsetThroughPointDefinition.point, 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, CurveSelection.inputGeometry, CurveSelection.value, CustomEvent.sender, CustomFeature.features, CustomFeatureDependency.entity, CustomFeatureEvent.sender, CustomFeatureInput.features, CustomFeatureParameter.createdBy, CustomGraphicsBRepBody.parent, CustomGraphicsCurve.parent, CustomGraphicsEntity.parent, CustomGraphicsGroup.parent, CustomGraphicsLines.parent, CustomGraphicsMesh.parent, CustomGraphicsPointSet.parent, CustomGraphicsText.parent, CylindricalJointMotion.customRotationAxisEntity, DataComponent.component, DataEvent.sender, DataFile.configurationTable, Design.activeEditObject, Design.findEntityByToken, DesignDataFile.configurationTable, DocumentEvent.sender, DraftFeature.plane, DraftFeatureInput.plane, DropDownControl.parent, DXF2DImportOptions.planarEntity, DXFFlatPatternExportOptions.geometry, DXFSketchExportOptions.geometry, Event.sender, ExportOptions.geometry, ExtrudeFeature.profile, ExtrudeFeatureInput.profile, FaceContourSelection.inputGeometry, FaceContourSelection.value, FilenameProperty.parent, FitOnPathTextDefintion.path, FlatPatternProduct.activeEditObject, FlatPatternProduct.findEntityByToken, FloatParameterValue.parent, FloatProperty.parent, FromEntityStartDefinition.entity, FromEntityStartDefinition.offset, FusionArchiveExportOptions.geometry, GeometricRelationship.angleReferenceEntity, GeometricRelationship.entityOne, GeometricRelationship.entityTwo, GeometricRelationship.parent, GeometryGraphNodeProperty.value, GeometrySelection.value, HTMLEvent.sender, HttpEvent.sender, IGESExportOptions.geometry, InputChangedEvent.sender, IntegerParameterValue.parent, 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, LineOnPlanarSurfaceConstraint.planarSurface, LineParallelToPlanarSurfaceConstraint.planarSurface, ListItem.parentList, LoftCenterLineOrRail.entity, LoftDirectionEndCondition.angle, LoftDirectionEndCondition.weight, LoftPointTangentEndCondition.weight, LoftSection.entity, LoftSmoothEndCondition.weight, LoftTangentEndCondition.weight, MachineAvoidDefaultSelection.inputGeometry, MachineAvoidDefaultSelection.value, MachineAvoidDirectSelection.inputGeometry, MachineAvoidDirectSelection.value, MachineAvoidSelectionBase.value, MarkingMenuEvent.sender, MarkingMenuEventArgs.selectedEntities, Material.parent, MeshBody.baseOrFormFeature, MeshBody.findByTempId, MeshCombineFaceGroupsFeature.mesh, MeshGenerateFaceGroupsFeature.mesh, MeshGenerateFaceGroupsFeatureInput.mesh, MeshManager.parent, MeshReduceFeature.mesh, MeshReduceFeatureInput.mesh, MeshRemeshFeature.mesh, MeshRemeshFeatureInput.mesh, MeshRepairFeature.mesh, MeshRepairFeatureInput.mesh, MeshReverseNormalFeature.mesh, MeshReverseNormalFeatureInput.mesh, MeshSeparateFeature.mesh, MeshSeparateFeatureInput.mesh, MeshShellFeature.mesh, MeshShellFeatureInput.mesh, MeshSmoothFeature.mesh, MeshSmoothFeatureInput.mesh, MFGDMDataEvent.sender, MirrorFeature.mirrorPlane, MirrorFeatureInput.mirrorPlane, ModelParameter.createdBy, MouseEvent.sender, MoveFeaturePointToPointDefinition.originPoint, MoveFeaturePointToPointDefinition.targetPoint, MoveFeaturePointToPositionDefinition.point, MoveFeatureRotateDefinition.axisEntity, MoveFeatureTranslateAlongEntityDefinition.linearEntity, NavigationEvent.sender, ObjectCollection.asArray, ObjectCollection.item, OBJExportOptions.geometry, OffsetStartDefinition.offset, OnEdgeHolePositionDefinition.planarEntity, OneSideToExtentDefinition.toEntity, Operation.parent, ParameterValue.parent, PatchFeature.boundaryCurve, PatchFeatureInput.boundaryCurve, PathEntity.entity, PerpendicularToSurfaceConstraint.surface, PinSlotJointMotion.customRotationAxisEntity, PinSlotJointMotion.customSlideDirectionEntity, PlanarJointMotion.customNormalDirectionEntity, PlanarJointMotion.customPrimarySlideDirectionEntity, PlaneAndOffsetsHolePositionDefinition.planarEntity, PocketRecognitionSelection.inputGeometry, PocketRecognitionSelection.value, PocketSelection.inputGeometry, PocketSelection.value, PointHolePositionDefinition.planarEntity, PointHolePositionDefinition.point, Property.parent, PropertyGroup.parent, RadialMarkingMenu.eastCommand, RadialMarkingMenu.northCommand, RadialMarkingMenu.northeastCommand, RadialMarkingMenu.northwestCommand, RadialMarkingMenu.southCommand, RadialMarkingMenu.southeastCommand, RadialMarkingMenu.southwestCommand, RadialMarkingMenu.westCommand, RecognizedHoleSegment.face, RecognizedHoleSegment.faces, RectangularPatternFeature.directionOneEntity, RectangularPatternFeature.directionTwoEntity, RectangularPatternFeatureInput.directionOneEntity, RectangularPatternFeatureInput.directionTwoEntity, RemoveFeature.itemToRemove, RenderEvent.sender, ReplaceFaceFeature.targetFaces, ReplaceFaceFeatureInput.targetFaces, RevoluteJointMotion.customRotationAxisEntity, RevolveFeature.axis, RevolveFeature.profile, RevolveFeatureInput.axis, RevolveFeatureInput.profile, RuledSurfaceFeature.direction, RuledSurfaceFeature.profile, RuledSurfaceFeatureInput.direction, RuledSurfaceFeatureInput.profile, SATExportOptions.geometry, ScaleFeature.point, ScaleFeatureInput.point, SectionAnalysis.cutPlane, SectionAnalysisInput.cutPlaneEntity, Selection.entity, SelectionEvent.sender, SelectionSet.entities, SeparatorControl.parent, SetupChangeEvent.sender, SetupEvent.sender, SetupInput.fixtures, SetupInput.models, SetupInput.stockSolids, SilhouetteSelection.inputGeometry, SilhouetteSelection.value, SilhouetteSplitFeature.viewDirection, SilhouetteSplitFeatureInput.viewDirection, Sketch.addCenterToCenterSlot, Sketch.baseOrFormFeature, Sketch.referencePlane, SketchArc.referencedEntity, SketchCircle.referencedEntity, SketchConicCurve.referencedEntity, SketchControlPointSpline.referencedEntity, SketchCurve.referencedEntity, SketchDistanceBetweenLineAndPlanarSurfaceDimension.planarSurface, SketchDistanceBetweenPointAndSurfaceDimension.surface, SketchEllipse.referencedEntity, SketchEllipticalArc.referencedEntity, SketchEntity.referencedEntity, SketchFittedSpline.referencedEntity, SketchFixedSpline.referencedEntity, SketchLine.referencedEntity, SketchPoint.referencedEntity, SketchSelection.inputGeometry, SketchSelection.value, SketchText.referencedEntity, SliderJointMotion.customSlideDirectionEntity, SMTExportOptions.geometry, SplitBodyFeature.splittingTool, SplitBodyFeatureInput.splitBodies, SplitBodyFeatureInput.splittingTool, SplitButtonControl.parent, SplitFaceFeature.directionEntity, SplitFaceFeatureInput.splittingTool, SpunProfileInput.axis, SpunProfileInput.entities, STEPExportOptions.geometry, STLExportOptions.geometry, StringParameterValue.parent, StringProperty.parent, SweepFeature.profile, SweepFeature.solidAlignedAxis, SweepFeature.solidTwistAxis, SweepFeatureInput.profile, SweepFeatureInput.solidAlignedAxis, SweepFeatureInput.solidTwistAxis, SymmetricExtentDefinition.distance, SymmetricExtentDefinition.taperAngle, TangentRelationship.faceOne, TangentRelationship.tangentFaces, TangentRelationshipInput.tangentFaces, TimelineGroup.entity, TimelineObject.entity, ToEntityExtentDefinition.entity, ToEntityExtentDefinition.offset, ToolbarControl.parent, TrimFeature.trimTool, TrimFeatureInput.trimTool, TwoSidesToExtentDefinition.toEntityOne, TwoSidesToExtentDefinition.toEntityTwo, USDExportOptions.geometry, UserInterfaceGeneralEvent.sender, ValidateInputsEvent.sender, ValueInput.objectReference, VolumetricCustomFeature.volumetricModel, VolumetricCustomFeatureInput.boundaryBody, VolumetricModel.boundaryBody, VolumetricModelToMeshFeature.volumetricModel, VolumetricModelToMeshFeatureInput.volumetricModel, WebRequestEvent.sender, WebRequestEventArgs.occurrenceOrDocument, WorkingModel.activeEditObject, WorkingModel.findEntityByToken, WorkspaceEvent.sender

Derived Classes

AccessibilityAnalyses, Analyses, Analysis, APIPreferences, Appearance, Appearances, AppearanceTexture, Application, ApplicationFolders, AreaProperties, ArrangeComponent, ArrangeComponents, ArrangeDefinition, ArrangeDefinitionInput, ArrangeEnvelopeDefinition, ArrangeEnvelopeInput, ArrangeFeatureInput, ArrangeFeatures, ArrangeOccurrenceResult, ArrangeOccurrenceResults, ArrangeResultEnvelope, ArrangeResultEnvelopes, ArrangeSelections, AsBuiltJoint, AsBuiltJointInput, AsBuiltJointList, AsBuiltJoints, AssemblyConstraint, AssemblyConstraintInput, AssemblyConstraints, Attribute, Attributes, BaseComponent, BaseFeatures, BeamNetwork, BossFeatureInput, BossFeatures, BossFeatureSideInput, BossPositionDefinition, BoundaryFillFeatureInput, BoundaryFillFeatures, BoundingBox2D, BoundingBox3D, BoxFeatures, BRepBodies, BRepBody, BRepBodyDefinition, BRepCell, BRepCells, BRepCoEdge, BRepCoEdgeDefinition, BRepCoEdgeDefinitions, BRepCoEdges, BRepEdge, BRepEdgeDefinition, BRepEdges, BRepFace, BRepFaceDefinition, BRepFaceDefinitions, BRepFaces, BRepLoop, BRepLoopDefinition, BRepLoopDefinitions, BRepLoops, BRepLump, BRepLumpDefinition, BRepLumpDefinitions, BRepLumps, BRepShell, BRepShellDefinition, BRepShellDefinitions, BRepShells, BRepVertex, BRepVertexDefinition, BRepVertices, BRepWire, BRepWireDefinition, BRepWireEdgeDefinition, BRepWireEdgeDefinitions, BRepWires, CAM3MFExportMetadataOptions, CAMAdditiveBuildExportFilter, Camera, CAMExportFuture, CAMExportManager, CAMExportOptions, CAMFolders, CAMLibrary, CAMLibraryManager, CAMManager, CAMParameter, CAMParameters, CAMPatterns, CAMTemplate, Canvas, CanvasEffects, Canvases, CanvasInput, ChamferEdgeSet, ChamferEdgeSets, ChamferFeatureInput, ChamferFeatures, ChamferTypeDefinition, ChildOperationList, CircularPatternConstraintInput, CircularPatternFeatureInput, CircularPatternFeatures, CloudFileDialog, CoilFeatureInput, CoilFeatures, Color, ColorControlPoint, CombineFeatureInput, CombineFeatures, Command, CommandDefinition, CommandDefinitions, CommandInput, CommandInputs, ComponentList, Components, ConfigurationAppearanceColumns, ConfigurationCell, ConfigurationColumn, ConfigurationColumns, ConfigurationCustomThemeTables, ConfigurationJointSnap, ConfigurationJointSnaps, ConfigurationMaterialColumns, ConfigurationPlasticRuleColumns, ConfigurationRow, ConfigurationRows, ConfigurationSheetMetalRuleColumns, ConfigurationTable, ConstructionAxes, ConstructionAxis, ConstructionAxisDefinition, ConstructionAxisInput, ConstructionPlane, ConstructionPlaneDefinition, ConstructionPlaneInput, ConstructionPlanes, ConstructionPoint, ConstructionPointDefinition, ConstructionPointInput, ConstructionPoints, ContactSet, ContactSets, ControlDefinition, CopyFileInput, CopyPasteBodies, CreateFromCAMTemplateInput, CurvatureCombAnalyses, CurvatureMapAnalyses, Curve2D, Curve3D, Curve3DPath, CurveEvaluator2D, CurveEvaluator3D, CurveSelections, CustomFeatureDefinition, CustomFeatureDependencies, CustomFeatureDependency, CustomFeatureInput, CustomFeatureParameters, CustomFeatures, CustomGraphicsBillBoard, CustomGraphicsColorEffect, CustomGraphicsCoordinates, CustomGraphicsEntity, CustomGraphicsGroups, CustomGraphicsViewPlacement, CustomGraphicsViewScale, CustomNamedValues, CutPasteBodies, CylinderFeatures, Data, DataComponent, DataFile, DataFileFuture, DataFiles, DataFolder, DataFolders, DataHub, DataHubs, DataObject, DataProject, DataProjects, Decal, DecalInput, Decals, DefaultUnitsPreferences, DefaultUnitsPreferencesCollection, DeleteFaceFeatures, Document, DocumentReference, DocumentReferences, Documents, DocumentStockMaterialLibrary, DraftAnalyses, DraftFeatureInput, DraftFeatures, DrawingExportManager, DrawingExportOptions, Event, EventArgs, ExportManager, ExportOptions, ExtendFeatureInput, ExtendFeatures, ExtentDefinition, ExtrudeFeatureInput, ExtrudeFeatures, FaceGroup, FaceGroups, FavoriteAppearances, FavoriteMaterials, Feature, FeatureList, Features, FileDialog, FilletEdgeSet, FilletEdgeSetInput, FilletEdgeSetInputs, FilletEdgeSets, FilletFeatureInput, FilletFeatures, FlangeFeatures, FolderDialog, FormFeatures, Future, GeneralPreferences, GeneratedData, GeneratedDataCollection, GenerateToolpathFuture, GeometricConstraint, GeometricConstraintList, GeometricConstraints, GeometricRelationship, GeometricRelationships, GeometrySelection, Graph, GraphConnector, GraphicsPreferences, GraphNode, GraphNodeProperties, GraphNodeProperty, GridPreferences, HoleFeatureInput, HoleFeatures, HolePositionDefinition, HttpRequest, HttpResponse, ImportManager, ImportOptions, InCanvasRendering, InterferenceInput, InterferenceResult, InterferenceResults, IsoCurveAnalyses, Joint, JointGeometry, JointInput, JointLimits, JointList, JointMotion, JointOrigin, JointOriginInput, JointOriginList, JointOrigins, Joints, LinearMarkingMenu, ListItem, ListItems, LoftCenterLineOrRail, LoftCenterLineOrRails, LoftEndCondition, LoftFeatureInput, LoftFeatures, LoftSection, LoftSections, Machine, MachineAvoidGroups, MachineAxis, MachineAxisConfiguration, MachineAxisConfigurations, MachineAxisInput, MachineAxisRange, MachineCapabilities, MachineElement, MachineElements, MachineInput, MachinePart, MachinePartInput, MachineParts, MachineQuery, MachineSpindle, MachineSpindleInput, MachineToolStation, MachineToolStationInput, MachiningTime, ManufacturingModel, ManufacturingModelInput, ManufacturingModels, Material, MaterialLibraries, MaterialLibrary, MaterialPreferences, Materials, Matrix2D, Matrix3D, MeasureManager, MeasureResults, MergeFacesFeatureInput, MergeFacesFeatures, MeshBodies, MeshBody, MeshBodyDisplayOverrides, MeshBodyList, MeshCombineFaceGroupsFeatureInput, MeshCombineFaceGroupsFeatures, MeshCombineFeatureInput, MeshCombineFeatures, MeshConvertFeatureInput, MeshConvertFeatures, MeshGenerateFaceGroupsFeatureInput, MeshGenerateFaceGroupsFeatures, MeshManager, MeshReduceFeatureInput, MeshReduceFeatures, MeshRemeshFeatureInput, MeshRemeshFeatures, MeshRepairFeatureInput, MeshRepairFeatures, MeshReverseNormalFeatureInput, MeshReverseNormalFeatures, MeshSeparateFeatureInput, MeshSeparateFeatures, MeshShellFeatureInput, MeshShellFeatures, MeshSmoothFeatureInput, MeshSmoothFeatures, Milestone, Milestones, MinimumRadiusAnalyses, MirrorFeatureInput, MirrorFeatures, ModelParameters, ModifyUtility, MoveFeatureDefinition, MoveFeatureInput, MoveFeatures, NamedValues, NamedView, NamedViews, NCProgramInput, NCProgramPostProcessOptions, NCPrograms, NetworkPreferences, ObjectCollection, Occurrence, OccurrenceList, Occurrences, OffsetConstraintInput, OffsetFacesFeatures, OffsetFeatureInput, OffsetFeatures, OperationBase, OperationInput, Operations, OperationStrategy, OptimizedOrientationResult, OrientedBoundingBox3D, Palette, Palettes, Parameter, ParameterList, ParameterValue, PatchFeatureInput, PatchFeatures, Path, PathEntity, PathPatternFeatureInput, PathPatternFeatures, PatternElement, PatternElements, PersonalUseLimits, PhysicalProperties, PipeFeatureInput, PipeFeatures, PlasticRule, PlasticRules, PlasticRuleValue, Point2D, Point3D, PolygonMesh, PostConfiguration, PostConfigurationQuery, PostProcessInput, Preferences, PrintSetting, PrintSettingItem, PrintSettingQuery, Product, ProductPreferences, ProductPreferencesCollection, Products, ProductUsageData, Profile, ProfileCurve, ProfileCurves, ProfileLoop, ProfileLoops, Profiles, ProgressBar, ProgressDialog, Properties, Property, PropertyGroup, PropertyGroups, RadialMarkingMenu, RecognizedHole, RecognizedHoleGroup, RecognizedHoleGroups, RecognizedHoles, RecognizedHoleSegment, RecognizedHolesInput, RecognizedPocket, RecognizedPockets, RectangularPatternConstraintInput, RectangularPatternFeatureInput, RectangularPatternFeatures, RefoldFeatures, RemoveFeatures, RenderEnvironment, RenderEnvironments, RenderFuture, Rendering, RenderManager, ReplaceFaceFeatureInput, ReplaceFaceFeatures, ReverseNormalFeatures, RevolveFeatureInput, RevolveFeatures, RibFeatures, RigidGroup, RigidGroupList, RigidGroups, RipFeatureDefinition, RipFeatureInput, RipFeatures, RuledSurfaceFeatureInput, RuledSurfaceFeatures, RuleFilletFeatures, SaveImageFileOptions, ScalarControlPoint, ScaleFeatureInput, ScaleFeatures, SceneSettings, Script, ScriptInput, Scripts, SectionAnalyses, SectionAnalysisInput, Selection, SelectionFilters, Selections, SelectionSet, SelectionSets, SetupInput, Setups, SetupVisibilityManager, SharedLink, SharedPointCoincident, SheetMetalRule, SheetMetalRules, SheetMetalRuleValue, ShellFeatureInput, ShellFeatures, SilhouetteSplitFeatureInput, SilhouetteSplitFeatures, Sketch, SketchArcs, SketchCircles, SketchConicCurves, SketchControlPointSplines, SketchCurves, SketchDimension, SketchDimensionList, SketchDimensions, SketchEllipses, SketchEllipticalArcs, SketchEntity, SketchEntityList, Sketches, SketchFittedSplines, SketchFixedSplines, SketchLineList, SketchLines, SketchPointList, SketchPoints, SketchTextDefinition, SketchTextInput, SketchTexts, Snapshot, Snapshots, SphereFeatures, SplitBodyFeatureInput, SplitBodyFeatures, SplitFaceFeatureInput, SplitFaceFeatures, SpunProfileInput, Status, StatusMessage, StatusMessages, StitchFeatureInput, StitchFeatures, StockMaterial, Surface, SurfaceDeleteFaceFeatures, SurfaceEvaluator, SweepFeatureInput, SweepFeatures, TangentRelationship, TangentRelationshipInput, TangentRelationships, TemporaryBRepManager, TessellateFeatureInput, TessellateFeatures, TextureMapControl, ThickenFeatureInput, ThickenFeatures, ThreadDataQuery, ThreadFeatureInput, ThreadFeatures, ThreadInfo, Timeline, TimelineGroups, TimelineObject, Tool, Toolbar, ToolbarControl, ToolbarControlList, ToolbarControls, ToolbarPanel, ToolbarPanelList, ToolbarPanels, Toolbars, ToolbarTab, ToolbarTabList, ToolbarTabs, ToolLibrary, ToolPreset, ToolPresets, ToolQuery, ToolQueryResult, TorusFeatures, TriangleMesh, TriangleMeshCalculator, TriangleMeshList, TrimFeatureInput, TrimFeatures, TSplineBodies, TSplineBody, UnfoldFeatures, UnitAndValuePreferences, UnitsManager, UnstitchFeatures, UntrimFeatureInput, UntrimFeatures, URL, User, UserInterface, UserParameters, ValueInput, Vector2D, Vector3D, Viewport, VolumetricCustomFeatureInput, VolumetricCustomFeatures, VolumetricModel, VolumetricModelToMeshFeatureInput, VolumetricModelToMeshFeatures, VolumetricSample, VolumetricSampler, WebFeatures, Workspace, WorkspaceList, Workspaces, ZebraAnalyses

Version

Introduced in version August 2014


Base.classType Method

Parent Object: Base
Defined in namespace "adsk::core" and the header file is <Core/Application/Base.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Base.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Base.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

The BaseComponent object that defines all of the common design data and is the base class for the product specific components.

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.
canvases | Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.
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.
dataComponent Preview Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.
decals | Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
propertyGroups | Returns the PropertyGroups object associated with this component.

Derived Classes

Component

Version

Introduced in version August 2014


BaseComponent.allOccurrences Property

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the B-Rep bodies collection associated with this component.

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.canvases Property

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.canvases
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<Canvases> propertyValue = baseComponent_var->canvases();

Property Value

This is a read only property whose value is a Canvases.

Version

Introduced in version July 2023


BaseComponent.classType Method

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

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.

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.dataComponent Property

Parent Object: BaseComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.dataComponent
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = baseComponent_var->dataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Version

Introduced in version May 2024


BaseComponent.decals Property

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.decals
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<Decals> propertyValue = baseComponent_var->decals();

Property Value

This is a read only property whose value is a Decals.

Version

Introduced in version September 2024


BaseComponent.findBRepUsingPoint Method

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Finds all the entities of the specified type at the specified location.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the parent product this component is owned by.

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


BaseComponent.propertyGroups Property

Parent Object: BaseComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/BaseComponent.h>

Description

Returns the PropertyGroups object associated with this component.

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.propertyGroups
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<PropertyGroups> propertyValue = baseComponent_var->propertyGroups();

Property Value

This is a read only property whose value is a PropertyGroups.

Version

Introduced in version January 2024


BaseFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

The BaseFeature class represents a direct edit feature within a parametric design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
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.
updateBody | Update an existing source BRepBody created by this BaseFeature. The input BRepBody definition will be copied into the existing BRepBody.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
sketches | Returns an array of the sketches associated with this base feature.
sourceBodies Returns the B-Rep bodies owned by the base feature.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations. The result bodies can be obtained by using the bodies property of the BaseFeature object.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ArrangeFeature.baseFeature, BaseFeature.baseFeature, BaseFeature.createForAssemblyContext, BaseFeature.nativeObject, BaseFeatures.add, BaseFeatures.item, BaseFeatures.itemByName, BossFeature.baseFeature, BossFeatureInput.targetBaseFeature, BoundaryFillFeature.baseFeature, BoundaryFillFeatureInput.targetBaseFeature, BoxFeature.baseFeature, BRepBody.baseFeature, CanvasInput.targetBaseFeature, ChamferFeature.baseFeature, ChamferFeatureInput.targetBaseFeature, CircularPatternFeature.baseFeature, CircularPatternFeatureInput.targetBaseFeature, CoilFeature.baseFeature, CoilFeatureInput.targetBaseFeature, CombineFeature.baseFeature, CombineFeatureInput.targetBaseFeature, ConstructionAxis.baseFeature, ConstructionPlane.baseFeature, ConstructionPoint.baseFeature, CopyPasteBody.baseFeature, CustomFeature.baseFeature, CutPasteBody.baseFeature, CylinderFeature.baseFeature, DecalInput.targetBaseFeature, DeleteFaceFeature.baseFeature, DraftFeature.baseFeature, DraftFeatureInput.targetBaseFeature, ExtendFeature.baseFeature, ExtendFeatureInput.targetBaseFeature, ExtrudeFeature.baseFeature, ExtrudeFeatureInput.targetBaseFeature, Feature.baseFeature, FilletFeature.baseFeature, FilletFeatureInput.targetBaseFeature, FlangeFeature.baseFeature, FlatPattern.baseFeature, FormFeature.baseFeature, HoleFeature.baseFeature, HoleFeatureInput.targetBaseFeature, LoftFeature.baseFeature, LoftFeatureInput.targetBaseFeature, MeshCombineFaceGroupsFeature.baseFeature, MeshCombineFaceGroupsFeatureInput.targetBaseFeature, MeshCombineFeature.baseFeature, MeshCombineFeatureInput.targetBaseFeature, MeshConvertFeature.baseFeature, MeshConvertFeatureInput.targetBaseFeature, MeshFeature.baseFeature, MeshGenerateFaceGroupsFeature.baseFeature, MeshGenerateFaceGroupsFeatureInput.targetBaseFeature, MeshReduceFeature.baseFeature, MeshReduceFeatureInput.targetBaseFeature, MeshRemeshFeature.baseFeature, MeshRemeshFeatureInput.targetBaseFeature, MeshRepairFeature.baseFeature, MeshRepairFeatureInput.targetBaseFeature, MeshReverseNormalFeature.baseFeature, MeshReverseNormalFeatureInput.targetBaseFeature, MeshSeparateFeature.baseFeature, MeshSeparateFeatureInput.targetBaseFeature, MeshShellFeature.baseFeature, MeshShellFeatureInput.targetBaseFeature, MeshSmoothFeature.baseFeature, MeshSmoothFeatureInput.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, PipeFeatureInput.targetBaseFeature, RectangularPatternFeature.baseFeature, RectangularPatternFeatureInput.targetBaseFeature, RefoldFeature.baseFeature, RemoveFeature.baseFeature, ReplaceFaceFeature.baseFeature, ReplaceFaceFeatureInput.targetBaseFeature, ReverseNormalFeature.baseFeature, RevolveFeature.baseFeature, RevolveFeatureInput.targetBaseFeature, RibFeature.baseFeature, RipFeature.baseFeature, RuledSurfaceFeature.baseFeature, RuledSurfaceFeatureInput.targetBaseFeature, 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, TessellateFeature.baseFeature, TessellateFeatureInput.targetBaseFeature, ThickenFeature.baseFeature, ThickenFeatureInput.targetBaseFeature, ThreadFeature.baseFeature, ThreadFeatureInput.targetBaseFeature, TorusFeature.baseFeature, TrimFeature.baseFeature, TrimFeatureInput.targetBaseFeature, UnfoldFeature.baseFeature, UnstitchFeature.baseFeature, UntrimFeature.baseFeature, VolumetricCustomFeature.baseFeature, VolumetricModelToMeshFeature.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns an array of the construction axes associated with this base feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns an array of the construction planes associated with this base feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns an array of the construction points associated with this base feature.

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.createForAssemblyContext Method

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.createForAssemblyContext(occurrence)
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BaseFeature | 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 January 2021


BaseFeature.deleteMe Method

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

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.entityToken Property

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.entityToken
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
string propertyValue = baseFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BaseFeature.errorOrWarningMessage Property

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Exits from edit mode in the user-interface. If this base feature in not in edit mode, then nothing happens.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns an array of the mesh bodies associated with this base feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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.nativeObject Property

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

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.

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.nativeObject
"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->nativeObject();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2021


BaseFeature.objectType Property

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns an array of the sketches associated with this base feature.

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.sourceBodies Property

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the B-Rep bodies owned by the base feature.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations. The result bodies can be obtained by using the bodies property of the BaseFeature object.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.sourceBodies
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = baseFeature_var->sourceBodies();

Property Value

This is a read only property whose value is an array of type BRepBody.

Version

Introduced in version October 2022


BaseFeature.startEdit Method

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Set the user-interface so that the base body is in edit mode.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Returns the timeline object associated with this feature.

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


BaseFeature.updateBody Method

Parent Object: BaseFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeature.h>

Description

Update an existing source BRepBody created by this BaseFeature. The input BRepBody definition will be copied into the existing BRepBody.

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.updateBody(sourceBody, newBody)
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->updateBody(sourceBody, newBody);

Return Value

Type | Description
boolean | Returns true if the body was updated, or false if the update failed.

Parameters

Name | Type | Description
sourceBody | BRepBody | The source BRepBody to update. The source bodies of a BaseFeature are only available from the bodies collection of the BaseFeature when the BaseFeature is in edit mode.
newBody | BRepBody | The BRepBody whose definition will be used to replace the existing source body's definition.

Version

Introduced in version January 2021


BaseFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

The BaseFeature class represents a direct edit feature within a parametric design.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

Creates a new empty base feature in the parent component.

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
baseFeatures.add | Demonstrates the baseFeature.add method.
BaseFeature Sample | Creates a new base feature.
Sketches.addToBaseOrFormFeature | Demonstrates the Sketches.addToBaseOrFormFeature method.

Version

Introduced in version May 2016


baseFeatures.add

Description

Demonstrates the baseFeature.add method.

Code Samples

  • Python
def demo_baseFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    baseFeatures = rootComp.features.baseFeatures
    baseFeature = baseFeatures.add()


BaseFeatures.classType Method

Parent Object: BaseFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

The number of base features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

Function that returns the specified base feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

Function that returns the specified base feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BaseFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


BeamNetwork Object

BeamNetwork Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A geometry reference property that defines a BeamNetwork object which is commonly used in discrete lattice structures.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | The creator function of the BeamNetwork object.

Properties

Name | Description
beams | The beams of the beam network. Each beam is a pair of vertex indices. The size of the array should be a multiple of 2, and equal to the length of the radii array.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radii | The radii of the beams. Each radius is a double value. The radii define the radius of one end of the beam that corresponds to the same index in the beams array. The size of the array should be a multiple of 2, and equal to the length of the beams array.
vertices | The vertices of the beam network. Each vertex is a Point3D.

Accessed From

BeamNetwork.create, GeometryGraphNodeProperty.beamNetwork

Version

Introduced in version July 2025


BeamNetwork.beams Property

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

The beams of the beam network. Each beam is a pair of vertex indices. The size of the array should be a multiple of 2, and equal to the length of the radii array.

Syntax

  • Python
  • C++
"beamNetwork_var" is a variable referencing a BeamNetwork object.

# Get the value of the property.
propertyValue = beamNetwork_var.beams

# Set the value of the property.
beamNetwork_var.beams = propertyValue
"beamNetwork_var" is a variable referencing a BeamNetwork object.
#include <Volume/Volumetric/BeamNetwork.h>

// Get the value of the property.
std::vector<uinteger> propertyValue = beamNetwork_var->beams();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = beamNetwork_var->beams(value_var);

Property Value

This is a read/write property whose value is an array of type uinteger.

Version

Introduced in version July 2025


BeamNetwork.classType Method

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.BeamNetwork.classType()
This is a static method.

#include <Volume/Volumetric/BeamNetwork.h>

returnValue = adsk::volume::BeamNetwork::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


BeamNetwork.create Method

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

The creator function of the BeamNetwork object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.BeamNetwork.create()
This is a static method.

#include <Volume/Volumetric/BeamNetwork.h>

returnValue = adsk::volume::BeamNetwork::create();

Version

Introduced in version July 2025


BeamNetwork.isValid Property

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"beamNetwork_var" is a variable referencing a BeamNetwork object.

# Get the value of the property.
propertyValue = beamNetwork_var.isValid
"beamNetwork_var" is a variable referencing a BeamNetwork object.
#include <Volume/Volumetric/BeamNetwork.h>

// Get the value of the property.
boolean propertyValue = beamNetwork_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


BeamNetwork.objectType Property

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"beamNetwork_var" is a variable referencing a BeamNetwork object.

# Get the value of the property.
propertyValue = beamNetwork_var.objectType
"beamNetwork_var" is a variable referencing a BeamNetwork object.
#include <Volume/Volumetric/BeamNetwork.h>

// Get the value of the property.
string propertyValue = beamNetwork_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


BeamNetwork.radii Property

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

The radii of the beams. Each radius is a double value. The radii define the radius of one end of the beam that corresponds to the same index in the beams array. The size of the array should be a multiple of 2, and equal to the length of the beams array.

Syntax

  • Python
  • C++
"beamNetwork_var" is a variable referencing a BeamNetwork object.

# Get the value of the property.
propertyValue = beamNetwork_var.radii

# Set the value of the property.
beamNetwork_var.radii = propertyValue
"beamNetwork_var" is a variable referencing a BeamNetwork object.
#include <Volume/Volumetric/BeamNetwork.h>

// Get the value of the property.
std::vector<double> propertyValue = beamNetwork_var->radii();

// Set the value of the property, where value_var is a double.
bool returnValue = beamNetwork_var->radii(value_var);

Property Value

This is a read/write property whose value is an array of type double.

Version

Introduced in version July 2025


BeamNetwork.vertices Property

Parent Object: BeamNetwork

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BeamNetwork.h>

Description

The vertices of the beam network. Each vertex is a Point3D.

Syntax

  • Python
  • C++
"beamNetwork_var" is a variable referencing a BeamNetwork object.

# Get the value of the property.
propertyValue = beamNetwork_var.vertices

# Set the value of the property.
beamNetwork_var.vertices = propertyValue
"beamNetwork_var" is a variable referencing a BeamNetwork object.
#include <Volume/Volumetric/BeamNetwork.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = beamNetwork_var->vertices();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = beamNetwork_var->vertices(value_var);

Property Value

This is a read/write property whose value is an array of type Point3D.

Version

Introduced in version July 2025


BetweenPointsRipFeatureDefinition Object

Derived from: RipFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

The definition for an along edge rip.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
gapDistance | Gets the ModelParameter that defines the gap distance of the rip. The value can be edited by using the properties of 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.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointOneEntity | Gets and sets the BRepEdge or BRepVertex that defines the first point for a between points rip. If a BRepEdge is returned the pointOneOffset property will control the position of the point along the edge.
pointOneOffset | Gets the ModelParameter that defines the offset for the first point of a between points rip. This is the physical distance from the topological start of the edge. If the offset is either negative, or exceeds the edge length, then the point will be taken as the corresponding vertex of the edge. Returns null if the first point is defined by a vertex. The value can be edited by using the properties of the returned ModelParameter object.
pointTwoEntity | Gets and sets the BRepEdge or BRepVertex that defines the second point for a between points rip. If a BRepEdge is returned the pointTwoOffset property will control the position of the point along the edge.
pointTwoOffset | Gets the ModelParameter that defines the offset for the second point of a between points rip. This is the physical distance from the topological start of the edge. If the offset is either negative, or exceeds the edge length, then the point will be taken as the corresponding vertex of the edge. Returns null if the first point is defined by a vertex. The value can be edited by using the properties of the returned ModelParameter object.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.classType Method

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BetweenPointsRipFeatureDefinition.classType()
This is a static method.

#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

returnValue = adsk::fusion::BetweenPointsRipFeatureDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.gapDistance Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Gets the ModelParameter that defines the gap distance of the rip. The value can be edited by using the properties of the returned ModelParameter object.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.gapDistance
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = betweenPointsRipFeatureDefinition_var->gapDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.isValid Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.isValid
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
boolean propertyValue = betweenPointsRipFeatureDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.objectType Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.objectType
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
string propertyValue = betweenPointsRipFeatureDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.pointOneEntity Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Gets and sets the BRepEdge or BRepVertex that defines the first point for a between points rip. If a BRepEdge is returned the pointOneOffset property will control the position of the point along the edge.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.pointOneEntity

# Set the value of the property.
betweenPointsRipFeatureDefinition_var.pointOneEntity = propertyValue
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = betweenPointsRipFeatureDefinition_var->pointOneEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = betweenPointsRipFeatureDefinition_var->pointOneEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.pointOneOffset Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Gets the ModelParameter that defines the offset for the first point of a between points rip. This is the physical distance from the topological start of the edge. If the offset is either negative, or exceeds the edge length, then the point will be taken as the corresponding vertex of the edge. Returns null if the first point is defined by a vertex. The value can be edited by using the properties of the returned ModelParameter object.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.pointOneOffset
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = betweenPointsRipFeatureDefinition_var->pointOneOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.pointTwoEntity Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Gets and sets the BRepEdge or BRepVertex that defines the second point for a between points rip. If a BRepEdge is returned the pointTwoOffset property will control the position of the point along the edge.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.pointTwoEntity

# Set the value of the property.
betweenPointsRipFeatureDefinition_var.pointTwoEntity = propertyValue
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = betweenPointsRipFeatureDefinition_var->pointTwoEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = betweenPointsRipFeatureDefinition_var->pointTwoEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2023


BetweenPointsRipFeatureDefinition.pointTwoOffset Property

Parent Object: BetweenPointsRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

Description

Gets the ModelParameter that defines the offset for the second point of a between points rip. This is the physical distance from the topological start of the edge. If the offset is either negative, or exceeds the edge length, then the point will be taken as the corresponding vertex of the edge. Returns null if the first point is defined by a vertex. The value can be edited by using the properties of the returned ModelParameter object.

Syntax

  • Python
  • C++
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.

# Get the value of the property.
propertyValue = betweenPointsRipFeatureDefinition_var.pointTwoOffset
"betweenPointsRipFeatureDefinition_var" is a variable referencing a BetweenPointsRipFeatureDefinition object.
#include <Fusion/SheetMetal/BetweenPointsRipFeatureDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = betweenPointsRipFeatureDefinition_var->pointTwoOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2023


BooleanGraphNodeProperty Object

BooleanGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a boolean.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.classType Method

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.BooleanGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

returnValue = adsk::volume::BooleanGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.description Property

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.

# Get the value of the property.
propertyValue = booleanGraphNodeProperty_var.description
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.
#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = booleanGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.isValid Property

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.

# Get the value of the property.
propertyValue = booleanGraphNodeProperty_var.isValid
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.
#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = booleanGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.name Property

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.

# Get the value of the property.
propertyValue = booleanGraphNodeProperty_var.name
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.
#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = booleanGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.objectType Property

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.

# Get the value of the property.
propertyValue = booleanGraphNodeProperty_var.objectType
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.
#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = booleanGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


BooleanGraphNodeProperty.value Property

Parent Object: BooleanGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/BooleanGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.

# Get the value of the property.
propertyValue = booleanGraphNodeProperty_var.value

# Set the value of the property.
booleanGraphNodeProperty_var.value = propertyValue
"booleanGraphNodeProperty_var" is a variable referencing a BooleanGraphNodeProperty object.
#include <Volume/Volumetric/BooleanGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = booleanGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a boolean.
bool returnValue = booleanGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


BooleanParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

A parameter value that is a boolean.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
value | Get or set the value of the parameter.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version September 2021


BooleanParameterValue.classType Method

Parent Object: BooleanParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.BooleanParameterValue.classType()
This is a static method.

#include <Cam/Operations/BooleanParameterValue.h>

returnValue = adsk::cam::BooleanParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


BooleanParameterValue.isValid Property

Parent Object: BooleanParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.

# Get the value of the property.
propertyValue = booleanParameterValue_var.isValid
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.
#include <Cam/Operations/BooleanParameterValue.h>

// Get the value of the property.
boolean propertyValue = booleanParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


BooleanParameterValue.objectType Property

Parent Object: BooleanParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.

# Get the value of the property.
propertyValue = booleanParameterValue_var.objectType
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.
#include <Cam/Operations/BooleanParameterValue.h>

// Get the value of the property.
string propertyValue = booleanParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


BooleanParameterValue.parent Property

Parent Object: BooleanParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.

# Get the value of the property.
propertyValue = booleanParameterValue_var.parent
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.
#include <Cam/Operations/BooleanParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = booleanParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


BooleanParameterValue.value Property

Parent Object: BooleanParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/BooleanParameterValue.h>

Description

Get or set the value of the parameter.

Syntax

  • Python
  • C++
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.

# Get the value of the property.
propertyValue = booleanParameterValue_var.value

# Set the value of the property.
booleanParameterValue_var.value = propertyValue
"booleanParameterValue_var" is a variable referencing a BooleanParameterValue object.
#include <Cam/Operations/BooleanParameterValue.h>

// Get the value of the property.
boolean propertyValue = booleanParameterValue_var->value();

// Set the value of the property, where value_var is a boolean.
bool returnValue = booleanParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version September 2021


BooleanProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

A property that is a Boolean value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
value | Gets and sets the value of this property.

Version

Introduced in version August 2014


BooleanProperty.classType Method

Parent Object: BooleanProperty
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BooleanProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/BooleanProperty.h>

Description

Gets and sets the value of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Provides a command input to get a boolean value from the user. This is represented in the user interface as either a button or a check box.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
resourceFolder | Gets and sets the folder that contains the icon to display on the button. Text can also be displayed, which is specified using the text property. More information about icons can be found in the user manual topic User Interface Customization.
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 check box 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: BoolValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
returnValue = boolValueCommandInput_var.deleteMe()
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

#include <Core/UserInterface/BoolValueCommandInput.h>

returnValue = boolValueCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


BoolValueCommandInput.id Property

Parent Object: BoolValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Indicates if this is being shown as a button or check box.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets and sets the folder that contains the icon to display on the button. Text can also be displayed, which is specified using the text property. More information about icons can be found in the user manual topic User Interface Customization.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BoolValueCommandInput.h>

Description

Gets or sets the state of this input. If it's being displayed as a check box 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.

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


BossFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Object that represents an existing boss feature in a design. For history free model this interface has limited functionality.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
createInput | Creates object with inputs this feature represents. To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True).
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.
update | Changes the boss feature (or boss connection) to the input provided. To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True).

Properties

Name | Description
alignmentDepth | Returns the model parameter controlling the step depth used for alignment of its counterparts.
alignmentDiameter | Returns the model parameter controlling the step diameter used for alignment of its counterparts.
alignmentDraftAngle | Returns the model parameter controlling the step draft angle.
alignmentRootRadius | Returns the model parameter controlling blend radius of the boss alignment root.
alignmentTipRadius | Returns the model parameter controlling blend radius of the boss alignment top face.
alignmentType | Returns the current boss alignment shape this feature represents.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
diameter | Returns the model parameter controlling the shank diameter.
direction | Returns the direction of the boss feature with respect to selected position point. For selected sketch point this direction represents a Z-axis of the sketch.
draftAngle | Returns the model parameter controlling the shank draft angle.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
holeCountersinkAngle | Returns the model parameter controlling countersink angle for countersink hole. If hole type is not set to countersink hole or boss shape is to BossBlank this parameter is unused.
holeDepth | Returns the model parameter controlling the hole depth with respect to hole extent type. If hole extent type is set to BossHoleThrough parameter not used. If hole extent type is BossBlindFull the parameter is a distance from farthest face. If hole extent type is set to BossBlindDepth the parameter is a distance from start face of the hole.
holeDiameter | Returns the model parameter controlling the hole diameter.
holeDraftAngle | Returns the model parameter controlling hole draft angle.
holeEndRadius | Returns the model parameter controlling blend radius of the hole end.
holeExtentType | Returns the current type of hole extent this feature represents.
holeMajorDepth | Returns the model parameter controlling major hole depth for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.
holeMajorDiameter | Returns the model parameter controlling major hole diameter for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.
holeMajorDraftAngle | Returns the model parameter controlling major hole draft angle for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.
holeMajorRootRadius | Returns the model parameter controlling blend radius of major hole counterbore root.
holeMajorTipRadius | Returns the model parameter controlling blend radius of major hole counterbore.
holeStartRadius | Returns the model parameter controlling blend radius of the hole start.
holeType | Returns the current type of hole this feature represents.
innerRadius | Returns the model parameter for inner radius - reference for parametric expressions.
isDirectionFlipped | Gets and sets if the direction of the boss (or boss connection) is flipped.
isGeometryOpposite | Gets if this boss feature instance represents a bottom side where screw thread engages with the part. If this feature instance represents a geometry where screw head engages it returns false.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset | Returns the model parameter controlling the offset from the selected parting plane.
offsetClearance | Returns the model parameter controlling the offset clearance from the selected parting plane and offset.
parentComponent | Returns the parent component that owns this feature.
positionDefinition | Returns a BossPositionDefinition object that provides access to the information used to define the position of the boss feature.
ribBlendRadius | Returns the model parameter controlling size of rib root blend radius.
ribChamferAngle | Returns the model parameter controlling size of rib chamfer angle.
ribCount | Returns the model parameter controlling number of ribs.
ribCutSize | Returns the model parameter controlling size of rib chamfer or fillet.
ribDraftAngle | Returns the model parameter controlling ribs draft angle.
ribLength | Returns the model parameter controlling ribs length measured from the shank axis.
ribOffset | Returns the model parameter controlling ribs offset from the top face or alignment face.
ribOuterDraftAngle | Returns the model parameter controlling size of rib outer draft angle.
ribRotation | Returns the model parameter controlling rotation angle of the first rib from the reference vector. For selected sketch point(s) the direction of reference vector is X-axis of the parent sketch.
ribThickness | Returns the model parameter controlling ribs thickness.
ribTipRadius | Returns the model parameter controlling size of rib tip blend radius.
ribTotalAngle | Returns the model parameter controlling total angle for ribs distribution.
ribType | Returns the current type of ribs shape this feature represents.
rootRadius | Returns the model parameter controlling blend radius of the boss shank.
screwDiameter | Returns the model parameter for screw diameter - reference for parametric expressions.
screwHeadAngle | Returns the model parameter for countersink head angle - reference for parametric expressions.
screwHeadDiameter | Returns the model parameter for screw head diameter - reference for parametric expressions.
shapeType | Returns the current boss shape this feature represents.
taperAngle | Returns the model parameter for taper angle - plastic part rule reference.
thickness | Returns the model parameter for thickness - plastic part rule reference.
timelineObject | Returns the timeline object associated with this feature.
tipRadius | Returns the model parameter controlling blend radius of the boss shank top face.

Accessed From

BossFeature.createForAssemblyContext, BossFeature.nativeObject, BossFeatures.add, BossFeatures.item, BossFeatures.itemByName

Version

Introduced in version October 2022


BossFeature.alignmentDepth Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the step depth used for alignment of its counterparts.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentDepth
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->alignmentDepth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.alignmentDiameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the step diameter used for alignment of its counterparts.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentDiameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->alignmentDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.alignmentDraftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the step draft angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentDraftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->alignmentDraftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.alignmentRootRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the boss alignment root.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentRootRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->alignmentRootRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.alignmentTipRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the boss alignment top face.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentTipRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->alignmentTipRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.alignmentType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current boss alignment shape this feature represents.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.alignmentType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
BossAlignmentTypes propertyValue = bossFeature_var->alignmentType();

Property Value

This is a read only property whose value is a BossAlignmentTypes.

Version

Introduced in version October 2022


BossFeature.assemblyContext Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.assemblyContext
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bossFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version October 2022


BossFeature.attributes Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.attributes
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = bossFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version October 2022


BossFeature.baseFeature Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.baseFeature
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = bossFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version October 2022


BossFeature.bodies Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.bodies
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = bossFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version October 2022


BossFeature.classType Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BossFeature.classType()
This is a static method.

#include <Fusion/Plastic/BossFeature.h>

returnValue = adsk::fusion::BossFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


BossFeature.createForAssemblyContext Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.
returnValue = bossFeature_var.createForAssemblyContext(occurrence)
"bossFeature_var" is a variable referencing a BossFeature object.

#include <Fusion/Plastic/BossFeature.h>

returnValue = bossFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BossFeature | 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 October 2022


BossFeature.createInput Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Creates object with inputs this feature represents. To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.
returnValue = bossFeature_var.createInput()
"bossFeature_var" is a variable referencing a BossFeature object.

#include <Fusion/Plastic/BossFeature.h>

returnValue = bossFeature_var->createInput();

Return Value

Type | Description
BossFeatureInput | Returns BossFeatureInput this feature represent if successful.

Version

Introduced in version October 2022


BossFeature.deleteMe Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.
returnValue = bossFeature_var.deleteMe()
"bossFeature_var" is a variable referencing a BossFeature object.

#include <Fusion/Plastic/BossFeature.h>

returnValue = bossFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version October 2022


BossFeature.diameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the shank diameter.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.diameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->diameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.direction Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the direction of the boss feature with respect to selected position point. For selected sketch point this direction represents a Z-axis of the sketch.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.direction
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = bossFeature_var->direction();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version October 2022


BossFeature.dissolve Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.
returnValue = bossFeature_var.dissolve()
"bossFeature_var" is a variable referencing a BossFeature object.

#include <Fusion/Plastic/BossFeature.h>

returnValue = bossFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version October 2022


BossFeature.draftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the shank draft angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.draftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->draftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.entityToken Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.entityToken
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
string propertyValue = bossFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeature.errorOrWarningMessage Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.errorOrWarningMessage
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
string propertyValue = bossFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeature.faces Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.faces
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bossFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2022


BossFeature.healthState Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.healthState
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = bossFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version October 2022


BossFeature.holeCountersinkAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling countersink angle for countersink hole. If hole type is not set to countersink hole or boss shape is to BossBlank this parameter is unused.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeCountersinkAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeCountersinkAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeDepth Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the hole depth with respect to hole extent type. If hole extent type is set to BossHoleThrough parameter not used. If hole extent type is BossBlindFull the parameter is a distance from farthest face. If hole extent type is set to BossBlindDepth the parameter is a distance from start face of the hole.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeDepth
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeDepth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeDiameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the hole diameter.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeDiameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeDraftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling hole draft angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeDraftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeDraftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeEndRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the hole end.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeEndRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeEndRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeExtentType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current type of hole extent this feature represents.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeExtentType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
BossHoleExtentTypes propertyValue = bossFeature_var->holeExtentType();

Property Value

This is a read only property whose value is a BossHoleExtentTypes.

Version

Introduced in version October 2022


BossFeature.holeMajorDepth Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling major hole depth for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeMajorDepth
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeMajorDepth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeMajorDiameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling major hole diameter for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeMajorDiameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeMajorDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeMajorDraftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling major hole draft angle for counterbore and countersink hole. If hole type is set to simple hole or boss shape is to BossBlank this parameter is unused.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeMajorDraftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeMajorDraftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeMajorRootRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of major hole counterbore root.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeMajorRootRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeMajorRootRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeMajorTipRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of major hole counterbore.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeMajorTipRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeMajorTipRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeStartRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the hole start.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeStartRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->holeStartRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.holeType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current type of hole this feature represents.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.holeType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
HoleTypes propertyValue = bossFeature_var->holeType();

Property Value

This is a read only property whose value is a HoleTypes.

Version

Introduced in version October 2022


BossFeature.innerRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for inner radius - reference for parametric expressions.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.innerRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->innerRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.isDirectionFlipped Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Gets and sets if the direction of the boss (or boss connection) is flipped.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.isDirectionFlipped

# Set the value of the property.
bossFeature_var.isDirectionFlipped = propertyValue
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
boolean propertyValue = bossFeature_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bossFeature_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


BossFeature.isGeometryOpposite Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Gets if this boss feature instance represents a bottom side where screw thread engages with the part. If this feature instance represents a geometry where screw head engages it returns false.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.isGeometryOpposite
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
boolean propertyValue = bossFeature_var->isGeometryOpposite();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeature.isParametric Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.isParametric
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
boolean propertyValue = bossFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeature.isSuppressed Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.isSuppressed

# Set the value of the property.
bossFeature_var.isSuppressed = propertyValue
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
boolean propertyValue = bossFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bossFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


BossFeature.isValid Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.isValid
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
boolean propertyValue = bossFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeature.linkedFeatures Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.linkedFeatures
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = bossFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version October 2022


BossFeature.name Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.name

# Set the value of the property.
bossFeature_var.name = propertyValue
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
string propertyValue = bossFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = bossFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


BossFeature.nativeObject Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

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.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.nativeObject
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<BossFeature> propertyValue = bossFeature_var->nativeObject();

Property Value

This is a read only property whose value is a BossFeature.

Version

Introduced in version October 2022


BossFeature.objectType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.objectType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
string propertyValue = bossFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeature.offset Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the offset from the selected parting plane.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.offset
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->offset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.offsetClearance Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling the offset clearance from the selected parting plane and offset.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.offsetClearance
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->offsetClearance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.parentComponent Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.parentComponent
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = bossFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version October 2022


BossFeature.positionDefinition Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns a BossPositionDefinition object that provides access to the information used to define the position of the boss feature.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.positionDefinition
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<BossPositionDefinition> propertyValue = bossFeature_var->positionDefinition();

Property Value

This is a read only property whose value is a BossPositionDefinition.

Version

Introduced in version October 2022


BossFeature.ribBlendRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling size of rib root blend radius.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribBlendRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribBlendRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribChamferAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling size of rib chamfer angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribChamferAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribChamferAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribCount Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling number of ribs.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribCount
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribCount();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribCutSize Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling size of rib chamfer or fillet.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribCutSize
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribCutSize();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribDraftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling ribs draft angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribDraftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribDraftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribLength Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling ribs length measured from the shank axis.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribLength
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribLength();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribOffset Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling ribs offset from the top face or alignment face.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribOffset
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribOuterDraftAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling size of rib outer draft angle.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribOuterDraftAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribOuterDraftAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribRotation Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling rotation angle of the first rib from the reference vector. For selected sketch point(s) the direction of reference vector is X-axis of the parent sketch.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribRotation
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribRotation();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribThickness Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling ribs thickness.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribThickness
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribThickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribTipRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling size of rib tip blend radius.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribTipRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribTipRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribTotalAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling total angle for ribs distribution.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribTotalAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->ribTotalAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.ribType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current type of ribs shape this feature represents.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.ribType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
BossRibShapeTypes propertyValue = bossFeature_var->ribType();

Property Value

This is a read only property whose value is a BossRibShapeTypes.

Version

Introduced in version October 2022


BossFeature.rootRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the boss shank.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.rootRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->rootRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.screwDiameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for screw diameter - reference for parametric expressions.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.screwDiameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->screwDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.screwHeadAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for countersink head angle - reference for parametric expressions.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.screwHeadAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->screwHeadAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.screwHeadDiameter Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for screw head diameter - reference for parametric expressions.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.screwHeadDiameter
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->screwHeadDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.shapeType Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the current boss shape this feature represents.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.shapeType
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
BossShapeTypes propertyValue = bossFeature_var->shapeType();

Property Value

This is a read only property whose value is a BossShapeTypes.

Version

Introduced in version October 2022


BossFeature.taperAngle Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for taper angle - plastic part rule reference.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.taperAngle
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->taperAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.thickness Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter for thickness - plastic part rule reference.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.thickness
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->thickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.timelineObject Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.timelineObject
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = bossFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version October 2022


BossFeature.tipRadius Property

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Returns the model parameter controlling blend radius of the boss shank top face.

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.

# Get the value of the property.
propertyValue = bossFeature_var.tipRadius
"bossFeature_var" is a variable referencing a BossFeature object.
#include <Fusion/Plastic/BossFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = bossFeature_var->tipRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2022


BossFeature.update Method

Parent Object: BossFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeature.h>

Description

Changes the boss feature (or boss connection) to the input provided. To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"bossFeature_var" is a variable referencing a BossFeature object.
returnValue = bossFeature_var.update(input)
"bossFeature_var" is a variable referencing a BossFeature object.

#include <Fusion/Plastic/BossFeature.h>

returnValue = bossFeature_var->update(input);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
input | BossFeatureInput | The object defines inputs the feature will be set to.

Version

Introduced in version October 2022


BossFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a boss feature or a boss connection

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createSideInput | Creates a new BossFeatureSideInput object that is used to specify the input for boss feature side. This object can be set to side1 or side2. Side1 is meant to be side where screw head engages with the boss and Side2 is meant to be a side where screw thread engages with the part or metal inserts.
setPositionBySketchPoints | Defines the position and orientation of the boss feature using a sketch point(s).

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the boss feature is created based on geometry (e.g. point) in another component AND (the boss) 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. The occurrence provided sets scope for detection of target participant bodies.
isDefaultDirection | Get or set if the boss feature (or boss connection) 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset | Get or set offset of the parting face from the selected position point.
participantBodies | Gets and sets the list of bodies that will participate in the boss feature. If body provided does not intersect with direction vector at proposed position points it will be ignored. If more bodies intersect at given position point only the closest body will be accepted. Boss feature works with solid bodies only. If this property has not been set (or is empty) closest visible bodies will be detected automatically based on proposed positions and orientation.
side1 | Gets or sets inputs for top side of the boss feature connection. It is the side where screw head engages with the boss. Default Side1 direction is considered direction of Z-axis of the parent sketch for selected position point.
side2 | Gets or sets inputs for bottom side of the boss feature connection. It is the side where screw thread engages with the part or metal insert. Default Side2 direction is considered opposite to the direction Z-axis of the parent sketch for selected position point.
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

BossFeature.createInput, BossFeatures.createInput

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureInput.classType Method

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BossFeatureInput.classType()
This is a static method.

#include <Fusion/Plastic/BossFeatureInput.h>

returnValue = adsk::fusion::BossFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


BossFeatureInput.createSideInput Method

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Creates a new BossFeatureSideInput object that is used to specify the input for boss feature side. This object can be set to side1 or side2. Side1 is meant to be side where screw head engages with the boss and Side2 is meant to be a side where screw thread engages with the part or metal inserts.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
returnValue = bossFeatureInput_var.createSideInput()
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

#include <Fusion/Plastic/BossFeatureInput.h>

returnValue = bossFeatureInput_var->createSideInput();

Return Value

Type | Description
BossFeatureSideInput | Returns BossFeatureSideInput if successful.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureInput.creationOccurrence Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the boss feature is created based on geometry (e.g. point) in another component AND (the boss) 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. The occurrence provided sets scope for detection of target participant bodies.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.creationOccurrence

# Set the value of the property.
bossFeatureInput_var.creationOccurrence = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bossFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = bossFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version October 2022


BossFeatureInput.isDefaultDirection Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Get or set if the boss feature (or boss connection) goes in the default direction or is reversed.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.isDefaultDirection

# Set the value of the property.
bossFeatureInput_var.isDefaultDirection = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
boolean propertyValue = bossFeatureInput_var->isDefaultDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bossFeatureInput_var->isDefaultDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


BossFeatureInput.isValid Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.isValid
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
boolean propertyValue = bossFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeatureInput.objectType Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.objectType
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
string propertyValue = bossFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeatureInput.offset Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Get or set offset of the parting face from the selected position point.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.offset

# Set the value of the property.
bossFeatureInput_var.offset = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureInput_var->offset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureInput_var->offset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureInput.participantBodies Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Gets and sets the list of bodies that will participate in the boss feature. If body provided does not intersect with direction vector at proposed position points it will be ignored. If more bodies intersect at given position point only the closest body will be accepted. Boss feature works with solid bodies only. If this property has not been set (or is empty) closest visible bodies will be detected automatically based on proposed positions and orientation.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.participantBodies

# Set the value of the property.
bossFeatureInput_var.participantBodies = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = bossFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = bossFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version October 2022


BossFeatureInput.setPositionBySketchPoints Method

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Defines the position and orientation of the boss feature using a sketch point(s).

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
returnValue = bossFeatureInput_var.setPositionBySketchPoints(pointOrPoints)
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

#include <Fusion/Plastic/BossFeatureInput.h>

returnValue = bossFeatureInput_var->setPositionBySketchPoints(pointOrPoints);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
pointOrPoints | Base | The sketch point or ObjectCollection of sketch points that defines the position(s) for boss mating location. The orientation of the boss feature is inferred from the normal (Z-axis) of the point's parent sketch. The natural direction (or direction of the screw) will be opposite the normal of the sketch. If multiple sketch points are provided all must belong to the same sketch. Participant bodies will be inferred from closest visible bodies unless specified explicitly.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureInput.side1 Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Gets or sets inputs for top side of the boss feature connection. It is the side where screw head engages with the boss. Default Side1 direction is considered direction of Z-axis of the parent sketch for selected position point.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.side1

# Set the value of the property.
bossFeatureInput_var.side1 = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
Ptr<BossFeatureSideInput> propertyValue = bossFeatureInput_var->side1();

// Set the value of the property, where value_var is a BossFeatureSideInput.
bool returnValue = bossFeatureInput_var->side1(value_var);

Property Value

This is a read/write property whose value is a BossFeatureSideInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureInput.side2 Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

Description

Gets or sets inputs for bottom side of the boss feature connection. It is the side where screw thread engages with the part or metal insert. Default Side2 direction is considered opposite to the direction Z-axis of the parent sketch for selected position point.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.side2

# Set the value of the property.
bossFeatureInput_var.side2 = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
Ptr<BossFeatureSideInput> propertyValue = bossFeatureInput_var->side2();

// Set the value of the property, where value_var is a BossFeatureSideInput.
bool returnValue = bossFeatureInput_var->side2(value_var);

Property Value

This is a read/write property whose value is a BossFeatureSideInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureInput.targetBaseFeature Property

Parent Object: BossFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureInput.h>

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.

Syntax

  • Python
  • C++
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.

# Get the value of the property.
propertyValue = bossFeatureInput_var.targetBaseFeature

# Set the value of the property.
bossFeatureInput_var.targetBaseFeature = propertyValue
"bossFeatureInput_var" is a variable referencing a BossFeatureInput object.
#include <Fusion/Plastic/BossFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = bossFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = bossFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version October 2022


BossFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Collection that provides access to all of the existing boss features in a design.

Methods

Name | Description
add | Creates a new boss feature (or more boss features) based on the information provided by a BossFeatureInput object. To create a new boss or boss connection, use createInput function to define a new input object for the type of boss feature you want to create. Use the methods and properties on the input object to define any additional inputs. Once the information is defined on the input object, you can pass it to the Add method to create the boss feature or boss connection.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 BossFeatureInput object that is used to specify the input needed to create a new boss feature(s).
item | Function that returns the specified boss feature using an index into the collection.
itemByName | Function that returns the specified boss feature using the name of the feature.

Properties

Name | Description
count | The number of boss 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.bossFeatures

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatures.add Method

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Creates a new boss feature (or more boss features) based on the information provided by a BossFeatureInput object. To create a new boss or boss connection, use createInput function to define a new input object for the type of boss feature you want to create. Use the methods and properties on the input object to define any additional inputs. Once the information is defined on the input object, you can pass it to the Add method to create the boss feature or boss connection.

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.
returnValue = bossFeatures_var.add(input)
"bossFeatures_var" is a variable referencing a BossFeatures object.

#include <Fusion/Plastic/BossFeatures.h>

returnValue = bossFeatures_var->add(input);

Return Value

Type | Description
BossFeature[] | Returns the newly created BossFeature objects or empty vector/list if the creation failed.

Parameters

Name | Type | Description
input | BossFeatureInput | The BossFeatureInput object that defines the boss or boss connection you want to create.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatures.classType Method

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BossFeatures.classType()
This is a static method.

#include <Fusion/Plastic/BossFeatures.h>

returnValue = adsk::fusion::BossFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


BossFeatures.count Property

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

The number of boss features in the collection.

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.

# Get the value of the property.
propertyValue = bossFeatures_var.count
"bossFeatures_var" is a variable referencing a BossFeatures object.
#include <Fusion/Plastic/BossFeatures.h>

// Get the value of the property.
uinteger propertyValue = bossFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version October 2022


BossFeatures.createInput Method

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Creates a new BossFeatureInput object that is used to specify the input needed to create a new boss feature(s).

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.
returnValue = bossFeatures_var.createInput()
"bossFeatures_var" is a variable referencing a BossFeatures object.

#include <Fusion/Plastic/BossFeatures.h>

returnValue = bossFeatures_var->createInput();

Return Value

Type | Description
BossFeatureInput | Returns the newly created BossFeatureInput object or null if the creation failed.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatures.isValid Property

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.

# Get the value of the property.
propertyValue = bossFeatures_var.isValid
"bossFeatures_var" is a variable referencing a BossFeatures object.
#include <Fusion/Plastic/BossFeatures.h>

// Get the value of the property.
boolean propertyValue = bossFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeatures.item Method

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Function that returns the specified boss feature using an index into the collection.

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.
returnValue = bossFeatures_var.item(index)
"bossFeatures_var" is a variable referencing a BossFeatures object.

#include <Fusion/Plastic/BossFeatures.h>

returnValue = bossFeatures_var->item(index);

Return Value

Type | Description
BossFeature | 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 October 2022


BossFeatures.itemByName Method

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

Function that returns the specified boss feature using the name of the feature.

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.
returnValue = bossFeatures_var.itemByName(name)
"bossFeatures_var" is a variable referencing a BossFeatures object.

#include <Fusion/Plastic/BossFeatures.h>

returnValue = bossFeatures_var->itemByName(name);

Return Value

Type | Description
BossFeature | 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 October 2022


BossFeatures.objectType Property

Parent Object: BossFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bossFeatures_var" is a variable referencing a BossFeatures object.

# Get the value of the property.
propertyValue = bossFeatures_var.objectType
"bossFeatures_var" is a variable referencing a BossFeatures object.
#include <Fusion/Plastic/BossFeatures.h>

// Get the value of the property.
string propertyValue = bossFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeatureSideInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

This class defines the methods and properties that pertain to the definition of a single side of boss feature

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clearRibExtent | Clears rib extent types for all position points.
setBlank | Set boss shape into blank constant diameter shank with no hole.
setCounterbore | Set boss shape into constant diameter shank with counterbore hole.
setCountersink | Set boss shape into constant diameter shank with countersink hole.
setRibExtent | Set rib extent type for particular rib for position point provided.
setSimple | Set boss shape into constant diameter shank with simple hole.

Properties

Name | Description
alignmentDepth | Get or set alignment depth.
alignmentDiameter | Get or set alignment diameter.
alignmentDraftAngle | Get or set alignment draft angle.
alignmentRootRadius | Get or set blend radius of the boss alignment root.
alignmentTipRadius | Get or set blend radius of the boss alignment tip.
alignmentType | Get or set boss alignment shape. This usually corresponds to the alignment shape of the boss counterpart.
diameter | Get or set boss shank diameter.
draftAngle | Get or set shank draft angle.
holeCountersinkAngle | Get or set countersink angle for countersink hole. This input is used only for countersink hole.
holeDepth | Get or set hole depth with respect to hole extent type. If hole extent type is set to BossHoleThrough parameter is ignored. If hole extent type is BossBlindFull the parameter is a distance from farthest face. If hole extent type is set to BossBlindDepth the parameter is a distance from start face of the hole.
holeDiameter | Get or set hole diameter.
holeDraftAngle | Get or set hole draft angle.
holeEndRadius | Get or set blend radius of the hole end.
holeExtentType | Get or set hole extent this feature represents. For top side only through hole extent is accepted.
holeMajorDepth | Get or set major hole depth for counterbore and countersink hole or material thickness under screw head based on hole orientation in a boss feature. This input is ignored for blank boss or boss with simple hole.
holeMajorDiameter | Get or set major hole diameter for counterbore or countersink hole. This input is ignored for blank boss or boss with simple hole.
holeMajorDraftAngle | Get or set major hole draft angle for counterbore and countersink hole. This input is ignored for blank boss or boss with simple hole.
holeMajorRootRadius | Get or set blend radius of major hole counterbore root.
holeMajorTipRadius | Get or set blend radius of major hole counterbore.
holeStartRadius | Get or set blend radius of the hole start.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offsetClearance | Get or set offset clearance as additional small offset from the selected parting plane and position point.
ribChamferAngle | Get or set rib chamfer angle. This input is used only for rib with chamfer.
ribCount | Get or set number of ribs.
ribCutSize | Get or set size of rib chamfer or fillet.
ribDraftAngle | Get or set ribs draft angle.
ribLength | Get or set ribs length measured from the shank axis.
ribOffset | Get or set ribs offset from the top face or alignment face.
ribOuterDraftAngle | Get or set rib outer draft angle.
ribRootRadius | Get or set rib base root blend radius.
ribRotation | Get or set rotation angle of the first rib from the reference vector. Reference vector is X-axis of the parent sketch from selected sketch point(s).
ribThickness | Get or set ribs thickness.
ribTipRadius | Get or set rib outer tip blend radius.
ribTotalAngle | Get or set total angle for ribs distribution. Default is 360 deg.
ribType | Type of boss ribs this feature represents.
rootRadius | Get or set blend radius of the boss shank and participant body.
tipRadius | Get or set blend radius of the boss shank top parting face.

Accessed From

BossFeatureInput.createSideInput, BossFeatureInput.side1, BossFeatureInput.side2

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentDepth Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set alignment depth.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentDepth

# Set the value of the property.
bossFeatureSideInput_var.alignmentDepth = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->alignmentDepth();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->alignmentDepth(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentDiameter Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set alignment diameter.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentDiameter

# Set the value of the property.
bossFeatureSideInput_var.alignmentDiameter = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->alignmentDiameter();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->alignmentDiameter(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentDraftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set alignment draft angle.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentDraftAngle

# Set the value of the property.
bossFeatureSideInput_var.alignmentDraftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->alignmentDraftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->alignmentDraftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentRootRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the boss alignment root.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentRootRadius

# Set the value of the property.
bossFeatureSideInput_var.alignmentRootRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->alignmentRootRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->alignmentRootRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentTipRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the boss alignment tip.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentTipRadius

# Set the value of the property.
bossFeatureSideInput_var.alignmentTipRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->alignmentTipRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->alignmentTipRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.alignmentType Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set boss alignment shape. This usually corresponds to the alignment shape of the boss counterpart.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.alignmentType

# Set the value of the property.
bossFeatureSideInput_var.alignmentType = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
BossAlignmentTypes propertyValue = bossFeatureSideInput_var->alignmentType();

// Set the value of the property, where value_var is a BossAlignmentTypes.
bool returnValue = bossFeatureSideInput_var->alignmentType(value_var);

Property Value

This is a read/write property whose value is a BossAlignmentTypes.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.classType Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BossFeatureSideInput.classType()
This is a static method.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = adsk::fusion::BossFeatureSideInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


BossFeatureSideInput.clearRibExtent Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Clears rib extent types for all position points.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
returnValue = bossFeatureSideInput_var.clearRibExtent()
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = bossFeatureSideInput_var->clearRibExtent();

Version

Introduced in version October 2022


BossFeatureSideInput.diameter Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set boss shank diameter.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.diameter

# Set the value of the property.
bossFeatureSideInput_var.diameter = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->diameter();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->diameter(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.draftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set shank draft angle.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.draftAngle

# Set the value of the property.
bossFeatureSideInput_var.draftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->draftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->draftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeCountersinkAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set countersink angle for countersink hole. This input is used only for countersink hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeCountersinkAngle

# Set the value of the property.
bossFeatureSideInput_var.holeCountersinkAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeCountersinkAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeCountersinkAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.holeDepth Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set hole depth with respect to hole extent type. If hole extent type is set to BossHoleThrough parameter is ignored. If hole extent type is BossBlindFull the parameter is a distance from farthest face. If hole extent type is set to BossBlindDepth the parameter is a distance from start face of the hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeDepth

# Set the value of the property.
bossFeatureSideInput_var.holeDepth = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeDepth();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeDepth(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeDiameter Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set hole diameter.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeDiameter

# Set the value of the property.
bossFeatureSideInput_var.holeDiameter = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeDiameter();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeDiameter(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.holeDraftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set hole draft angle.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeDraftAngle

# Set the value of the property.
bossFeatureSideInput_var.holeDraftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeDraftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeDraftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeEndRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the hole end.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeEndRadius

# Set the value of the property.
bossFeatureSideInput_var.holeEndRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeEndRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeEndRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeExtentType Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set hole extent this feature represents. For top side only through hole extent is accepted.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeExtentType

# Set the value of the property.
bossFeatureSideInput_var.holeExtentType = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
BossHoleExtentTypes propertyValue = bossFeatureSideInput_var->holeExtentType();

// Set the value of the property, where value_var is a BossHoleExtentTypes.
bool returnValue = bossFeatureSideInput_var->holeExtentType(value_var);

Property Value

This is a read/write property whose value is a BossHoleExtentTypes.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeMajorDepth Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set major hole depth for counterbore and countersink hole or material thickness under screw head based on hole orientation in a boss feature. This input is ignored for blank boss or boss with simple hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeMajorDepth

# Set the value of the property.
bossFeatureSideInput_var.holeMajorDepth = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeMajorDepth();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeMajorDepth(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.holeMajorDiameter Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set major hole diameter for counterbore or countersink hole. This input is ignored for blank boss or boss with simple hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeMajorDiameter

# Set the value of the property.
bossFeatureSideInput_var.holeMajorDiameter = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeMajorDiameter();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeMajorDiameter(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.holeMajorDraftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set major hole draft angle for counterbore and countersink hole. This input is ignored for blank boss or boss with simple hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeMajorDraftAngle

# Set the value of the property.
bossFeatureSideInput_var.holeMajorDraftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeMajorDraftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeMajorDraftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeMajorRootRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of major hole counterbore root.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeMajorRootRadius

# Set the value of the property.
bossFeatureSideInput_var.holeMajorRootRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeMajorRootRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeMajorRootRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.holeMajorTipRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of major hole counterbore.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeMajorTipRadius

# Set the value of the property.
bossFeatureSideInput_var.holeMajorTipRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeMajorTipRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeMajorTipRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.holeStartRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the hole start.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.holeStartRadius

# Set the value of the property.
bossFeatureSideInput_var.holeStartRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->holeStartRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->holeStartRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.isValid Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.isValid
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
boolean propertyValue = bossFeatureSideInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossFeatureSideInput.objectType Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.objectType
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
string propertyValue = bossFeatureSideInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BossFeatureSideInput.offsetClearance Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set offset clearance as additional small offset from the selected parting plane and position point.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.offsetClearance

# Set the value of the property.
bossFeatureSideInput_var.offsetClearance = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->offsetClearance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->offsetClearance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.ribChamferAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set rib chamfer angle. This input is used only for rib with chamfer.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribChamferAngle

# Set the value of the property.
bossFeatureSideInput_var.ribChamferAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribChamferAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribChamferAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribCount Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set number of ribs.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribCount

# Set the value of the property.
bossFeatureSideInput_var.ribCount = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribCount();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribCount(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribCutSize Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set size of rib chamfer or fillet.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribCutSize

# Set the value of the property.
bossFeatureSideInput_var.ribCutSize = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribCutSize();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribCutSize(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribDraftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set ribs draft angle.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribDraftAngle

# Set the value of the property.
bossFeatureSideInput_var.ribDraftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribDraftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribDraftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribLength Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set ribs length measured from the shank axis.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribLength

# Set the value of the property.
bossFeatureSideInput_var.ribLength = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribLength();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribLength(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribOffset Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set ribs offset from the top face or alignment face.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribOffset

# Set the value of the property.
bossFeatureSideInput_var.ribOffset = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribOffset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribOffset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribOuterDraftAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set rib outer draft angle.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribOuterDraftAngle

# Set the value of the property.
bossFeatureSideInput_var.ribOuterDraftAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribOuterDraftAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribOuterDraftAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribRootRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set rib base root blend radius.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribRootRadius

# Set the value of the property.
bossFeatureSideInput_var.ribRootRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribRootRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribRootRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribRotation Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set rotation angle of the first rib from the reference vector. Reference vector is X-axis of the parent sketch from selected sketch point(s).

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribRotation

# Set the value of the property.
bossFeatureSideInput_var.ribRotation = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribRotation();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribRotation(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.ribThickness Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set ribs thickness.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribThickness

# Set the value of the property.
bossFeatureSideInput_var.ribThickness = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribThickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribThickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribTipRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set rib outer tip blend radius.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribTipRadius

# Set the value of the property.
bossFeatureSideInput_var.ribTipRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribTipRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribTipRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.ribTotalAngle Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set total angle for ribs distribution. Default is 360 deg.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribTotalAngle

# Set the value of the property.
bossFeatureSideInput_var.ribTotalAngle = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->ribTotalAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->ribTotalAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2022


BossFeatureSideInput.ribType Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Type of boss ribs this feature represents.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.ribType

# Set the value of the property.
bossFeatureSideInput_var.ribType = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
BossRibShapeTypes propertyValue = bossFeatureSideInput_var->ribType();

// Set the value of the property, where value_var is a BossRibShapeTypes.
bool returnValue = bossFeatureSideInput_var->ribType(value_var);

Property Value

This is a read/write property whose value is a BossRibShapeTypes.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.rootRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the boss shank and participant body.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.rootRadius

# Set the value of the property.
bossFeatureSideInput_var.rootRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->rootRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->rootRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.setBlank Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Set boss shape into blank constant diameter shank with no hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
returnValue = bossFeatureSideInput_var.setBlank(diameter)
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = bossFeatureSideInput_var->setBlank(diameter);

Parameters

Name | Type | Description
diameter | ValueInput | The outside diameter for the boss feature shank.

Version

Introduced in version October 2022


BossFeatureSideInput.setCounterbore Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Set boss shape into constant diameter shank with counterbore hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
returnValue = bossFeatureSideInput_var.setCounterbore(diameter, holeDiameter, holeMajorDiameter, depth)
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = bossFeatureSideInput_var->setCounterbore(diameter, holeDiameter, holeMajorDiameter, depth);

Parameters

Name | Type | Description
diameter | ValueInput | The outside diameter for the boss feature shank.
holeDiameter | ValueInput | The hole diameter.
holeMajorDiameter | ValueInput | The hole major (or counterbore) diameter.
depth | ValueInput | With respect to hole orientation in the boss feature the parameter is either the counterbore depth or thickness of the material under the screw head.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.setCountersink Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Set boss shape into constant diameter shank with countersink hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
# Uses no optional arguments.
returnValue = bossFeatureSideInput_var.setCountersink(diameter, holeDiameter, holeMajorDiameter, depth)

# Uses optional arguments.
returnValue = bossFeatureSideInput_var.setCountersink(diameter, holeDiameter, holeMajorDiameter, depth, countersinkAngle)
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

// Uses no optional arguments.
returnValue = bossFeatureSideInput_var->setCountersink(diameter, holeDiameter, holeMajorDiameter, depth);

// Uses optional arguments.
returnValue = bossFeatureSideInput_var->setCountersink(diameter, holeDiameter, holeMajorDiameter, depth, countersinkAngle);

Parameters

Name | Type | Description
diameter | ValueInput | The outside diameter for the boss feature shank.
holeDiameter | ValueInput | The hole diameter.
holeMajorDiameter | ValueInput | The hole major (or countersink) diameter.
depth | ValueInput | With respect to hole orientation in the boss feature the parameter is either the counterbore depth or thickness of the material under the screw head.
countersinkAngle | ValueInput | Optional parameter for hole countersink angle. If not specified it is set to 90 deg. This is an optional argument whose default value is null.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.setRibExtent Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Set rib extent type for particular rib for position point provided.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
returnValue = bossFeatureSideInput_var.setRibExtent(position, ribExtentTypes)
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = bossFeatureSideInput_var->setRibExtent(position, ribExtentTypes);

Parameters

Name | Type | Description
position | Base | Position point object for the rib extent types provided
ribExtentTypes | integer[] | Vector of BossRibExtentTypes for individual rib based on rib count input.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossFeatureSideInput.setSimple Method

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Set boss shape into constant diameter shank with simple hole.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
returnValue = bossFeatureSideInput_var.setSimple(diameter, holeDiameter)
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

#include <Fusion/Plastic/BossFeatureSideInput.h>

returnValue = bossFeatureSideInput_var->setSimple(diameter, holeDiameter);

Parameters

Name | Type | Description
diameter | ValueInput | The outside diameter for the boss feature shank.
holeDiameter | ValueInput | The hole diameter.

Version

Introduced in version October 2022


BossFeatureSideInput.tipRadius Property

Parent Object: BossFeatureSideInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossFeatureSideInput.h>

Description

Get or set blend radius of the boss shank top parting face.

Syntax

  • Python
  • C++
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.

# Get the value of the property.
propertyValue = bossFeatureSideInput_var.tipRadius

# Set the value of the property.
bossFeatureSideInput_var.tipRadius = propertyValue
"bossFeatureSideInput_var" is a variable referencing a BossFeatureSideInput object.
#include <Fusion/Plastic/BossFeatureSideInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = bossFeatureSideInput_var->tipRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = bossFeatureSideInput_var->tipRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Boss Feature Sample | Demonstrates creating a new boss feature

Version

Introduced in version October 2022


BossPositionDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossPositionDefinition.h>

Description

The base class for the classes that define how a boss feature can be positioned.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BossFeature.positionDefinition

Derived Classes

SketchPointsBossPositionDefinition

Version

Introduced in version October 2022


BossPositionDefinition.classType Method

Parent Object: BossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossPositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BossPositionDefinition.classType()
This is a static method.

#include <Fusion/Plastic/BossPositionDefinition.h>

returnValue = adsk::fusion::BossPositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


BossPositionDefinition.isValid Property

Parent Object: BossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossPositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bossPositionDefinition_var" is a variable referencing a BossPositionDefinition object.

# Get the value of the property.
propertyValue = bossPositionDefinition_var.isValid
"bossPositionDefinition_var" is a variable referencing a BossPositionDefinition object.
#include <Fusion/Plastic/BossPositionDefinition.h>

// Get the value of the property.
boolean propertyValue = bossPositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BossPositionDefinition.objectType Property

Parent Object: BossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/BossPositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bossPositionDefinition_var" is a variable referencing a BossPositionDefinition object.

# Get the value of the property.
propertyValue = bossPositionDefinition_var.objectType
"bossPositionDefinition_var" is a variable referencing a BossPositionDefinition object.
#include <Fusion/Plastic/BossPositionDefinition.h>

// Get the value of the property.
string propertyValue = bossPositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


BoundaryFillFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Object that represents an existing boundary fill feature in a design.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isRemoveTools Gets and sets whether any BRepBodys that were used as tools should be removed as part of the feature creation.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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.entityToken Property

Parent Object: BoundaryFillFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.entityToken
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
string propertyValue = boundaryFillFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BoundaryFillFeature.errorOrWarningMessage Property

Parent Object: BoundaryFillFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Indicates if this feature is parametric or not.

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.isRemoveTools Property

Parent Object: BoundaryFillFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Gets and sets whether any BRepBodys that were used as tools should be removed as part of the feature creation.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.isRemoveTools

# Set the value of the property.
boundaryFillFeature_var.isRemoveTools = 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->isRemoveTools();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boundaryFillFeature_var->isRemoveTools(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


BoundaryFillFeature.isSuppressed Property

Parent Object: BoundaryFillFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Gets and sets the type of operation performed by the boundary fill feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a BoundaryFillFeatureInput.

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 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
isRemoveTools | Gets and sets whether any BRepBodys that were used as tools should be removed as part of the feature creation.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

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.

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
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.cancel Method

Parent Object: BoundaryFillFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

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 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.

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();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version April 2019


BoundaryFillFeatureInput.classType Method

Parent Object: BoundaryFillFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

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

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.isRemoveTools Property

Parent Object: BoundaryFillFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

Gets and sets whether any BRepBodys that were used as tools should be removed as part of the feature creation.

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.isRemoveTools

# Set the value of the property.
boundaryFillFeatureInput_var.isRemoveTools = propertyValue
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeatureInput_var->isRemoveTools();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boundaryFillFeatureInput_var->isRemoveTools(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


BoundaryFillFeatureInput.isValid Property

Parent Object: BoundaryFillFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

Description

Gets and sets the type of operation performed by the boundary fill feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

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.

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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

Creates a new boundary fill feature.

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
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


boundaryFillFeatures.add

Description

Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.

Code Samples

  • Python
def demo_boundaryFillFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the two bodies selected.
    filter = adsk.core.SelectionCommandInput.Bodies
    body1 = _ui.selectEntity('Select tool body 1', filter).entity
    body2 = _ui.selectEntity('Select tool body 2', filter).entity

    # Create an ObjectCollection to use the bodies as tools.
    tools = adsk.core.ObjectCollection.create()
    tools.add(body1)
    tools.add(body2)

    # Create the input object to provide the required input.
    boundaryFills = rootComp.features.boundaryFillFeatures
    input = boundaryFills.createInput(tools, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    # Arbitrarily specify the first volume as selected.
    input.bRepCells.item(0).isSelected = True

    # Create the boundary fill feature.
    boundaryFill = boundaryFills.add(input)


BoundaryFillFeatures.classType Method

Parent Object: BoundaryFillFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

The number of boundary fill features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

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 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.

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
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatures.isValid Property

Parent Object: BoundaryFillFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

Function that returns the specified boundary fill feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

Function that returns the specified boundary fill feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoundaryFillFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangePlaneResultEnvelope.boundingBox, BoundingBox2D.copy, BoundingBox2D.create, ConstructionPlane.displayBounds, SurfaceEvaluator.parametricRange

Version

Introduced in version August 2014


BoundingBox2D.classType Method

Parent Object: BoundingBox2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Determines if the specified point lies within the bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Create a copy of this bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Creates a transient bounding box object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Expand this bounding box to contain the specified point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Test if this bounding box intersects with the specified bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Gets and sets the maximum point of the box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

Gets and sets the minimum point of the box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arrange3DResultEnvelope.boundingBox, BoundingBox3D.copy, BoundingBox3D.create, BRepBody.boundingBox, BRepBody.preciseBoundingBox, BRepEdge.boundingBox, BRepFace.boundingBox, BRepLoop.boundingBox, BRepLump.boundingBox, BRepShell.boundingBox, Component.boundingBox, Component.boundingBox2, Component.preciseBoundingBox, CustomGraphicsBRepBody.boundingBox, CustomGraphicsCurve.boundingBox, CustomGraphicsEntity.boundingBox, CustomGraphicsGroup.boundingBox, CustomGraphicsLines.boundingBox, CustomGraphicsMesh.boundingBox, CustomGraphicsPointSet.boundingBox, CustomGraphicsText.boundingBox, FaceGroup.boundingBox, FlatPatternComponent.boundingBox, FlatPatternComponent.boundingBox2, FlatPatternComponent.preciseBoundingBox, MeshBody.boundingBox, Occurrence.boundingBox, Occurrence.boundingBox2, Occurrence.preciseBoundingBox, Profile.boundingBox, ProfileCurve.boundingBox, Sketch.boundingBox, SketchArc.boundingBox, SketchCircle.boundingBox, SketchConicCurve.boundingBox, SketchControlPointSpline.boundingBox, SketchCurve.boundingBox, SketchEllipse.boundingBox, SketchEllipticalArc.boundingBox, SketchEntity.boundingBox, SketchFittedSpline.boundingBox, SketchFixedSpline.boundingBox, SketchLine.boundingBox, SketchPoint.boundingBox, SketchText.boundingBox

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


BoundingBox3D.classType Method

Parent Object: BoundingBox3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Determines if the specified point is within the bound box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Creates an independent copy of this bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Creates a transient bounding box object. This object is created statically using the BoundingBox3D.create method.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Expands the size of bounding box to include the specified point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Determines if the two bounding boxes intersect.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Gets and sets the maximum point corner of the box.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


BoundingBox3D.minPoint Property

Parent Object: BoundingBox3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

Gets and sets the minimum point corner of the box.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


BoundingBox3D.objectType Property

Parent Object: BoundingBox3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/BoundingBox3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Object that represents an existing box feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

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.

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.entityToken Property

Parent Object: BoxFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.entityToken
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
string propertyValue = boxFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BoxFeature.errorOrWarningMessage Property

Parent Object: BoxFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

Collection that provides access to all of the existing box features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.boxFeatures

Version

Introduced in version September 2015


BoxFeatures.classType Method

Parent Object: BoxFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

The number of box features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

Function that returns the specified box feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

Function that returns the specified box feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BoxFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

The BRepBodies collection provides access to all of the B-Rep bodies within a component.

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 direct modeling design, the BRepBody is created within the component the BRepBodies collection was obtained from. In a parametric modeling design, 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangeFeature.bodies, BaseComponent.bRepBodies, BaseFeature.bodies, BossFeature.bodies, BoundaryFillFeature.bodies, BoxFeature.bodies, ChamferFeature.bodies, CircularPatternFeature.bodies, CoilFeature.bodies, CombineFeature.bodies, Component.bRepBodies, CopyPasteBody.bodies, CustomFeature.bodies, CutPasteBody.bodies, CylinderFeature.bodies, DeleteFaceFeature.bodies, DraftFeature.bodies, ExtendFeature.bodies, ExtrudeFeature.bodies, Feature.bodies, FilletFeature.bodies, FlangeFeature.bodies, FlatPattern.bodies, FlatPatternComponent.bRepBodies, FormFeature.bodies, HoleFeature.bodies, LoftFeature.bodies, MeshCombineFaceGroupsFeature.bodies, MeshCombineFeature.bodies, MeshConvertFeature.bodies, MeshFeature.bodies, MeshGenerateFaceGroupsFeature.bodies, MeshReduceFeature.bodies, MeshRemeshFeature.bodies, MeshRepairFeature.bodies, MeshReverseNormalFeature.bodies, MeshSeparateFeature.bodies, MeshShellFeature.bodies, MeshSmoothFeature.bodies, MirrorFeature.bodies, MoveFeature.bodies, Occurrence.bRepBodies, OffsetFacesFeature.bodies, OffsetFeature.bodies, PatchFeature.bodies, PathPatternFeature.bodies, PipeFeature.bodies, RectangularPatternFeature.bodies, RefoldFeature.bodies, RemoveFeature.bodies, ReplaceFaceFeature.bodies, ReverseNormalFeature.bodies, RevolveFeature.bodies, RibFeature.bodies, RipFeature.bodies, RuledSurfaceFeature.bodies, RuleFilletFeature.bodies, ScaleFeature.bodies, ShellFeature.bodies, SilhouetteSplitFeature.bodies, SphereFeature.bodies, SplitBodyFeature.bodies, SplitFaceFeature.bodies, StitchFeature.bodies, SurfaceDeleteFaceFeature.bodies, SweepFeature.bodies, TemporaryBRepManager.createFromFile, TessellateFeature.bodies, ThickenFeature.bodies, ThreadFeature.bodies, TorusFeature.bodies, TrimFeature.bodies, UnfoldFeature.bodies, UnstitchFeature.bodies, UntrimFeature.bodies, VolumetricCustomFeature.bodies, VolumetricModelToMeshFeature.bodies, WebFeature.bodies

Samples

Name | Description
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Creates a new BRepBody object. The input can be a persisted or transient BRepBody and the result is a persisted BRepBody. In a direct modeling design, the BRepBody is created within the component the BRepBodies collection was obtained from. In a parametric modeling design, 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.

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 BRep body will be associated with. This is an optional requirement. It is required in a parametric modeling design but is ignored in a direct modeling design. This is an optional argument whose default value is null.

Version

Introduced in version May 2016


BRepBodies.classType Method

Parent Object: BRepBodies
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Returns the number of bodies in the collection.

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
Delete Empty Components | Deletes empty components from the active design.
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Function that returns the specified body using an index into the collection.

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
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

Returns a specific body using the name of the body within the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Represents a B-Rep (Boundary Representation) body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
getPhysicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this body.
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.
entityToken Returns a token for the BRepBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for bodies that exist in the design, (the isTemporary property is false).
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.
isSheetMetal | Indicates if this body represents a sheet metal folded part or not and if a flat pattern can be created.
isSolid | Returns whether this body is closed (solid) or not.
isTemporary | Indicates if this body is represented in the model or is temporary.
isTransient | Indicates if this body is represented in the model or is transient.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
orientedMinimumBoundingBox | Returns an oriented bounding box of the body that is best oriented to tightly fit the body.
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 calculated 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.
preciseBoundingBox | Returns a bounding box that tightly fits this body.
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.
textureMapControl | Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to 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

BaseFeature.sourceBodies, BossFeatureInput.participantBodies, BRepBodies.add, BRepBodies.item, BRepBodies.itemByName, BRepBody.convert, BRepBody.copyToComponent, BRepBody.createComponent, BRepBody.createForAssemblyContext, BRepBody.moveToComponent, BRepBody.nativeObject, BRepBodyDefinition.createBody, 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, FlatPattern.bendLinesBody, FlatPattern.extentLinesBody, FlatPattern.flatBody, FlatPattern.foldedBody, HoleFeature.participantBodies, HoleFeatureInput.participantBodies, InterferenceResult.interferenceBody, LoftFeature.participantBodies, LoftFeatureInput.participantBodies, PipeFeature.participantBodies, PipeFeatureInput.participantBodies, RevolveFeature.participantBodies, RevolveFeatureInput.participantBodies, SilhouetteSplitFeature.targetBody, SilhouetteSplitFeatureInput.targetBody, SweepFeature.participantBodies, SweepFeature.solidBody, SweepFeatureInput.participantBodies, SweepFeatureInput.solidBody, TemporaryBRepManager.copy, TemporaryBRepManager.createBox, TemporaryBRepManager.createCylinderOrCone, TemporaryBRepManager.createEllipticalCylinderOrCone, TemporaryBRepManager.createFaceFromPlanarWires, TemporaryBRepManager.createHelixWire, TemporaryBRepManager.createProjectedBodyOutline, TemporaryBRepManager.createRuledSurface, TemporaryBRepManager.createSilhouetteCurves, TemporaryBRepManager.createSphere, TemporaryBRepManager.createTorus, TemporaryBRepManager.createWireFromCurves, TemporaryBRepManager.imprintOverlapBodies, TemporaryBRepManager.planeIntersection, TessellateFeature.inputBodies, TessellateFeatureInput.inputBodies

Samples

Name | Description
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


BRepBody.appearanceSourceType Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the area in cm ^ 2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the bounding box of this body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns all of the edges that connect concave faces.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns all of the edges that connect convex faces.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Copies the body to the clipboard.

This property is only valid if the IsTransient property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Creates a copy of this body into the specified target.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Cuts the body to the clipboard.

This property is only valid if the IsTransient property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Deletes the body.

This property is only valid if the IsTransient property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a collection of all of the edges in the body.

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.

Samples

Name | Description
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.

Version

Introduced in version August 2014


BRepBody.entityToken Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a token for the BRepBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for bodies that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.entityToken
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
string propertyValue = bRepBody_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepBody.faces Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a collection of all of the faces in the body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns all of the faces, edges, or vertices that match the input ID.

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.getPhysicalProperties Method

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this body.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
# Uses no optional arguments.
returnValue = bRepBody_var.getPhysicalProperties()

# Uses optional arguments.
returnValue = bRepBody_var.getPhysicalProperties(accuracy)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

// Uses no optional arguments.
returnValue = bRepBody_var->getPhysicalProperties();

// Uses optional arguments.
returnValue = bRepBody_var->getPhysicalProperties(accuracy);

Return Value

Type | Description
PhysicalProperties | Returns a PhysicalProperties object that can be used to get the various physical property related values.

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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version September 2020


BRepBody.isLightBulbOn Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Gets and sets if this body is selectable.

This property is only valid if the IsTransient property is false.

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.isSheetMetal Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Indicates if this body represents a sheet metal folded part or not and if a flat pattern can be created.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isSheetMetal
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isSheetMetal();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


BRepBody.isSolid Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns whether this body is closed (solid) or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Indicates if this body is represented in the model or is temporary.

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 September 2020


BRepBody.isTransient Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Indicates if this body is represented in the model or is transient.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isTransient
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isTransient();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepBody.isValid Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a collection of all of the lumps in the body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Gets and sets the material assigned to this body.

This property is only valid if the IsTransient property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the mesh manager object for this body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Moves this body from it's current component into the root component or the component owned by the specified occurrence.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Gets and sets the name of the body.

This property is only valid if the IsTransient property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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.orientedMinimumBoundingBox Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns an oriented bounding box of the body that is best oriented to tightly fit the body.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.orientedMinimumBoundingBox
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<OrientedBoundingBox3D> propertyValue = bRepBody_var->orientedMinimumBoundingBox();

Property Value

This is a read only property whose value is an OrientedBoundingBox3D.

Version

Introduced in version January 2024


BRepBody.parentComponent Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the component this body is owned by.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this body. Property values will be calculated 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.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


BRepBody.pointContainment Method

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Determines the relationship of the input point with respect to this body.

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.preciseBoundingBox Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a bounding box that tightly fits this body.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.preciseBoundingBox
"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->preciseBoundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version March 2024


BRepBody.revisionId Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a collection of all of the shells in the body.

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.textureMapControl Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to the body.

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.textureMapControl
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<TextureMapControl> propertyValue = bRepBody_var->textureMapControl();

Property Value

This is a read only property whose value is a TextureMapControl.

Version

Introduced in version March 2022


BRepBody.vertices Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns a collection of all of the vertices in the body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns the volume in cm ^ 3. Returns 0 in the case the body is not solid.

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
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Returns any wire bodies that exist within this body.

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


BRepBodyDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

This object is used to define a temporary B-Rep body. This includes solid, surface, and wire bodies. The class supports the ability to define the geometry and topology of the B-Rep and once the definition is complete, it supports the creation of a temporary BRepBody object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 function that creates a new BRepBodyDefinition object. It's initially empty but you can use the functionality it provides to define the geometry and topology of the B-Rep object you want to create.
createBody | Attempts to create a temporary BRepBody object using the definition provided by this BRepBodyDefinition object. Properties on this BRepBodyDefinition are used to define some of the criteria that control how the body is created.
createEdgeDefinitionByCurve | Using a curve in model space it creates a new BRepEdgeDefinition object that's associated with the body.
createVertexDefinition | Creates a new BRepVertexDefinition object that's associated with the body.

Properties

Name | Description
doFullHealing | Specifies if full healing is done when creating the body. This defaults to true and it's highly recommended that you do full healing because it can find and correct problems with the input. If you're sure that the B-Rep definition that you've constructed is correct then you can set this to false to skip the full healing process.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lumpDefinitions | Provides access to the BRepLumpDefinitions object associated with this BRepBodyDefinition. It's through the returned collection that you can create new BRepLumpDefinition objects.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
outcomeInfo Returns an array of strings that contain information about the outcome of the previous call of the createBody method. This is especially useful when the createBody method fails, (returns null), because it provides information about why the failure occurred. It can also sometimes provide some information even when createBody succeeds.

Each string that's returned represents a single set of information and is packaged as JSON such as '{"description":"vertex data is null or inconsistent with edge geometry","associativeID":"unknown","code":37}'

The description is an English description of the error or warning. The associativeID maps back to the entity provided that is the cause of the problem. The ID is the associative ID you can optionally assign to the entity definition. The code is an internal code for the error or warning.

An empty array is returned if createBody succeeded and there's no additional information.

Accessed From

BRepBodyDefinition.create

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.classType Method

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepBodyDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepBodyDefinition.h>

returnValue = adsk::fusion::BRepBodyDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepBodyDefinition.create Method

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Static function that creates a new BRepBodyDefinition object. It's initially empty but you can use the functionality it provides to define the geometry and topology of the B-Rep object you want to create.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepBodyDefinition.create()
This is a static method.

#include <Fusion/BRep/BRepBodyDefinition.h>

returnValue = adsk::fusion::BRepBodyDefinition::create();

Return Value

Type | Description
BRepBodyDefinition | Returns the newly created BRepBodyDefinition object.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.createBody Method

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Attempts to create a temporary BRepBody object using the definition provided by this BRepBodyDefinition object. Properties on this BRepBodyDefinition are used to define some of the criteria that control how the body is created.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
returnValue = bRepBodyDefinition_var.createBody()
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

#include <Fusion/BRep/BRepBodyDefinition.h>

returnValue = bRepBodyDefinition_var->createBody();

Return Value

Type | Description
BRepBody | Returns the newly created BRepBody object if successful, otherwise null is returned. Information about the body creation can be obtained by using the outcomeInfo property. The outcom info is especially useful when initially writing and debugging your code to understand why the creation of the body is failing.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.createEdgeDefinitionByCurve Method

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Using a curve in model space it creates a new BRepEdgeDefinition object that's associated with the body.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
returnValue = bRepBodyDefinition_var.createEdgeDefinitionByCurve(startVertex, endVertex, modelSpaceCurve)
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

#include <Fusion/BRep/BRepBodyDefinition.h>

returnValue = bRepBodyDefinition_var->createEdgeDefinitionByCurve(startVertex, endVertex, modelSpaceCurve);

Return Value

Type | Description
BRepEdgeDefinition | Returns the created BRepEdgeDefinition object or null in the case of failure.

Parameters

Name | Type | Description
startVertex | BRepVertexDefinition | Vertex definition that defines the start of the edge. For a closed curve, like a circle, you still need to provide a vertex on the curve but you should use the same BRepVertexDefinition for both the start and end vertices.
endVertex | BRepVertexDefinition | Vertex definition that defines the end of the edge. For a closed curve, like a circle, this should be the same vertex as used for the start vertex.
modelSpaceCurve | Curve3D | A Curve3D object that defines the shape of the edge using 3D geometry in model space. Valid input is an Arc3D, NurbsCurve3D, Circle3D, Ellipse3D, EllipticalArc3D, or Line3D.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.createVertexDefinition Method

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Creates a new BRepVertexDefinition object that's associated with the body.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
returnValue = bRepBodyDefinition_var.createVertexDefinition(position)
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

#include <Fusion/BRep/BRepBodyDefinition.h>

returnValue = bRepBodyDefinition_var->createVertexDefinition(position);

Return Value

Type | Description
BRepVertexDefinition | Returns the created BRepVertexDefinition object or null in the case of failure.

Parameters

Name | Type | Description
position | Point3D | Specifies the position of the vertex in model space.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.doFullHealing Property

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Specifies if full healing is done when creating the body. This defaults to true and it's highly recommended that you do full healing because it can find and correct problems with the input. If you're sure that the B-Rep definition that you've constructed is correct then you can set this to false to skip the full healing process.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

# Get the value of the property.
propertyValue = bRepBodyDefinition_var.doFullHealing

# Set the value of the property.
bRepBodyDefinition_var.doFullHealing = propertyValue
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
#include <Fusion/BRep/BRepBodyDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepBodyDefinition_var->doFullHealing();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepBodyDefinition_var->doFullHealing(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.isValid Property

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

# Get the value of the property.
propertyValue = bRepBodyDefinition_var.isValid
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
#include <Fusion/BRep/BRepBodyDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepBodyDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepBodyDefinition.lumpDefinitions Property

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Provides access to the BRepLumpDefinitions object associated with this BRepBodyDefinition. It's through the returned collection that you can create new BRepLumpDefinition objects.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

# Get the value of the property.
propertyValue = bRepBodyDefinition_var.lumpDefinitions
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
#include <Fusion/BRep/BRepBodyDefinition.h>

// Get the value of the property.
Ptr<BRepLumpDefinitions> propertyValue = bRepBodyDefinition_var->lumpDefinitions();

Property Value

This is a read only property whose value is a BRepLumpDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepBodyDefinition.objectType Property

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

# Get the value of the property.
propertyValue = bRepBodyDefinition_var.objectType
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
#include <Fusion/BRep/BRepBodyDefinition.h>

// Get the value of the property.
string propertyValue = bRepBodyDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepBodyDefinition.outcomeInfo Property

Parent Object: BRepBodyDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBodyDefinition.h>

Description

Returns an array of strings that contain information about the outcome of the previous call of the createBody method. This is especially useful when the createBody method fails, (returns null), because it provides information about why the failure occurred. It can also sometimes provide some information even when createBody succeeds.

Each string that's returned represents a single set of information and is packaged as JSON such as '{"description":"vertex data is null or inconsistent with edge geometry","associativeID":"unknown","code":37}'

The description is an English description of the error or warning. The associativeID maps back to the entity provided that is the cause of the problem. The ID is the associative ID you can optionally assign to the entity definition. The code is an internal code for the error or warning.

An empty array is returned if createBody succeeded and there's no additional information.

Syntax

  • Python
  • C++
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.

# Get the value of the property.
propertyValue = bRepBodyDefinition_var.outcomeInfo
"bRepBodyDefinition_var" is a variable referencing a BRepBodyDefinition object.
#include <Fusion/BRep/BRepBodyDefinition.h>

// Get the value of the property.
std::vector<string> propertyValue = bRepBodyDefinition_var->outcomeInfo();

Property Value

This is a read only property whose value is an array of type string.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepCell Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

Object that represents an existing BRepCell.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sourceTools | Returns the tools that we're using in the definition of this cell.

Accessed From

BRepCells.item

Samples

Name | Description
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

Returns a BRepBody that represents this cell. This is a transient B-Rep body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

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.

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
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCell.h>

Description

Returns the tools that we're using in the definition of this cell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

Collection that provides access to all of the existing BRepCells defined by a BoundaryFillFeatureInput

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BoundaryFillFeature.bRepCells, BoundaryFillFeatureInput.bRepCells, TrimFeature.bRepCells, TrimFeatureInput.bRepCells

Samples

Name | Description
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

The number of BRepCells in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

Function that returns the specified BRepCell using an index into the collection.

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
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/BRepCells.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Represents the use of a BRepEdge by a BRepFace.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the BRepCoEdge object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same co-edge.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for co-edges that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the body this co-edge is part of.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the edge this co-edge is associated with.

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.entityToken Property

Parent Object: BRepCoEdge
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns a token for the BRepCoEdge object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same co-edge.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for co-edges that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.entityToken
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
string propertyValue = bRepCoEdge_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepCoEdge.evaluator Property

Parent Object: BRepCoEdge
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns a curve evaluator that can be used to perform geometric evaluations on the co-edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns a geometry object that represents the shape of this co-edge in parameter space of the parent face's surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Indicates if the orientation of this co-edge is in the same direction or opposed to its associated edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the loop this co-edge is part of.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the next co-edge in the loop.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the co-edge on the adjacent face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdge.h>

Description

Returns the previous co-edge in the loop.

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


BRepCoEdgeDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

Represents the definition of a B-Rep co-edge that can be used as input to create a BRepBody that includes this co-edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
edgeDefinition | Gets and sets the BRepEdgeDefinition object associated with this BrepCoEdgeDefinition object.
isOpposedToEdge | Gets and sets if the orientation of this BRepCoEdgeDefinition object is reversed with respect to the associated BRepEdgeDefinition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepCoEdgeDefinitions.add, BRepCoEdgeDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepCoEdgeDefinition.classType Method

Parent Object: BRepCoEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCoEdgeDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepCoEdgeDefinition.h>

returnValue = adsk::fusion::BRepCoEdgeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepCoEdgeDefinition.edgeDefinition Property

Parent Object: BRepCoEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

Gets and sets the BRepEdgeDefinition object associated with this BrepCoEdgeDefinition object.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinition_var.edgeDefinition

# Set the value of the property.
bRepCoEdgeDefinition_var.edgeDefinition = propertyValue
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.
#include <Fusion/BRep/BRepCoEdgeDefinition.h>

// Get the value of the property.
Ptr<BRepEdgeDefinition> propertyValue = bRepCoEdgeDefinition_var->edgeDefinition();

// Set the value of the property, where value_var is a BRepEdgeDefinition.
bool returnValue = bRepCoEdgeDefinition_var->edgeDefinition(value_var);

Property Value

This is a read/write property whose value is a BRepEdgeDefinition.

Version

Introduced in version September 2020


BRepCoEdgeDefinition.isOpposedToEdge Property

Parent Object: BRepCoEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

Gets and sets if the orientation of this BRepCoEdgeDefinition object is reversed with respect to the associated BRepEdgeDefinition object.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinition_var.isOpposedToEdge

# Set the value of the property.
bRepCoEdgeDefinition_var.isOpposedToEdge = propertyValue
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.
#include <Fusion/BRep/BRepCoEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdgeDefinition_var->isOpposedToEdge();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepCoEdgeDefinition_var->isOpposedToEdge(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


BRepCoEdgeDefinition.isValid Property

Parent Object: BRepCoEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinition_var.isValid
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.
#include <Fusion/BRep/BRepCoEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdgeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepCoEdgeDefinition.objectType Property

Parent Object: BRepCoEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinition_var.objectType
"bRepCoEdgeDefinition_var" is a variable referencing a BRepCoEdgeDefinition object.
#include <Fusion/BRep/BRepCoEdgeDefinition.h>

// Get the value of the property.
string propertyValue = bRepCoEdgeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepCoEdgeDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

Provides access to the BRepCoEdgeDefinition objects associated with the parent BRepLoopDefinition object. It's through this object that you create new BRepCoEdgeDefinition objects.

Methods

Name | Description
add | Creates a new BrepCoEdgeDefinition object associated with the parent BrepLoopDefinition 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().
item | Function that returns the specified BRepCoEdgeDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep co-edge definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepLoopDefinition.bRepCoEdgeDefinitions

Version

Introduced in version September 2020


BRepCoEdgeDefinitions.add Method

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

Creates a new BrepCoEdgeDefinition object associated with the parent BrepLoopDefinition object.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.
returnValue = bRepCoEdgeDefinitions_var.add(edgeDefinition, isOpposedToEdge)
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.

#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

returnValue = bRepCoEdgeDefinitions_var->add(edgeDefinition, isOpposedToEdge);

Return Value

Type | Description
BRepCoEdgeDefinition | Returns the newly created BrepCoEdgeDefinition object or null in the case of failure.

Parameters

Name | Type | Description
edgeDefinition | BRepEdgeDefinition | The BRepEdgeDefinition object this co-edge is related to.
isOpposedToEdge | boolean | Boolean that indicates if the orientation of this BRepCoEdgeDefinition is reversed with respect to the associated BRepEdgeDefinition object.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepCoEdgeDefinitions.classType Method

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCoEdgeDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

returnValue = adsk::fusion::BRepCoEdgeDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepCoEdgeDefinitions.count Property

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

The number of B-Rep co-edge definition objects in the collection.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinitions_var.count
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.
#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepCoEdgeDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepCoEdgeDefinitions.isValid Property

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinitions_var.isValid
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.
#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdgeDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepCoEdgeDefinitions.item Method

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

Function that returns the specified BRepCoEdgeDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.
returnValue = bRepCoEdgeDefinitions_var.item(index)
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.

#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

returnValue = bRepCoEdgeDefinitions_var->item(index);

Return Value

Type | Description
BRepCoEdgeDefinition | 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 2020


BRepCoEdgeDefinitions.objectType Property

Parent Object: BRepCoEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdgeDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepCoEdgeDefinitions_var.objectType
"bRepCoEdgeDefinitions_var" is a variable referencing a BRepCoEdgeDefinitions object.
#include <Fusion/BRep/BRepCoEdgeDefinitions.h>

// Get the value of the property.
string propertyValue = bRepCoEdgeDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepCoEdges Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

BRepCoEdge Collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepEdge.coEdges, BRepLoop.coEdges, BRepWire.coEdges

Version

Introduced in version August 2014


BRepCoEdges.classType Method

Parent Object: BRepCoEdges
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

The number of co-edges in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

Function that returns the specified co-edge using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepCoEdges.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the BRepEdge object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same edge.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for edges that exist in the design, (the isTemporary property is false).
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 degenerate 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

AlongEdgeRipFeatureDefinition.ripEdge, 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the parent body of the edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the bounding box of this edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the BRepCoEdges on the edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the BRepVertex that bounds its high parameter end.

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.entityToken Property

Parent Object: BRepEdge
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns a token for the BRepEdge object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same edge.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for edges that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.entityToken
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
string propertyValue = bRepEdge_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepEdge.evaluator Property

Parent Object: BRepEdge
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns CurveEvaluator3D for evaluation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the BRepFaces that are associated with this edge through its BRepCoEdges.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the underlying curve geometry of the edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns if the edge's geometry is degenerate. For example, the apex of a cone is a degenerate edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns if the edge is tolerant. The tolerance used is available from the tolerance property.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the length of the edge in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the parent shell of the edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the BRepVertex that bounds its low parameter end.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdge.h>

Description

Returns the tolerance used by a tolerant edge. This value is only useful when isTolerant is true.

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


BRepEdgeDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Represents the definition of a B-Rep edge that can be used as input to create a BRepBody.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
associativeID | Gets and sets the associate ID of this edge definition. This ID will be copied to the corresponding edge when the BRepBodyDefinition is used to create a BrepBody. It is used internally by Fusion as the identifier for the edge and is used for tracking this geometry for parametric recomputes.
endVertex | Gets and sets the end vertex of the edge definition.
isMergeable Gets and sets if the two faces that share this edge can be merged along this edge. This property defaults to true so that merging is always done but this can be set to false in cases where you want to preserve the edge.

An example where merging is typically done is when you have multiple planar faces that all lie on the same plane and are connected. When merging is allowed these faces can be replaced by a single face and the edges connecting the faces (the merged edges) are no longer part of the body.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
modelSpaceCurve | Gets and sets the curve that defines the shape of the edge.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
startVertex | Gets and sets the start vertex of the edge definition.

Accessed From

BRepBodyDefinition.createEdgeDefinitionByCurve, BRepCoEdgeDefinition.edgeDefinition

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepEdgeDefinition.associativeID Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Gets and sets the associate ID of this edge definition. This ID will be copied to the corresponding edge when the BRepBodyDefinition is used to create a BrepBody. It is used internally by Fusion as the identifier for the edge and is used for tracking this geometry for parametric recomputes.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.associativeID

# Set the value of the property.
bRepEdgeDefinition_var.associativeID = propertyValue
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
integer propertyValue = bRepEdgeDefinition_var->associativeID();

// Set the value of the property, where value_var is an integer.
bool returnValue = bRepEdgeDefinition_var->associativeID(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2020


BRepEdgeDefinition.classType Method

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepEdgeDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepEdgeDefinition.h>

returnValue = adsk::fusion::BRepEdgeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepEdgeDefinition.endVertex Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Gets and sets the end vertex of the edge definition.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.endVertex

# Set the value of the property.
bRepEdgeDefinition_var.endVertex = propertyValue
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
Ptr<BRepVertexDefinition> propertyValue = bRepEdgeDefinition_var->endVertex();

// Set the value of the property, where value_var is a BRepVertexDefinition.
bool returnValue = bRepEdgeDefinition_var->endVertex(value_var);

Property Value

This is a read/write property whose value is a BRepVertexDefinition.

Version

Introduced in version September 2020


BRepEdgeDefinition.isMergeable Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Gets and sets if the two faces that share this edge can be merged along this edge. This property defaults to true so that merging is always done but this can be set to false in cases where you want to preserve the edge.

An example where merging is typically done is when you have multiple planar faces that all lie on the same plane and are connected. When merging is allowed these faces can be replaced by a single face and the edges connecting the faces (the merged edges) are no longer part of the body.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.isMergeable

# Set the value of the property.
bRepEdgeDefinition_var.isMergeable = propertyValue
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepEdgeDefinition_var->isMergeable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepEdgeDefinition_var->isMergeable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


BRepEdgeDefinition.isValid Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.isValid
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepEdgeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepEdgeDefinition.modelSpaceCurve Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Gets and sets the curve that defines the shape of the edge.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.modelSpaceCurve

# Set the value of the property.
bRepEdgeDefinition_var.modelSpaceCurve = propertyValue
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = bRepEdgeDefinition_var->modelSpaceCurve();

// Set the value of the property, where value_var is a Curve3D.
bool returnValue = bRepEdgeDefinition_var->modelSpaceCurve(value_var);

Property Value

This is a read/write property whose value is a Curve3D.

Version

Introduced in version September 2020


BRepEdgeDefinition.objectType Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.objectType
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
string propertyValue = bRepEdgeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepEdgeDefinition.startVertex Property

Parent Object: BRepEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdgeDefinition.h>

Description

Gets and sets the start vertex of the edge definition.

Syntax

  • Python
  • C++
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepEdgeDefinition_var.startVertex

# Set the value of the property.
bRepEdgeDefinition_var.startVertex = propertyValue
"bRepEdgeDefinition_var" is a variable referencing a BRepEdgeDefinition object.
#include <Fusion/BRep/BRepEdgeDefinition.h>

// Get the value of the property.
Ptr<BRepVertexDefinition> propertyValue = bRepEdgeDefinition_var->startVertex();

// Set the value of the property, where value_var is a BRepVertexDefinition.
bool returnValue = bRepEdgeDefinition_var->startVertex(value_var);

Property Value

This is a read/write property whose value is a BRepVertexDefinition.

Version

Introduced in version September 2020


BRepEdges Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

BRepEdge collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

The number of edges in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

Function that returns the specified edge using an index into the collection.

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
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepEdges.objectType Property

Parent Object: BRepEdges
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepEdges.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Represent a connected region on a single geometric surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isPointOnFace | Checks if input point is on this BRepFace. This takes into account any boundaries so if the point is within a void area of the face, this will return false.

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
entityToken Returns a token for the BRepFace object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same face.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for faces that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 tangentially 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, Decal.faces, DecalInput.faces, DeleteFaceFeature.deletedFaces, DraftFeature.inputFaces, DraftFeatureInput.inputFaces, FaceRipFeatureDefinition.ripFace, FlatPattern.bottomFace, FlatPattern.topFace, LoftFeature.endFace, LoftFeature.startFace, MergeFacesFeatureInput.inputFaces, PatternElement.faces, Profile.face, RecognizedPocket.faces, RecognizedPocket.sharedFaces, SurfaceDeleteFaceFeature.deletedFaces, SweepFeature.guideSurfaces, SweepFeatureInput.guideSurfaces, TangentRelationshipInput.faceOne, ThreadFeature.inputCylindricalFace, ThreadFeatureInput.inputCylindricalFace, UntrimFeature.facesToUntrim, UntrimFeatureInput.facesToUntrim

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the area in cm ^ 2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the parent body of the face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the bounding box of this face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns a point at the centroid (aka, geometric center) of the face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the BRepEdges used by this face

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.entityToken Property

Parent Object: BRepFace
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns a token for the BRepFace object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same face.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for faces that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.entityToken
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
string propertyValue = bRepFace_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepFace.evaluator Property

Parent Object: BRepFace
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the underlying surface geometry of this face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Gets if the normal of this face is reversed with respect to the surface geometry associated with this face.

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.isPointOnFace Method

Parent Object: BRepFace
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Checks if input point is on this BRepFace. This takes into account any boundaries so if the point is within a void area of the face, this will return false.

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.
# Uses no optional arguments.
returnValue = bRepFace_var.isPointOnFace(point)

# Uses optional arguments.
returnValue = bRepFace_var.isPointOnFace(point, tolerance)
"bRepFace_var" is a variable referencing a BRepFace object.

#include <Fusion/BRep/BRepFace.h>

// Uses no optional arguments.
returnValue = bRepFace_var->isPointOnFace(point);

// Uses optional arguments.
returnValue = bRepFace_var->isPointOnFace(point, tolerance);

Return Value

Type | Description
boolean | Returns true if the point lies on the face.

Parameters

Name | Type | Description
point | Point3D | The input point to check.
tolerance | double | Specifies how close the point must be to the face to be considered on the face. Defaults to the point tolerance which can be obtained using the Application.pointTolerance property. The value is in centimeters. This is an optional argument whose default value is 0.0.

Version

Introduced in version September 2024


BRepFace.isValid Property

Parent Object: BRepFace
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the BRepLoops owned by this face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns a MeshManager object that allows access to existing and new meshes of this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns a sample point guaranteed to lie on the face's surface, within the face's boundaries, and not on a boundary edge.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the parent shell of the face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the set of faces that are tangentially 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFace.h>

Description

Returns the BRepVertices used by this face

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


BRepFaceDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Represents the definition of a B-Rep face that can be used as input to create a BRepBody that includes this face.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
associativeID | Gets and sets the associate ID of this face definition. This ID will be copied to the corresponding face when the BRepBodyDefinition is used to create a BrepBody. It is used by Fusion as the identifier for the face and is used for tracking this geometry for parametric recomputes.
isParamReversed | Gets and sets if the normal of this face is reversed with respect to the surface geometry associated with this face definition.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loopDefinitions | Provides access to the BRepLoopDefinitions object associated with this BRepFaceDefinition. It's through the returned collection that you can create new BRepLoopDefinition objects.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
surfaceGeometry | Gets and sets the surface geometry associated with this face definition.

Accessed From

BRepFaceDefinitions.add, BRepFaceDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepFaceDefinition.associativeID Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Gets and sets the associate ID of this face definition. This ID will be copied to the corresponding face when the BRepBodyDefinition is used to create a BrepBody. It is used by Fusion as the identifier for the face and is used for tracking this geometry for parametric recomputes.

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.associativeID

# Set the value of the property.
bRepFaceDefinition_var.associativeID = propertyValue
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
integer propertyValue = bRepFaceDefinition_var->associativeID();

// Set the value of the property, where value_var is an integer.
bool returnValue = bRepFaceDefinition_var->associativeID(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2020


BRepFaceDefinition.classType Method

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepFaceDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepFaceDefinition.h>

returnValue = adsk::fusion::BRepFaceDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepFaceDefinition.isParamReversed Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Gets and sets if the normal of this face is reversed with respect to the surface geometry associated with this face definition.

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.isParamReversed

# Set the value of the property.
bRepFaceDefinition_var.isParamReversed = propertyValue
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepFaceDefinition_var->isParamReversed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepFaceDefinition_var->isParamReversed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


BRepFaceDefinition.isValid Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.isValid
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepFaceDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepFaceDefinition.loopDefinitions Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Provides access to the BRepLoopDefinitions object associated with this BRepFaceDefinition. It's through the returned collection that you can create new BRepLoopDefinition objects.

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.loopDefinitions
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
Ptr<BRepLoopDefinitions> propertyValue = bRepFaceDefinition_var->loopDefinitions();

Property Value

This is a read only property whose value is a BRepLoopDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepFaceDefinition.objectType Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.objectType
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
string propertyValue = bRepFaceDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepFaceDefinition.surfaceGeometry Property

Parent Object: BRepFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinition.h>

Description

Gets and sets the surface geometry associated with this face definition.

Syntax

  • Python
  • C++
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.

# Get the value of the property.
propertyValue = bRepFaceDefinition_var.surfaceGeometry

# Set the value of the property.
bRepFaceDefinition_var.surfaceGeometry = propertyValue
"bRepFaceDefinition_var" is a variable referencing a BRepFaceDefinition object.
#include <Fusion/BRep/BRepFaceDefinition.h>

// Get the value of the property.
Ptr<Surface> propertyValue = bRepFaceDefinition_var->surfaceGeometry();

// Set the value of the property, where value_var is a Surface.
bool returnValue = bRepFaceDefinition_var->surfaceGeometry(value_var);

Property Value

This is a read/write property whose value is a Surface.

Version

Introduced in version September 2020


BRepFaceDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

Provides access to the BRepFaceDefinition objects associated with the object the collection was obtained from. It's through this object that you create new BRepFaceDefinition objects.

Methods

Name | Description
add | Creates a new BrepFaceDefinition within the parent BRepShellDefinition 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().
item | Function that returns the specified BRepFaceDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep face definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepShellDefinition.faceDefinitions

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepFaceDefinitions.add Method

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

Creates a new BrepFaceDefinition within the parent BRepShellDefinition object.

Syntax

  • Python
  • C++
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.
returnValue = bRepFaceDefinitions_var.add(surfaceGeometry, isParamReversed)
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.

#include <Fusion/BRep/BRepFaceDefinitions.h>

returnValue = bRepFaceDefinitions_var->add(surfaceGeometry, isParamReversed);

Return Value

Type | Description
BRepFaceDefinition | Returns the newly created BRepFaceDefinition object or null in the case of failure.

Parameters

Name | Type | Description
surfaceGeometry | Surface | Input surface object that defines the geometry of the face. Valid objects for input are NurbsSurface, Cone, Cylinder, EllipticalCone, EllipticalCylinder, Plane, Sphere, and Torus.
isParamReversed | boolean | Input Boolean that indicates if the normal of this face is reversed with respect to the surface geometry associated with this face definition.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepFaceDefinitions.classType Method

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepFaceDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepFaceDefinitions.h>

returnValue = adsk::fusion::BRepFaceDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepFaceDefinitions.count Property

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

The number of B-Rep face definition objects in the collection.

Syntax

  • Python
  • C++
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.

# Get the value of the property.
propertyValue = bRepFaceDefinitions_var.count
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.
#include <Fusion/BRep/BRepFaceDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepFaceDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepFaceDefinitions.isValid Property

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.

# Get the value of the property.
propertyValue = bRepFaceDefinitions_var.isValid
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.
#include <Fusion/BRep/BRepFaceDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepFaceDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepFaceDefinitions.item Method

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

Function that returns the specified BRepFaceDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.
returnValue = bRepFaceDefinitions_var.item(index)
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.

#include <Fusion/BRep/BRepFaceDefinitions.h>

returnValue = bRepFaceDefinitions_var->item(index);

Return Value

Type | Description
BRepFaceDefinition | 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 2020


BRepFaceDefinitions.objectType Property

Parent Object: BRepFaceDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaceDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.

# Get the value of the property.
propertyValue = bRepFaceDefinitions_var.objectType
"bRepFaceDefinitions_var" is a variable referencing a BRepFaceDefinitions object.
#include <Fusion/BRep/BRepFaceDefinitions.h>

// Get the value of the property.
string propertyValue = bRepFaceDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepFaces Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

BRepFace collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangeFeature.faces, BaseFeature.faces, BossFeature.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, CustomFeature.faces, CutPasteBody.faces, CylinderFeature.faces, DeleteFaceFeature.faces, DraftFeature.faces, ExtendFeature.faces, ExtrudeFeature.endFaces, ExtrudeFeature.faces, ExtrudeFeature.sideFaces, ExtrudeFeature.startFaces, Feature.faces, FilletFeature.faces, FlangeFeature.faces, FlatPattern.faces, FlatPattern.sideFaces, FormFeature.faces, HoleFeature.endFaces, HoleFeature.faces, HoleFeature.sideFaces, LoftFeature.faces, LoftFeature.sideFaces, MeshCombineFaceGroupsFeature.faces, MeshCombineFeature.faces, MeshConvertFeature.faces, MeshFeature.faces, MeshGenerateFaceGroupsFeature.faces, MeshReduceFeature.faces, MeshRemeshFeature.faces, MeshRepairFeature.faces, MeshReverseNormalFeature.faces, MeshSeparateFeature.faces, MeshShellFeature.faces, MeshSmoothFeature.faces, MirrorFeature.faces, MoveFeature.faces, OffsetFacesFeature.faces, OffsetFeature.faces, PatchFeature.faces, PathPatternFeature.faces, PipeFeature.endFaces, PipeFeature.faces, PipeFeature.sideFaces, PipeFeature.startFaces, RectangularPatternFeature.faces, RefoldFeature.faces, RemoveFeature.faces, ReplaceFaceFeature.faces, ReverseNormalFeature.faces, RevolveFeature.endFaces, RevolveFeature.faces, RevolveFeature.sideFaces, RevolveFeature.startFaces, RibFeature.faces, RipFeature.faces, RuledSurfaceFeature.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, TessellateFeature.faces, ThickenFeature.faces, ThreadFeature.faces, TorusFeature.faces, TrimFeature.faces, UnfoldFeature.faces, UnstitchFeature.faces, UntrimFeature.faces, VolumetricCustomFeature.faces, VolumetricModelToMeshFeature.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

The number of faces in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

Function that returns the specified face using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepFaces.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Represents a connected portion of a BRepFace boundary. It consists of a chain of BRepCoEdges.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
entityToken Returns a token for the BRepLoop object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same loop.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for loops that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepCoEdge.loop, BRepLoop.createForAssemblyContext, BRepLoop.nativeObject, BRepLoops.item, UntrimFeature.loopsToUntrim, UntrimFeatureInput.loopsToUntrim

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns the parent body of the loop.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns the bounding box of this loop

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns the BRepCoEdges consisting this loop

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns the BRepEdges used by this loop

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.entityToken Property

Parent Object: BRepLoop
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns a token for the BRepLoop object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same loop.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for loops that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.entityToken
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
string propertyValue = bRepLoop_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLoop.face Property

Parent Object: BRepLoop
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns the parent face of the loop.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Returns true of this loop is an outer loop of a face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoop.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


BRepLoopDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinition.h>

Description

Represents the definition of a B-Rep loop that can be used as input to create a BRepBody that includes this loop.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
bRepCoEdgeDefinitions | Provides access to the BRepCoEdgeDefinitions object associated with the parent BRepFaceDefinition object. It's through the returned collection that you can create new BRepCoEdgeDefinition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepLoopDefinitions.add, BRepLoopDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLoopDefinition.bRepCoEdgeDefinitions Property

Parent Object: BRepLoopDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinition.h>

Description

Provides access to the BRepCoEdgeDefinitions object associated with the parent BRepFaceDefinition object. It's through the returned collection that you can create new BRepCoEdgeDefinition objects.

Syntax

  • Python
  • C++
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.

# Get the value of the property.
propertyValue = bRepLoopDefinition_var.bRepCoEdgeDefinitions
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.
#include <Fusion/BRep/BRepLoopDefinition.h>

// Get the value of the property.
Ptr<BRepCoEdgeDefinitions> propertyValue = bRepLoopDefinition_var->bRepCoEdgeDefinitions();

Property Value

This is a read only property whose value is a BRepCoEdgeDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLoopDefinition.classType Method

Parent Object: BRepLoopDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLoopDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepLoopDefinition.h>

returnValue = adsk::fusion::BRepLoopDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepLoopDefinition.isValid Property

Parent Object: BRepLoopDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.

# Get the value of the property.
propertyValue = bRepLoopDefinition_var.isValid
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.
#include <Fusion/BRep/BRepLoopDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepLoopDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepLoopDefinition.objectType Property

Parent Object: BRepLoopDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.

# Get the value of the property.
propertyValue = bRepLoopDefinition_var.objectType
"bRepLoopDefinition_var" is a variable referencing a BRepLoopDefinition object.
#include <Fusion/BRep/BRepLoopDefinition.h>

// Get the value of the property.
string propertyValue = bRepLoopDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLoopDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

Provides access to the BRepLoopDefinition objects associated with the parent BRepFaceDefinition object. It's through this object that you create new BRepLoopDefinition objects.

Methods

Name | Description
add | Creates a new empty loop associated with the parent face definition.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 BRepLoopDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep loop definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepFaceDefinition.loopDefinitions

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLoopDefinitions.add Method

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

Creates a new empty loop associated with the parent face definition.

Syntax

  • Python
  • C++
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.
returnValue = bRepLoopDefinitions_var.add()
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.

#include <Fusion/BRep/BRepLoopDefinitions.h>

returnValue = bRepLoopDefinitions_var->add();

Return Value

Type | Description
BRepLoopDefinition | Returns the newly created BRepLoopDefinition object.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLoopDefinitions.classType Method

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLoopDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepLoopDefinitions.h>

returnValue = adsk::fusion::BRepLoopDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepLoopDefinitions.count Property

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

The number of B-Rep loop definition objects in the collection.

Syntax

  • Python
  • C++
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.

# Get the value of the property.
propertyValue = bRepLoopDefinitions_var.count
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.
#include <Fusion/BRep/BRepLoopDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepLoopDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepLoopDefinitions.isValid Property

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.

# Get the value of the property.
propertyValue = bRepLoopDefinitions_var.isValid
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.
#include <Fusion/BRep/BRepLoopDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepLoopDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepLoopDefinitions.item Method

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

Function that returns the specified BRepLoopDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.
returnValue = bRepLoopDefinitions_var.item(index)
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.

#include <Fusion/BRep/BRepLoopDefinitions.h>

returnValue = bRepLoopDefinitions_var->item(index);

Return Value

Type | Description
BRepLoopDefinition | 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 2020


BRepLoopDefinitions.objectType Property

Parent Object: BRepLoopDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoopDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.

# Get the value of the property.
propertyValue = bRepLoopDefinitions_var.objectType
"bRepLoopDefinitions_var" is a variable referencing a BRepLoopDefinitions object.
#include <Fusion/BRep/BRepLoopDefinitions.h>

// Get the value of the property.
string propertyValue = bRepLoopDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLoops Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

BRepLoop collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

The number of loops in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

Function that returns the specified loop using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLoops.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Represents an entirely connected set of entities. A BRepBody consists of BRepLumps.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
entityToken Returns a token for the BRepLump object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same lump.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for lump that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the area in cm ^ 2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the immediate owner BRepBody of the lump

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the bounding box of the lump

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the BRepEdges owned by the lump

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.entityToken Property

Parent Object: BRepLump
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns a token for the BRepLump object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same lump.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for lump that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.entityToken
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
string propertyValue = bRepLump_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLump.faces Property

Parent Object: BRepLump
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the BRepFaces owned by the lump

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns true of the lump is closed

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the mesh manager object for this lump.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Determines the relationship of the input point with respect to this lump.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the BRepShells owned by the lump

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the BRepVertices owned by the lump

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLump.h>

Description

Returns the volume in cm ^ 3. Returns 0 in the case the lump is not solid.

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


BRepLumpDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinition.h>

Description

Represents the definition of a B-Rep lump which is used in defining the topology of a B-Rep body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
shellDefinitions | Provides access to the BRepShellDefinitions object associated with this BRepLumpDefinition. It's through the returned collection that you can create new BRepShellDefinition objects.

Accessed From

BRepLumpDefinitions.add, BRepLumpDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLumpDefinition.classType Method

Parent Object: BRepLumpDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLumpDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepLumpDefinition.h>

returnValue = adsk::fusion::BRepLumpDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepLumpDefinition.isValid Property

Parent Object: BRepLumpDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.

# Get the value of the property.
propertyValue = bRepLumpDefinition_var.isValid
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.
#include <Fusion/BRep/BRepLumpDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepLumpDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepLumpDefinition.objectType Property

Parent Object: BRepLumpDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.

# Get the value of the property.
propertyValue = bRepLumpDefinition_var.objectType
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.
#include <Fusion/BRep/BRepLumpDefinition.h>

// Get the value of the property.
string propertyValue = bRepLumpDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLumpDefinition.shellDefinitions Property

Parent Object: BRepLumpDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinition.h>

Description

Provides access to the BRepShellDefinitions object associated with this BRepLumpDefinition. It's through the returned collection that you can create new BRepShellDefinition objects.

Syntax

  • Python
  • C++
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.

# Get the value of the property.
propertyValue = bRepLumpDefinition_var.shellDefinitions
"bRepLumpDefinition_var" is a variable referencing a BRepLumpDefinition object.
#include <Fusion/BRep/BRepLumpDefinition.h>

// Get the value of the property.
Ptr<BRepShellDefinitions> propertyValue = bRepLumpDefinition_var->shellDefinitions();

Property Value

This is a read only property whose value is a BRepShellDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLumpDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

Provides access to the BRepLumpDefinition objects associated with the BRepBodyDefinition and it's through this object that you create new BRepLumpDefinition objects.

Methods

Name | Description
add | Creates a new empty BRepLumpDefinition associated with the parent BRepBodyDefinition 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().
item | Function that returns the specified BRepLumpDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep lump definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBodyDefinition.lumpDefinitions

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLumpDefinitions.add Method

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

Creates a new empty BRepLumpDefinition associated with the parent BRepBodyDefinition object.

Syntax

  • Python
  • C++
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.
returnValue = bRepLumpDefinitions_var.add()
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.

#include <Fusion/BRep/BRepLumpDefinitions.h>

returnValue = bRepLumpDefinitions_var->add();

Return Value

Type | Description
BRepLumpDefinition | Returns the newly created BRepLumpDefinition object.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepLumpDefinitions.classType Method

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLumpDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepLumpDefinitions.h>

returnValue = adsk::fusion::BRepLumpDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepLumpDefinitions.count Property

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

The number of B-Rep lump definition objects in the collection.

Syntax

  • Python
  • C++
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.

# Get the value of the property.
propertyValue = bRepLumpDefinitions_var.count
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.
#include <Fusion/BRep/BRepLumpDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepLumpDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepLumpDefinitions.isValid Property

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.

# Get the value of the property.
propertyValue = bRepLumpDefinitions_var.isValid
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.
#include <Fusion/BRep/BRepLumpDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepLumpDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepLumpDefinitions.item Method

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

Function that returns the specified BRepLumpDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.
returnValue = bRepLumpDefinitions_var.item(index)
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.

#include <Fusion/BRep/BRepLumpDefinitions.h>

returnValue = bRepLumpDefinitions_var->item(index);

Return Value

Type | Description
BRepLumpDefinition | 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 2020


BRepLumpDefinitions.objectType Property

Parent Object: BRepLumpDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumpDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.

# Get the value of the property.
propertyValue = bRepLumpDefinitions_var.objectType
"bRepLumpDefinitions_var" is a variable referencing a BRepLumpDefinitions object.
#include <Fusion/BRep/BRepLumpDefinitions.h>

// Get the value of the property.
string propertyValue = bRepLumpDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepLumps Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

BRepLump collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBody.lumps

Version

Introduced in version August 2014


BRepLumps.classType Method

Parent Object: BRepLumps
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

Returns the number of lumps in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

Function that returns the specified lump using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepLumps.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Represents an entirely connected set of BRepFaces. A BRepLump may contain multiple BRepShells.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
entityToken Returns a token for the BRepShell object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same shell.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for shells that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the area in cm ^ 2.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the parent body of the shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the bounding box of this shell

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

returns the BRepEdges owned by this shell

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.entityToken Property

Parent Object: BRepShell
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns a token for the BRepShell object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same shell.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for shells that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.entityToken
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
string propertyValue = bRepShell_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepShell.faces Property

Parent Object: BRepShell
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the BRepFaces directly owned by this shell

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns true if this shell is closed

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns true if the faces of this shell bound a void or an empty space within an outer shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the parent lump of this shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the mesh manager object for this shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Determines the relationship of the input point with respect to this shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the BRepVertices owned by this shell

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the volume in cm ^ 3. Returns 0 in the case the shell is not solid.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShell.h>

Description

Returns the wire body, if any, that exists in this shell. Returns null if the shell doesn't have a wire body.

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


BRepShellDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

Represents the definition of a B-Rep shell that can be used as input to create a BRepBody that includes this shell.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
faceDefinitions | Provides access to the BRepFaceDefinitions object associated with this BRepShellDefinition. It's through the returned collection that you can create new BRepFaceDefinition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
wireDefinition | Returns the single BRepWireDefinition associated with this shell definition.

Accessed From

BRepShellDefinitions.add, BRepShellDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepShellDefinition.classType Method

Parent Object: BRepShellDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepShellDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepShellDefinition.h>

returnValue = adsk::fusion::BRepShellDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepShellDefinition.faceDefinitions Property

Parent Object: BRepShellDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

Provides access to the BRepFaceDefinitions object associated with this BRepShellDefinition. It's through the returned collection that you can create new BRepFaceDefinition objects.

Syntax

  • Python
  • C++
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.

# Get the value of the property.
propertyValue = bRepShellDefinition_var.faceDefinitions
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.
#include <Fusion/BRep/BRepShellDefinition.h>

// Get the value of the property.
Ptr<BRepFaceDefinitions> propertyValue = bRepShellDefinition_var->faceDefinitions();

Property Value

This is a read only property whose value is a BRepFaceDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepShellDefinition.isValid Property

Parent Object: BRepShellDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.

# Get the value of the property.
propertyValue = bRepShellDefinition_var.isValid
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.
#include <Fusion/BRep/BRepShellDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepShellDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepShellDefinition.objectType Property

Parent Object: BRepShellDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.

# Get the value of the property.
propertyValue = bRepShellDefinition_var.objectType
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.
#include <Fusion/BRep/BRepShellDefinition.h>

// Get the value of the property.
string propertyValue = bRepShellDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepShellDefinition.wireDefinition Property

Parent Object: BRepShellDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinition.h>

Description

Returns the single BRepWireDefinition associated with this shell definition.

Syntax

  • Python
  • C++
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.

# Get the value of the property.
propertyValue = bRepShellDefinition_var.wireDefinition
"bRepShellDefinition_var" is a variable referencing a BRepShellDefinition object.
#include <Fusion/BRep/BRepShellDefinition.h>

// Get the value of the property.
Ptr<BRepWireDefinition> propertyValue = bRepShellDefinition_var->wireDefinition();

Property Value

This is a read only property whose value is a BRepWireDefinition.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepShellDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

Provides access to the BRepShellDefinition objects associated with the object the collection was obtained from. It's through this object that you create new BRepShellDefinition objects.

Methods

Name | Description
add | Creates a new empty BRepShellDefinition object associated with the parent BRepLumpDefinition.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 BRepShellDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep shell definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepLumpDefinition.shellDefinitions

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepShellDefinitions.add Method

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

Creates a new empty BRepShellDefinition object associated with the parent BRepLumpDefinition.

Syntax

  • Python
  • C++
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.
returnValue = bRepShellDefinitions_var.add()
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.

#include <Fusion/BRep/BRepShellDefinitions.h>

returnValue = bRepShellDefinitions_var->add();

Return Value

Type | Description
BRepShellDefinition | Returns the newly created BRepShellDefinition object.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepShellDefinitions.classType Method

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepShellDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepShellDefinitions.h>

returnValue = adsk::fusion::BRepShellDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepShellDefinitions.count Property

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

The number of B-Rep shell definition objects in the collection.

Syntax

  • Python
  • C++
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.

# Get the value of the property.
propertyValue = bRepShellDefinitions_var.count
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.
#include <Fusion/BRep/BRepShellDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepShellDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepShellDefinitions.isValid Property

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.

# Get the value of the property.
propertyValue = bRepShellDefinitions_var.isValid
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.
#include <Fusion/BRep/BRepShellDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepShellDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepShellDefinitions.item Method

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

Function that returns the specified BRepShellDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.
returnValue = bRepShellDefinitions_var.item(index)
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.

#include <Fusion/BRep/BRepShellDefinitions.h>

returnValue = bRepShellDefinitions_var->item(index);

Return Value

Type | Description
BRepShellDefinition | 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 2020


BRepShellDefinitions.objectType Property

Parent Object: BRepShellDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShellDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.

# Get the value of the property.
propertyValue = bRepShellDefinitions_var.objectType
"bRepShellDefinitions_var" is a variable referencing a BRepShellDefinitions object.
#include <Fusion/BRep/BRepShellDefinitions.h>

// Get the value of the property.
string propertyValue = bRepShellDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepShells Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

BRepShell collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBody.shells, BRepLump.shells

Version

Introduced in version August 2014


BRepShells.classType Method

Parent Object: BRepShells
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

The number of shells in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

Function that returns the specified shell using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepShells.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

A 0-dimensional topological entity that bounds a BRepEdge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
entityToken Returns a token for the BRepVertex object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same vertex.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for vertices that exist in the design, (the isTemporary property is false).
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the parent body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the BRepEdges bounded by this vertex

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.entityToken Property

Parent Object: BRepVertex
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns a token for the BRepVertex object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same vertex.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for vertices that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.entityToken
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
string propertyValue = bRepVertex_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepVertex.faces Property

Parent Object: BRepVertex
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the BRepFaces that uses this vertex through BRepEdge

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the underlying geometry point

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns if the vertex is tolerant. The tolerance used is available from the tolerance property.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the parent shell.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertex.h>

Description

Returns the tolerance used by a tolerant vertex. This value is only useful when isTolerant is true.

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


BRepVertexDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertexDefinition.h>

Description

Represents the definition of a B-Rep vertex that can be used as input to create a BRepBody that includes this vertex.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
position | Gets and sets the position of the vertex in model space.

Accessed From

BRepBodyDefinition.createVertexDefinition, BRepEdgeDefinition.endVertex, BRepEdgeDefinition.startVertex, BRepWireEdgeDefinition.endVertex, BRepWireEdgeDefinition.startVertex

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepVertexDefinition.classType Method

Parent Object: BRepVertexDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertexDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepVertexDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepVertexDefinition.h>

returnValue = adsk::fusion::BRepVertexDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepVertexDefinition.isValid Property

Parent Object: BRepVertexDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertexDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.

# Get the value of the property.
propertyValue = bRepVertexDefinition_var.isValid
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.
#include <Fusion/BRep/BRepVertexDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepVertexDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepVertexDefinition.objectType Property

Parent Object: BRepVertexDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertexDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.

# Get the value of the property.
propertyValue = bRepVertexDefinition_var.objectType
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.
#include <Fusion/BRep/BRepVertexDefinition.h>

// Get the value of the property.
string propertyValue = bRepVertexDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepVertexDefinition.position Property

Parent Object: BRepVertexDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertexDefinition.h>

Description

Gets and sets the position of the vertex in model space.

Syntax

  • Python
  • C++
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.

# Get the value of the property.
propertyValue = bRepVertexDefinition_var.position

# Set the value of the property.
bRepVertexDefinition_var.position = propertyValue
"bRepVertexDefinition_var" is a variable referencing a BRepVertexDefinition object.
#include <Fusion/BRep/BRepVertexDefinition.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = bRepVertexDefinition_var->position();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = bRepVertexDefinition_var->position(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2020


BRepVertices Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

BRepVertex collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBody.vertices, BRepFace.vertices, BRepLump.vertices, BRepShell.vertices, BRepWire.vertices

Version

Introduced in version August 2014


BRepVertices.classType Method

Parent Object: BRepVertices
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

The number of vertices in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

Function that returns the specified vertex using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepVertices.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Represents a single B-Rep wire body. A wire body consists of one or more edges and their vertices.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Returns the co-edges associated with this wire body. The co-edges record the connections between the edges in the wire body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Returns the B-Rep edges associated with this wire body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Indicates if this entities making up this wire body are planar and all lie on the same plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

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.

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 offsetting 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Returns the parent BRepBody object that contains this wire.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWire.h>

Description

Returns the B-Rep vertices associated with this wire body.

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


BRepWireDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireDefinition.h>

Description

Represents the definition of a B-Rep wire that can be used as input to create a BRepBody that includes this wire.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
wireEdgeDefinitions | Provides access to the BRepWireEdgeDefinitions object associated with the parent BRepWireDefinition object. It's through the returned collection that you can create new BRepWireEdgeDefinitions objects.

Accessed From

BRepShellDefinition.wireDefinition

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireDefinition.classType Method

Parent Object: BRepWireDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepWireDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepWireDefinition.h>

returnValue = adsk::fusion::BRepWireDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepWireDefinition.isValid Property

Parent Object: BRepWireDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.

# Get the value of the property.
propertyValue = bRepWireDefinition_var.isValid
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.
#include <Fusion/BRep/BRepWireDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepWireDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepWireDefinition.objectType Property

Parent Object: BRepWireDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.

# Get the value of the property.
propertyValue = bRepWireDefinition_var.objectType
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.
#include <Fusion/BRep/BRepWireDefinition.h>

// Get the value of the property.
string propertyValue = bRepWireDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepWireDefinition.wireEdgeDefinitions Property

Parent Object: BRepWireDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireDefinition.h>

Description

Provides access to the BRepWireEdgeDefinitions object associated with the parent BRepWireDefinition object. It's through the returned collection that you can create new BRepWireEdgeDefinitions objects.

Syntax

  • Python
  • C++
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.

# Get the value of the property.
propertyValue = bRepWireDefinition_var.wireEdgeDefinitions
"bRepWireDefinition_var" is a variable referencing a BRepWireDefinition object.
#include <Fusion/BRep/BRepWireDefinition.h>

// Get the value of the property.
Ptr<BRepWireEdgeDefinitions> propertyValue = bRepWireDefinition_var->wireEdgeDefinitions();

Property Value

This is a read only property whose value is a BRepWireEdgeDefinitions.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Represents the definition of an edge in B-Rep wire that can be used as input to create a BRepBody that includes this wire edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
associativeID | Gets and sets the associate ID of this B-Rep wire definition. This ID will be copied to the corresponding edge when the BRepBodyDefinition is used to create a BrepBody. It is used by Fusion as the identifier for the edge and is used for tracking this geometry for parametric recomputes.
endVertex | Gets and sets the end vertex of the wire edge definition.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
modelSpaceCurve | Gets and sets the Curve3D object that defines the shape of the edge using 3D geometry in model space. Valid objects are an Arc3D, NurbsCurve3D, Circle3D, Ellipse3D, EllipticalArc3D, or Line3D.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
startVertex | Gets and sets the start vertex of the wire edge definition.

Accessed From

BRepWireEdgeDefinitions.add, BRepWireEdgeDefinitions.item

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.associativeID Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Gets and sets the associate ID of this B-Rep wire definition. This ID will be copied to the corresponding edge when the BRepBodyDefinition is used to create a BrepBody. It is used by Fusion as the identifier for the edge and is used for tracking this geometry for parametric recomputes.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.associativeID

# Set the value of the property.
bRepWireEdgeDefinition_var.associativeID = propertyValue
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
integer propertyValue = bRepWireEdgeDefinition_var->associativeID();

// Set the value of the property, where value_var is an integer.
bool returnValue = bRepWireEdgeDefinition_var->associativeID(value_var);

Property Value

This is a read/write property whose value is an integer.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.classType Method

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepWireEdgeDefinition.classType()
This is a static method.

#include <Fusion/BRep/BRepWireEdgeDefinition.h>

returnValue = adsk::fusion::BRepWireEdgeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.endVertex Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Gets and sets the end vertex of the wire edge definition.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.endVertex

# Set the value of the property.
bRepWireEdgeDefinition_var.endVertex = propertyValue
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
Ptr<BRepVertexDefinition> propertyValue = bRepWireEdgeDefinition_var->endVertex();

// Set the value of the property, where value_var is a BRepVertexDefinition.
bool returnValue = bRepWireEdgeDefinition_var->endVertex(value_var);

Property Value

This is a read/write property whose value is a BRepVertexDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.isValid Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.isValid
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = bRepWireEdgeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.modelSpaceCurve Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Gets and sets the Curve3D object that defines the shape of the edge using 3D geometry in model space. Valid objects are an Arc3D, NurbsCurve3D, Circle3D, Ellipse3D, EllipticalArc3D, or Line3D.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.modelSpaceCurve

# Set the value of the property.
bRepWireEdgeDefinition_var.modelSpaceCurve = propertyValue
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = bRepWireEdgeDefinition_var->modelSpaceCurve();

// Set the value of the property, where value_var is a Curve3D.
bool returnValue = bRepWireEdgeDefinition_var->modelSpaceCurve(value_var);

Property Value

This is a read/write property whose value is a Curve3D.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.objectType Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.objectType
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
string propertyValue = bRepWireEdgeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepWireEdgeDefinition.startVertex Property

Parent Object: BRepWireEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinition.h>

Description

Gets and sets the start vertex of the wire edge definition.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinition_var.startVertex

# Set the value of the property.
bRepWireEdgeDefinition_var.startVertex = propertyValue
"bRepWireEdgeDefinition_var" is a variable referencing a BRepWireEdgeDefinition object.
#include <Fusion/BRep/BRepWireEdgeDefinition.h>

// Get the value of the property.
Ptr<BRepVertexDefinition> propertyValue = bRepWireEdgeDefinition_var->startVertex();

// Set the value of the property, where value_var is a BRepVertexDefinition.
bool returnValue = bRepWireEdgeDefinition_var->startVertex(value_var);

Property Value

This is a read/write property whose value is a BRepVertexDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

A collection of BRepWireEdgeDefinition objects. Using this collection you can create new BRepWireDefinition objects to full define a wire body.

Methods

Name | Description
add | Creates a new BRepWireEdgeDefinition object associated with the parent BRepWireDefinition 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().
item | Function that returns the specified BRepWireEdgeDefinition object using an index into the collection.

Properties

Name | Description
count | The number of B-Rep wire edge definition 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepWireDefinition.wireEdgeDefinitions

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions.add Method

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

Creates a new BRepWireEdgeDefinition object associated with the parent BRepWireDefinition object.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.
returnValue = bRepWireEdgeDefinitions_var.add(startVertex, endVertex, modelSpaceCurve)
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.

#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

returnValue = bRepWireEdgeDefinitions_var->add(startVertex, endVertex, modelSpaceCurve);

Return Value

Type | Description
BRepWireEdgeDefinition | Returns the newly created BRepWireEdgeDefinition object or null in the case of failure.

Parameters

Name | Type | Description
startVertex | BRepVertexDefinition | Vertex definition that defines the start of the edge. For a closed curve, like a circle, you still need to provide a vertex on the curve but should use the same BRepVertexDefinition for both the start and end vertices.
endVertex | BRepVertexDefinition | Vertex definition that defines the end of the edge. For a closed curve, like a circle, this should be the same vertex as used for the start vertex.
modelSpaceCurve | Curve3D | A Curve3D object that defines the shape of the edge using 3D geometry in model space. Valid input is an Arc3D, NurbsCurve3D, Circle3D, Ellipse3D, EllipticalArc3D, or Line3D.

Samples

Name | Description
BRep Body definition Sample | Demonstrates creating BRep bodies by BRepBodyDefinition.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions.classType Method

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepWireEdgeDefinitions.classType()
This is a static method.

#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

returnValue = adsk::fusion::BRepWireEdgeDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions.count Property

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

The number of B-Rep wire edge definition objects in the collection.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinitions_var.count
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.
#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

// Get the value of the property.
uinteger propertyValue = bRepWireEdgeDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions.isValid Property

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinitions_var.isValid
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.
#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

// Get the value of the property.
boolean propertyValue = bRepWireEdgeDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


BRepWireEdgeDefinitions.item Method

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

Function that returns the specified BRepWireEdgeDefinition object using an index into the collection.

Syntax

  • Python
  • C++
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.
returnValue = bRepWireEdgeDefinitions_var.item(index)
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.

#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

returnValue = bRepWireEdgeDefinitions_var->item(index);

Return Value

Type | Description
BRepWireEdgeDefinition | 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 2020


BRepWireEdgeDefinitions.objectType Property

Parent Object: BRepWireEdgeDefinitions
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWireEdgeDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.

# Get the value of the property.
propertyValue = bRepWireEdgeDefinitions_var.objectType
"bRepWireEdgeDefinitions_var" is a variable referencing a BRepWireEdgeDefinitions object.
#include <Fusion/BRep/BRepWireEdgeDefinitions.h>

// Get the value of the property.
string propertyValue = bRepWireEdgeDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


BRepWires Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

Provides access to B-Rep wire bodies.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBody.wires

Version

Introduced in version December 2017


BRepWires.classType Method

Parent Object: BRepWires
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

The number of B-Rep wire bodies in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

Function that returns the specified wire using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepWires.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


BrowserCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Browser command inputs behave as a browser where you can define HTML to be displayed within the area occupied by the command input.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
sendInfoToHTML | Sends a string to the JavaScript associated with the loaded HTML.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
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 identifier for this input in the command's CommandInputs.
isEnabled Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
maximumHeight | Gets and sets the maximum height of the browser within the command dialog, in pixels. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the content displayed within the browser does not fit within the current area, a scroll bar will appear to allow the user to scroll to see the entire browser content. The default value of zero sets no maximum height, so the browser will expand to the maximum extent available.
minimumHeight | Gets and sets the minimum height of the browser within the command dialog in pixels. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the dialog can't fit the browser at the minimum size a scroll bar will appear for the dialog to allow the user to scroll to access all the inputs in the dialog.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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.addBrowserCommandInput, HTMLEventArgs.browserCommandInput, NavigationEventArgs.browserCommandInput

Version

Introduced in version July 2021


BrowserCommandInput.classType Method

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BrowserCommandInput.classType()
This is a static method.

#include <Core/UserInterface/BrowserCommandInput.h>

returnValue = adsk::core::BrowserCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2021


BrowserCommandInput.commandInputs Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.commandInputs
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = browserCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2021


BrowserCommandInput.deleteMe Method

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
returnValue = browserCommandInput_var.deleteMe()
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

#include <Core/UserInterface/BrowserCommandInput.h>

returnValue = browserCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version July 2021


BrowserCommandInput.htmlFileURL Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets and sets the URL to the HTML file currently being displayed. This can be local or on the web.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.htmlFileURL

# Set the value of the property.
browserCommandInput_var.htmlFileURL = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->htmlFileURL();

// Set the value of the property, where value_var is a string.
bool returnValue = browserCommandInput_var->htmlFileURL(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.id Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.id
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.isEnabled Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.isEnabled

# Set the value of the property.
browserCommandInput_var.isEnabled = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
boolean propertyValue = browserCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = browserCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2021


BrowserCommandInput.isFullWidth Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

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.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.isFullWidth

# Set the value of the property.
browserCommandInput_var.isFullWidth = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
boolean propertyValue = browserCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = browserCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2021


BrowserCommandInput.isValid Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.isValid
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
boolean propertyValue = browserCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


BrowserCommandInput.isVisible Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.isVisible

# Set the value of the property.
browserCommandInput_var.isVisible = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
boolean propertyValue = browserCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = browserCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2021


BrowserCommandInput.maximumHeight Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets and sets the maximum height of the browser within the command dialog, in pixels. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the content displayed within the browser does not fit within the current area, a scroll bar will appear to allow the user to scroll to see the entire browser content. The default value of zero sets no maximum height, so the browser will expand to the maximum extent available.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.maximumHeight

# Set the value of the property.
browserCommandInput_var.maximumHeight = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
integer propertyValue = browserCommandInput_var->maximumHeight();

// Set the value of the property, where value_var is an integer.
bool returnValue = browserCommandInput_var->maximumHeight(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version July 2021


BrowserCommandInput.minimumHeight Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets and sets the minimum height of the browser within the command dialog in pixels. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the dialog can't fit the browser at the minimum size a scroll bar will appear for the dialog to allow the user to scroll to access all the inputs in the dialog.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.minimumHeight

# Set the value of the property.
browserCommandInput_var.minimumHeight = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
integer propertyValue = browserCommandInput_var->minimumHeight();

// Set the value of the property, where value_var is an integer.
bool returnValue = browserCommandInput_var->minimumHeight(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version July 2021


BrowserCommandInput.name Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets the user visible name of this input.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.name
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.objectType Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.objectType
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.parentCommand Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets the parent Command.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.parentCommand
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = browserCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2021


BrowserCommandInput.parentCommandInput Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.parentCommandInput
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = browserCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2021


BrowserCommandInput.sendInfoToHTML Method

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

Description

Sends a string to the JavaScript associated with the loaded HTML.

Remarks

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 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.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
returnValue = browserCommandInput_var.sendInfoToHTML(action, data)
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

#include <Core/UserInterface/BrowserCommandInput.h>

returnValue = browserCommandInput_var->sendInfoToHTML(action, data);

Return Value

Type | Description
boolean | This API call is asynchronous and true is returned if the send was successful. Any response from the JavaScript response will be returned through the incomingFromHTML event using the data field of the provided HTMLEvent object where the action property is "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.

Version

Introduced in version July 2021


BrowserCommandInput.toolClipFilename Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

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.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.toolClipFilename

# Set the value of the property.
browserCommandInput_var.toolClipFilename = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = browserCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.tooltip Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

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.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.tooltip

# Set the value of the property.
browserCommandInput_var.tooltip = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = browserCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


BrowserCommandInput.tooltipDescription Property

Parent Object: BrowserCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/BrowserCommandInput.h>

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.

Syntax

  • Python
  • C++
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.

# Get the value of the property.
propertyValue = browserCommandInput_var.tooltipDescription

# Set the value of the property.
browserCommandInput_var.tooltipDescription = propertyValue
"browserCommandInput_var" is a variable referencing a BrowserCommandInput object.
#include <Core/UserInterface/BrowserCommandInput.h>

// Get the value of the property.
string propertyValue = browserCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = browserCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


ButtonControlDefinition Object

Derived from: ControlDefinition Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


ButtonControlDefinition.classType Method

Parent Object: ButtonControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ButtonControlDefinition.isValid Property

Parent Object: ButtonControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

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.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ButtonControlDefinition.name Property

Parent Object: ButtonControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

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.

Version

Introduced in version August 2014


ButtonControlDefinition.objectType Property

Parent Object: ButtonControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonControlDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Provides a command input to get a selection of a single button from a row of buttons.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
listItems | Returns the ListItems object associated with this button row. You use this object to populate and interact with the buttons in the row. When adding items to a ButtonRowCommandInput, icons are required.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: ButtonRowCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
returnValue = buttonRowCommandInput_var.deleteMe()
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

#include <Core/UserInterface/ButtonRowCommandInput.h>

returnValue = buttonRowCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


ButtonRowCommandInput.id Property

Parent Object: ButtonRowCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Returns the ListItems object associated with this button row. You use this object to populate and interact with the buttons in the row. When adding items to a ButtonRowCommandInput, icons are required.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ButtonRowCommandInput.h>

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.

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


C3MFExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Defines that a 3MF export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 3MF 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
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 centimeter. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
printUtility | Specifies which print utility to use when opening the 3MF 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 3MF 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 centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Accessed From

ExportManager.createC3MFExportOptions

Version

Introduced in version September 2021


C3MFExportOptions.aspectRatio Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.aspectRatio

# Set the value of the property.
c3MFExportOptions_var.aspectRatio = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
double propertyValue = c3MFExportOptions_var->aspectRatio();

// Set the value of the property, where value_var is a double.
bool returnValue = c3MFExportOptions_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2021


C3MFExportOptions.availablePrintUtilities Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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 3MF file in.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.availablePrintUtilities
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
std::vector<string> propertyValue = c3MFExportOptions_var->availablePrintUtilities();

Property Value

This is a read only property whose value is an array of type string.

Version

Introduced in version September 2021


C3MFExportOptions.classType Method

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.C3MFExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/C3MFExportOptions.h>

returnValue = adsk::fusion::C3MFExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


C3MFExportOptions.filename Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.filename

# Set the value of the property.
c3MFExportOptions_var.filename = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
string propertyValue = c3MFExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = c3MFExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2021


C3MFExportOptions.geometry Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.geometry

# Set the value of the property.
c3MFExportOptions_var.geometry = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = c3MFExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = c3MFExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2021


C3MFExportOptions.isOneFilePerBody Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.isOneFilePerBody

# Set the value of the property.
c3MFExportOptions_var.isOneFilePerBody = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = c3MFExportOptions_var->isOneFilePerBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = c3MFExportOptions_var->isOneFilePerBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2021


C3MFExportOptions.isValid Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.isValid
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = c3MFExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


C3MFExportOptions.maximumEdgeLength Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Gets and sets the maximum length of any mesh edge. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.maximumEdgeLength

# Set the value of the property.
c3MFExportOptions_var.maximumEdgeLength = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
double propertyValue = c3MFExportOptions_var->maximumEdgeLength();

// Set the value of the property, where value_var is a double.
bool returnValue = c3MFExportOptions_var->maximumEdgeLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2021


C3MFExportOptions.meshRefinement Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.meshRefinement

# Set the value of the property.
c3MFExportOptions_var.meshRefinement = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
MeshRefinementSettings propertyValue = c3MFExportOptions_var->meshRefinement();

// Set the value of the property, where value_var is a MeshRefinementSettings.
bool returnValue = c3MFExportOptions_var->meshRefinement(value_var);

Property Value

This is a read/write property whose value is a MeshRefinementSettings.

Version

Introduced in version September 2021


C3MFExportOptions.normalDeviation Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.normalDeviation

# Set the value of the property.
c3MFExportOptions_var.normalDeviation = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
double propertyValue = c3MFExportOptions_var->normalDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = c3MFExportOptions_var->normalDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2021


C3MFExportOptions.objectType Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.objectType
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
string propertyValue = c3MFExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


C3MFExportOptions.printUtility Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Specifies which print utility to use when opening the 3MF 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.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.printUtility

# Set the value of the property.
c3MFExportOptions_var.printUtility = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
string propertyValue = c3MFExportOptions_var->printUtility();

// Set the value of the property, where value_var is a string.
bool returnValue = c3MFExportOptions_var->printUtility(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2021


C3MFExportOptions.sendToPrintUtility Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Gets and sets whether the created 3MF file will be sent to the print utility specified by the printUtility property. If this is false a filename must be defined.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.sendToPrintUtility

# Set the value of the property.
c3MFExportOptions_var.sendToPrintUtility = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = c3MFExportOptions_var->sendToPrintUtility();

// Set the value of the property, where value_var is a boolean.
bool returnValue = c3MFExportOptions_var->sendToPrintUtility(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2021


C3MFExportOptions.surfaceDeviation Property

Parent Object: C3MFExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/C3MFExportOptions.h>

Description

Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Syntax

  • Python
  • C++
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.

# Get the value of the property.
propertyValue = c3MFExportOptions_var.surfaceDeviation

# Set the value of the property.
c3MFExportOptions_var.surfaceDeviation = propertyValue
"c3MFExportOptions_var" is a variable referencing a C3MFExportOptions object.
#include <Fusion/Fusion/C3MFExportOptions.h>

// Get the value of the property.
double propertyValue = c3MFExportOptions_var->surfaceDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = c3MFExportOptions_var->surfaceDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2021


CadContours2dParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

A parameter value that is a CadContours2dParameterValue. The user needs to set the parameter anew via the API after a model update or after the CurveSelections returned by getCurveSelections() has been edited.

Methods

Name | Description
applyCurveSelections | Set the values of the parameter as a collection of CadCurves. If the input does not define continuous contours, the contour is amended and calculated, but only if used on Operations, not OperationInputs When used with OperationInputs, the contours are calculated when creating an operation out of the 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().
getCurveSelections | Get the values of the parameter as a collection of CadCurves, which might consist of chains, pockets, silhouettes and face countours.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CadContours2dParameterValue.applyCurveSelections Method

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

Set the values of the parameter as a collection of CadCurves. If the input does not define continuous contours, the contour is amended and calculated, but only if used on Operations, not OperationInputs When used with OperationInputs, the contours are calculated when creating an operation out of the input.

Syntax

  • Python
  • C++
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.
returnValue = cadContours2dParameterValue_var.applyCurveSelections(curveSelections)
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.

#include <Cam/Operations/CadContours2dParameterValue.h>

returnValue = cadContours2dParameterValue_var->applyCurveSelections(curveSelections);

Parameters

Name | Type | Description
curveSelections | CurveSelections |

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


CadContours2dParameterValue.classType Method

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CadContours2dParameterValue.classType()
This is a static method.

#include <Cam/Operations/CadContours2dParameterValue.h>

returnValue = adsk::cam::CadContours2dParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CadContours2dParameterValue.getCurveSelections Method

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

Get the values of the parameter as a collection of CadCurves, which might consist of chains, pockets, silhouettes and face countours.

Syntax

  • Python
  • C++
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.
returnValue = cadContours2dParameterValue_var.getCurveSelections()
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.

#include <Cam/Operations/CadContours2dParameterValue.h>

returnValue = cadContours2dParameterValue_var->getCurveSelections();

Return Value

Type | Description
CurveSelections | Returns current CurveSelections of the value.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


CadContours2dParameterValue.isValid Property

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.

# Get the value of the property.
propertyValue = cadContours2dParameterValue_var.isValid
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.
#include <Cam/Operations/CadContours2dParameterValue.h>

// Get the value of the property.
boolean propertyValue = cadContours2dParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CadContours2dParameterValue.objectType Property

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.

# Get the value of the property.
propertyValue = cadContours2dParameterValue_var.objectType
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.
#include <Cam/Operations/CadContours2dParameterValue.h>

// Get the value of the property.
string propertyValue = cadContours2dParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CadContours2dParameterValue.parent Property

Parent Object: CadContours2dParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadContours2dParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.

# Get the value of the property.
propertyValue = cadContours2dParameterValue_var.parent
"cadContours2dParameterValue_var" is a variable referencing a CadContours2dParameterValue object.
#include <Cam/Operations/CadContours2dParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = cadContours2dParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version April 2023


CadMachineAvoidGroupsParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

A parameter value that is a CadMachineAvoidGroupsParameterValue.

Methods

Name | Description
applyMachineAvoidGroups | Set the values of the parameter as a collection of MachineAvoidSelectionGroup. This can throw an exception when the combination of group type and machining mode is not allowed by the current toolpath strategy.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getMachineAvoidGroups | Get the values of the parameter as a collection of objects of type MachineAvoidSelectionGroup

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.applyMachineAvoidGroups Method

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

Set the values of the parameter as a collection of MachineAvoidSelectionGroup. This can throw an exception when the combination of group type and machining mode is not allowed by the current toolpath strategy.

Syntax

  • Python
  • C++
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.
returnValue = cadMachineAvoidGroupsParameterValue_var.applyMachineAvoidGroups(machineAvoidSelectionGroups)
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.

#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

returnValue = cadMachineAvoidGroupsParameterValue_var->applyMachineAvoidGroups(machineAvoidSelectionGroups);

Parameters

Name | Type | Description
machineAvoidSelectionGroups | MachineAvoidGroups |

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.classType Method

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CadMachineAvoidGroupsParameterValue.classType()
This is a static method.

#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

returnValue = adsk::cam::CadMachineAvoidGroupsParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.getMachineAvoidGroups Method

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

Get the values of the parameter as a collection of objects of type MachineAvoidSelectionGroup

Syntax

  • Python
  • C++
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.
returnValue = cadMachineAvoidGroupsParameterValue_var.getMachineAvoidGroups()
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.

#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

returnValue = cadMachineAvoidGroupsParameterValue_var->getMachineAvoidGroups();

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.isValid Property

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.

# Get the value of the property.
propertyValue = cadMachineAvoidGroupsParameterValue_var.isValid
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.
#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

// Get the value of the property.
boolean propertyValue = cadMachineAvoidGroupsParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.objectType Property

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.

# Get the value of the property.
propertyValue = cadMachineAvoidGroupsParameterValue_var.objectType
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.
#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

// Get the value of the property.
string propertyValue = cadMachineAvoidGroupsParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


CadMachineAvoidGroupsParameterValue.parent Property

Parent Object: CadMachineAvoidGroupsParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.

# Get the value of the property.
propertyValue = cadMachineAvoidGroupsParameterValue_var.parent
"cadMachineAvoidGroupsParameterValue_var" is a variable referencing a CadMachineAvoidGroupsParameterValue object.
#include <Cam/Operations/CadMachineAvoidGroupsParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = cadMachineAvoidGroupsParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2024


CadObjectParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

A parameter value that is a collection of cad objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
value | Get or set the value of the parameter. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. An exception is thrown if the matching fails or the given entity does not match the expected type.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version April 2023


CadObjectParameterValue.classType Method

Parent Object: CadObjectParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CadObjectParameterValue.classType()
This is a static method.

#include <Cam/Operations/CadObjectParameterValue.h>

returnValue = adsk::cam::CadObjectParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CadObjectParameterValue.isValid Property

Parent Object: CadObjectParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.

# Get the value of the property.
propertyValue = cadObjectParameterValue_var.isValid
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.
#include <Cam/Operations/CadObjectParameterValue.h>

// Get the value of the property.
boolean propertyValue = cadObjectParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CadObjectParameterValue.objectType Property

Parent Object: CadObjectParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.

# Get the value of the property.
propertyValue = cadObjectParameterValue_var.objectType
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.
#include <Cam/Operations/CadObjectParameterValue.h>

// Get the value of the property.
string propertyValue = cadObjectParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CadObjectParameterValue.parent Property

Parent Object: CadObjectParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.

# Get the value of the property.
propertyValue = cadObjectParameterValue_var.parent
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.
#include <Cam/Operations/CadObjectParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = cadObjectParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version April 2023


CadObjectParameterValue.value Property

Parent Object: CadObjectParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CadObjectParameterValue.h>

Description

Get or set the value of the parameter. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.

# Get the value of the property.
propertyValue = cadObjectParameterValue_var.value

# Set the value of the property.
cadObjectParameterValue_var.value = propertyValue
"cadObjectParameterValue_var" is a variable referencing a CadObjectParameterValue object.
#include <Cam/Operations/CadObjectParameterValue.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = cadObjectParameterValue_var->value();

// Set the value of the property, where value_var is a Base.
bool returnValue = cadObjectParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version April 2023


CAM Object

Derived from: Product Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Object that represents the CAM environment of a Fusion document.

Methods

Name | Description
checkAllToolpaths | Checks if all the operations (includes those nested in sub-folders or patterns) in the document are valid and up to date.
checkToolpath | Checks if the operations (including those nested in sub-folders or patterns) are valid and up to date.
checkValidity | Preview Checks whether the models used by the operations have changed in the mean time and invalidates the affected operations if needed. Should be used for cases where the automatic detection does not work yet, for instance when design changes are expected before a Manufacture API call. Also recommended at the beginning of a script or the beginning of an event handler.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 in the document, including those nested in sub-folders or patterns.
clearToolpath | Clears all the toolpaths for the specified objects, including those nested in sub-folders or patterns.
deleteEntities | Deletes the specified set of entities that are associated with this product.
export3MFForDefaultAdditiveSetup | **RETIRED** This method is only valid for an additive setup and exports the default additive setup's models as 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 flexible 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 or regenerates all the operations in the document, including those nested in sub-folders or patterns.
generateSetupSheet | Generate the setup sheets for the specified objects
generateTemplateXML | Generates a template for the specified Operations, Setups, or Folders and returns the template as an XML string.
generateToolpath | Generates or regenerates all the specified objects, including those nested in sub-folders or patterns.
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. If post processing fails, an error message can be retrieved from the error log explaining the reason for the failure.
postProcessAll | Post all of the toolpaths (includes those nested in sub-folders or patterns) in the document. If post processing fails, an error message can be retrieved from the error log explaining the reason for the failure.

Properties

Name | Description
allMachines | Gets an array containing all the machines in the document.
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.
designRootOccurrence | The CAM product has its own root component which has a single occurrence that references the Design root occurrence. This property returns this occurrence.
documentStockMaterialLibrary | Preview Gets the document StockMaterialLibrary. The StockMaterialLibrary contains all stock materials used by any setup inside the document. Changes to the original StockMaterialLibrary will not affect any setup because the document StockMaterialLibrary is an independent copy. You can only get a valid DocumentStockMaterialLibrary when you have access to Stock Materials private preview feature and enable the feature flag.
documentToolLibrary | Gets the document ToolLibrary. The ToolLibrary contains all tools used by any operation inside the document. Changes to the original ToolLibrary will not affect any operation because the document ToolLibrary is an independent copy.
exportManager | Returns the Export Manager which provides access to the functionality to export in various formats.
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.
manufacturingModels | Returns the collection of manufacturing models in the document.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
ncPrograms | Returns the collection of NC programs in the document.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
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.

Events

Name | Description
setupActivated | The SetupActivated event fires when a setup is activated.
setupActivating | The SetupActivating event fires before a setup is activated.
setupChanged | The SetupChanged event fires when a setup is modified.
setupCreated | The SetupCreated event fires when a new setup is created.
setupDeactivated | The SetupDeactivated event fires when a setup is deactivated.
setupDeactivating | The SetupDeactivating event fires before a setup is deactivated.
setupDestroying | The setupDestroying event fires before a setup is destroyed.

Samples

Name | Description
Generate Setup Sheets API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.allMachines Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets an array containing all the machines in the document.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.allMachines
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
std::vector<Ptr<Machine>> propertyValue = cAM_var->allMachines();

Property Value

This is a read only property whose value is an array of type Machine.

Version

Introduced in version April 2023


CAM.allOperations Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets a collection containing all of the operations in the document. This includes all operations nested in folders and patterns.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.

Version

Introduced in version January 2016


CAM.attributes Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the collection of attributes associated with this product.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Checks if all the operations (includes those nested in sub-folders or patterns) in the document are valid and up to date.

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 operations are valid

Version

Introduced in version January 2016


CAM.checkToolpath Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Checks if the operations (including those nested in sub-folders or patterns) are valid and up to date.

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 operations are valid

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder, or Pattern object. You can also use an ObjectCollection to specify multiple objects of any of the supported types.

Version

Introduced in version January 2016


CAM.checkValidity Method

Parent Object: CAM

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Checks whether the models used by the operations have changed in the mean time and invalidates the affected operations if needed. Should be used for cases where the automatic detection does not work yet, for instance when design changes are expected before a Manufacture API call. Also recommended at the beginning of a script or the beginning of an event handler.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.checkValidity()
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->checkValidity();

Version

Introduced in version July 2023


CAM.classType Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Clears all the toolpaths in the document, including those nested in sub-folders or patterns.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Clears all the toolpaths for the specified objects, including those nested in sub-folders or patterns.

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. You can also use and ObjectCollection to specify multiple objects of any combination of types.

Version

Introduced in version January 2016


CAM.customGraphicsGroups Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the customGraphicsGroups object associated with the CAM product.

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.
Ptr<CustomGraphicsGroups> propertyValue = cAM_var->customGraphicsGroups();

Property Value

This is a read only property whose value is a CustomGraphicsGroups.

Version

Introduced in version May 2020


CAM.deleteEntities Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Deletes the specified set of entities that are associated with this product.

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.designRootOccurrence Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The CAM product has its own root component which has a single occurrence that references the Design root occurrence. This property returns this occurrence.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.designRootOccurrence
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = cAM_var->designRootOccurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version April 2023


CAM.documentStockMaterialLibrary Property

Parent Object: CAM

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets the document StockMaterialLibrary. The StockMaterialLibrary contains all stock materials used by any setup inside the document. Changes to the original StockMaterialLibrary will not affect any setup because the document StockMaterialLibrary is an independent copy. You can only get a valid DocumentStockMaterialLibrary when you have access to Stock Materials private preview feature and enable the feature flag.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.documentStockMaterialLibrary
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<DocumentStockMaterialLibrary> propertyValue = cAM_var->documentStockMaterialLibrary();

Property Value

This is a read only property whose value is a DocumentStockMaterialLibrary.

Version

Introduced in version September 2024


CAM.documentToolLibrary Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets the document ToolLibrary. The ToolLibrary contains all tools used by any operation inside the document. Changes to the original ToolLibrary will not affect any operation because the document ToolLibrary is an independent copy.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.documentToolLibrary
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<DocumentToolLibrary> propertyValue = cAM_var->documentToolLibrary();

Property Value

This is a read only property whose value is a DocumentToolLibrary.

Version

Introduced in version April 2023


CAM.export3MFForDefaultAdditiveSetup Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

This function is retired. See more information in the 'Remarks' section below.

This method is only valid for an additive setup and exports the default additive setup's models as a 3MF file. The 3MF also contains machine and support information.

Remarks

This property has been retired. Please use the ExportManager to export setups.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
# Uses no optional arguments.
returnValue = cAM_var.export3MFForDefaultAdditiveSetup(filepath)

# Uses optional arguments.
returnValue = cAM_var.export3MFForDefaultAdditiveSetup(filepath, addSimulationInfo, simPostProcess, simSplitSurrogates, simKeepThickeningStructure)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

// Uses no optional arguments.
returnValue = cAM_var->export3MFForDefaultAdditiveSetup(filepath);

// Uses optional arguments.
returnValue = cAM_var->export3MFForDefaultAdditiveSetup(filepath, addSimulationInfo, simPostProcess, simSplitSurrogates, simKeepThickeningStructure);

Return Value

Type | Description
boolean | True on success, false on errors or wrong setup type

Parameters

Name | Type | Description
filepath | string |
addSimulationInfo | boolean | This is an optional argument whose default value is False.
simPostProcess | boolean | This is an optional argument whose default value is False.
simSplitSurrogates | boolean | This is an optional argument whose default value is False.
simKeepThickeningStructure | boolean | This is an optional argument whose default value is False.

Version

Introduced in version May 2020
Retired in version July 2023


CAM.exportManager Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the Export Manager which provides access to the functionality to export in various formats.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.exportManager
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<CAMExportManager> propertyValue = cAM_var->exportManager();

Property Value

This is a read only property whose value is a CAMExportManager.

Version

Introduced in version November 2021


CAM.findAttributes Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

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 flexible 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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Generates all of the setup sheets for all of the operations in the document

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


CAM.generateAllToolpaths Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Generates or regenerates all the operations in the document, including those nested in sub-folders or patterns.

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 operation generation.

Parameters

Name | Type | Description
skipValid | boolean | Option to skip valid operations and only regenerate invalid operations.

Samples

Name | Description
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.

Version

Introduced in version January 2016


CAM.generateSetupSheet Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Generate the setup sheets for the specified objects

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. You can also use an ObjectCollection to specify multiple objects of any of the supported 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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


CAM.generateTemplateXML Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Generates a template for the specified Operations, Setups, or Folders and returns the template as an XML string.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.generateTemplateXML(operations)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->generateTemplateXML(operations);

Return Value

Type | Description
string | Returns the template XML as a string.

Parameters

Name | Type | Description
operations | Base | An Operation, Setup or Folder object from which to generate the template. You can also specify a collection of any combination of these object types.

Version

Introduced in version April 2023


CAM.generateToolpath Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Generates or regenerates all the specified objects, including those nested in sub-folders or patterns.

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 the operation generation.

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder, or Pattern object. You can also use an ObjectCollection to specify multiple objects of any of the supported types.

Samples

Name | Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


CAM.genericPostFolder Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets the installed post folder.

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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.getMachiningTime Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Get the machining time for the specified objects.

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. You can also use an ObjectCollection to specify multiple objects of any of the supported 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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.manufacturingModels Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the collection of manufacturing models in the document.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.manufacturingModels
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<ManufacturingModels> propertyValue = cAM_var->manufacturingModels();

Property Value

This is a read only property whose value is a ManufacturingModels.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


CAM.namedViews Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.namedViews
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = cAM_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version September 2023


CAM.ncPrograms Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the collection of NC programs in the document.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.ncPrograms
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<NCPrograms> propertyValue = cAM_var->ncPrograms();

Property Value

This is a read only property whose value is a NCPrograms.

Version

Introduced in version April 2023


CAM.objectType Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the parent Document object.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets the personal post folder.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Post all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects. If post processing fails, an error message can be retrieved from the error log explaining the reason for the failure.

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. You can also use an ObjectCollection to specify multiple objects of any of the supported types.
input | PostProcessInput | The PostProcessInput object that defines the post options and parameters.

Samples

Name | Description
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.postProcessAll Method

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Post all of the toolpaths (includes those nested in sub-folders or patterns) in the document. If post processing fails, an error message can be retrieved from the error log explaining the reason for the failure.

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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.productType Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

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.

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.selectionSets Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.selectionSets
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = cAM_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version May 2022


CAM.setupActivated Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupActivated event fires when a setup is activated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupActivated" is the event handler function.
futil.add_handler(cAM_var.setupActivated, cAM_setupActivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupActivated event.
def cAM_setupActivated(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupActivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupActivatedHandler" is the name of the class that handles the event.
onSetupActivated = MySetupActivatedHandler()
cAM_var.setupActivated.add(onSetupActivated)
handlers.append(onSetupActivated)

-------- Event handler class definition ---------
# Event handler for the setupActivated event.
class MySetupActivatedHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupActivatedHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupActivated event.
class MySetupActivatedEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupActivatedEventHandler event handler.");
    }
} _setupActivated;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupActivatedEvent = cAM_var->setupActivated();
if (!setupActivatedEvent)
    return;

bool isOk = setupActivatedEvent->add(&_setupActivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setupActivating Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupActivating event fires before a setup is activated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupActivating" is the event handler function.
futil.add_handler(cAM_var.setupActivating, cAM_setupActivating, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupActivating event.
def cAM_setupActivating(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupActivating event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupActivatingHandler" is the name of the class that handles the event.
onSetupActivating = MySetupActivatingHandler()
cAM_var.setupActivating.add(onSetupActivating)
handlers.append(onSetupActivating)

-------- Event handler class definition ---------
# Event handler for the setupActivating event.
class MySetupActivatingHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupActivatingHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupActivating event.
class MySetupActivatingEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupActivatingEventHandler event handler.");
    }
} _setupActivating;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupActivatingEvent = cAM_var->setupActivating();
if (!setupActivatingEvent)
    return;

bool isOk = setupActivatingEvent->add(&_setupActivating);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setupChanged Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupChanged event fires when a setup is modified.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupChanged" is the event handler function.
futil.add_handler(cAM_var.setupChanged, cAM_setupChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupChanged event.
def cAM_setupChanged(args: adsk.cam.SetupChangeEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupChanged event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupChangedHandler" is the name of the class that handles the event.
onSetupChanged = MySetupChangedHandler()
cAM_var.setupChanged.add(onSetupChanged)
handlers.append(onSetupChanged)

-------- Event handler class definition ---------
# Event handler for the setupChanged event.
class MySetupChangedHandler(adsk.cam.SetupChangeEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupChangeEventArgs):
        # Code to react to the event.
        app.log('In MySetupChangedHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupChangeEvent.h>
#include <Cam/CAM/SetupChangeEventHandler.h>
#include <Cam/CAM/SetupChangeEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupChanged event.
class MySetupChangedEventHandler : public adsk::cam::SetupChangeEventHandler
{
public:
    void notify(const Ptr<SetupChangeEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupChangedEventHandler event handler.");
    }
} _setupChanged;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupChangeEvent> setupChangedEvent = cAM_var->setupChanged();
if (!setupChangedEvent)
    return;

bool isOk = setupChangedEvent->add(&_setupChanged);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupChangeEvent.

Version

Introduced in version April 2023


CAM.setupCreated Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupCreated event fires when a new setup is created.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupCreated" is the event handler function.
futil.add_handler(cAM_var.setupCreated, cAM_setupCreated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupCreated event.
def cAM_setupCreated(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupCreated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupCreatedHandler" is the name of the class that handles the event.
onSetupCreated = MySetupCreatedHandler()
cAM_var.setupCreated.add(onSetupCreated)
handlers.append(onSetupCreated)

-------- Event handler class definition ---------
# Event handler for the setupCreated event.
class MySetupCreatedHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupCreatedHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupCreated event.
class MySetupCreatedEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupCreatedEventHandler event handler.");
    }
} _setupCreated;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupCreatedEvent = cAM_var->setupCreated();
if (!setupCreatedEvent)
    return;

bool isOk = setupCreatedEvent->add(&_setupCreated);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setupDeactivated Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupDeactivated event fires when a setup is deactivated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupDeactivated" is the event handler function.
futil.add_handler(cAM_var.setupDeactivated, cAM_setupDeactivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupDeactivated event.
def cAM_setupDeactivated(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupDeactivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupDeactivatedHandler" is the name of the class that handles the event.
onSetupDeactivated = MySetupDeactivatedHandler()
cAM_var.setupDeactivated.add(onSetupDeactivated)
handlers.append(onSetupDeactivated)

-------- Event handler class definition ---------
# Event handler for the setupDeactivated event.
class MySetupDeactivatedHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupDeactivatedHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupDeactivated event.
class MySetupDeactivatedEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupDeactivatedEventHandler event handler.");
    }
} _setupDeactivated;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupDeactivatedEvent = cAM_var->setupDeactivated();
if (!setupDeactivatedEvent)
    return;

bool isOk = setupDeactivatedEvent->add(&_setupDeactivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setupDeactivating Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The SetupDeactivating event fires before a setup is deactivated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupDeactivating" is the event handler function.
futil.add_handler(cAM_var.setupDeactivating, cAM_setupDeactivating, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupDeactivating event.
def cAM_setupDeactivating(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupDeactivating event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupDeactivatingHandler" is the name of the class that handles the event.
onSetupDeactivating = MySetupDeactivatingHandler()
cAM_var.setupDeactivating.add(onSetupDeactivating)
handlers.append(onSetupDeactivating)

-------- Event handler class definition ---------
# Event handler for the setupDeactivating event.
class MySetupDeactivatingHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupDeactivatingHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupDeactivating event.
class MySetupDeactivatingEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupDeactivatingEventHandler event handler.");
    }
} _setupDeactivating;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupDeactivatingEvent = cAM_var->setupDeactivating();
if (!setupDeactivatingEvent)
    return;

bool isOk = setupDeactivatingEvent->add(&_setupDeactivating);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setupDestroying Event

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

The setupDestroying event fires before a setup is destroyed.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "cAM_setupDestroying" is the event handler function.
futil.add_handler(cAM_var.setupDestroying, cAM_setupDestroying, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the setupDestroying event.
def cAM_setupDestroying(args: adsk.cam.SetupEventArgs):
    # Code to react to the event.
    app.log('In cAM_setupDestroying event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "cAM_var" is a variable referencing a CAM object.
# "MySetupDestroyingHandler" is the name of the class that handles the event.
onSetupDestroying = MySetupDestroyingHandler()
cAM_var.setupDestroying.add(onSetupDestroying)
handlers.append(onSetupDestroying)

-------- Event handler class definition ---------
# Event handler for the setupDestroying event.
class MySetupDestroyingHandler(adsk.cam.SetupEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.cam.SetupEventArgs):
        # Code to react to the event.
        app.log('In MySetupDestroyingHandler event handler.')
--------- Required include files. ---------
#include <Cam/CAM/CAM.h>
#include <Cam/CAM/SetupEvent.h>
#include <Cam/CAM/SetupEventHandler.h>
#include <Cam/CAM/SetupEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the setupDestroying event.
class MySetupDestroyingEventHandler : public adsk::cam::SetupEventHandler
{
public:
    void notify(const Ptr<SetupEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MySetupDestroyingEventHandler event handler.");
    }
} _setupDestroying;

--------- Connect the handler to the event. ---------
// "cAM_var" is a variable referencing a CAM object.
// Connect the handler function to the event.
Ptr<SetupEvent> setupDestroyingEvent = cAM_var->setupDestroying();
if (!setupDestroyingEvent)
    return;

bool isOk = setupDestroyingEvent->add(&_setupDestroying);
if (!isOk)
    return;

Property Value

This is an event property that returns a SetupEvent.

Version

Introduced in version April 2023


CAM.setups Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the Setups collection that provides access to existing setups.

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
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Generate Setup Sheets API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.temporaryFolder Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Gets the folder for temporary files.

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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.unitsManager Property

Parent Object: CAM
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the UnitsManager object associated with this product.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM.h>

Description

Returns the workspaces associated with this product.

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


CAM3MFExportMetadataOptions Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Class providing read and write access to meta data of a 3MF file.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
copyright | Copyright of the 3MF File
creationDate | Creation date of the 3MF File
description | Description of the 3MF File
designer | Designer of the 3MF File
enabled | Enable or disable the integration of Metadata in the 3mf. This is true by default.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
licenseTerms | License terms of the 3MF File
modificationDate | Modification date of the 3MF File
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
title | Title of the 3MF File

Accessed From

CAM3MFExportOptions.metadata

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.classType Method

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAM3MFExportMetadataOptions.classType()
This is a static method.

#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

returnValue = adsk::cam::CAM3MFExportMetadataOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.copyright Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Copyright of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.copyright

# Set the value of the property.
cAM3MFExportMetadataOptions_var.copyright = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->copyright();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->copyright(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.creationDate Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Creation date of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.creationDate

# Set the value of the property.
cAM3MFExportMetadataOptions_var.creationDate = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->creationDate();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->creationDate(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.description Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Description of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.description

# Set the value of the property.
cAM3MFExportMetadataOptions_var.description = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.designer Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Designer of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.designer

# Set the value of the property.
cAM3MFExportMetadataOptions_var.designer = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->designer();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->designer(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.enabled Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Enable or disable the integration of Metadata in the 3mf. This is true by default.

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.enabled

# Set the value of the property.
cAM3MFExportMetadataOptions_var.enabled = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportMetadataOptions_var->enabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportMetadataOptions_var->enabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.isValid Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.isValid
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportMetadataOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.licenseTerms Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

License terms of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.licenseTerms

# Set the value of the property.
cAM3MFExportMetadataOptions_var.licenseTerms = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->licenseTerms();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->licenseTerms(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.modificationDate Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Modification date of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.modificationDate

# Set the value of the property.
cAM3MFExportMetadataOptions_var.modificationDate = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->modificationDate();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->modificationDate(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.objectType Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.objectType
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportMetadataOptions.title Property

Parent Object: CAM3MFExportMetadataOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportMetadataOptions.h>

Description

Title of the 3MF File

Syntax

  • Python
  • C++
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportMetadataOptions_var.title

# Set the value of the property.
cAM3MFExportMetadataOptions_var.title = propertyValue
"cAM3MFExportMetadataOptions_var" is a variable referencing a CAM3MFExportMetadataOptions object.
#include <Cam/CAM/CAM3MFExportMetadataOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportMetadataOptions_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportMetadataOptions_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportOptions Object

Derived from: CAMExportOptions Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

3MF export option. Available with all additive machines except Formlabs. Expects a setup as its export object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
areSimulationSurrogatesSplit | Flag toggling if surrogate supports used in the simulation should be split. This option might not be available for all machine types. The default value is false.
areSimulationThickeningStructuresKept | Flag toggling if thickening structures used for simulation should be kept. This option might not be available for all machine types. The default value is false.
areSupportsIncluded | **RETIRED** Flag toggling if support information should be included in the exported file. Includes both support structures marked as open or closed support as well as meta data used in Netfabb. This option might not be available for all machine types. The default value is false.
error | Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.
exportObject | The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.
fullFilename | The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.
isMachineInformationIncluded | Flag toggling if machine information should be included in the exported file. The machine information is only compatible with Netfabb. This option might not be available for all machine types. The default value is false.
isProcessSimulationDataIncluded | Flag toggling if simulation information should be included in the exported file. This option might not be available for all machine types. The default value is false.
isSimulationPostProcessingIncluded | Flag toggling if post processing of the simulation should be included. This option might not be available for all machine types. The default value is false.
isThumbnailSupported | Preview Method to check if the exporter implementation supports thumbnail
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVolumetricDataIncluded | Preview Flag toggling if volumetric data should be included in the exported file. The flag is only evaluated if the user has bought the product design extension. The default value is false.
metadata | Preview Class for setting the meta data options with in the 3mf export
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
supportInclusion | Preview Flag setting if support information should be included in the exported file. Includes both support structures marked as open or closed support as well as meta data used in Netfabb. This option might not be available for all machine types. The default value is NotIncluded.
thumbnailPath | Preview Path to the thumbnail for the buildfile
volumetricDataResolution | Preview Integer value representing the resolution of the volumetric data. The value is only evaluated if the user has bought the product design extension. The default value is 128.

Accessed From

CAMExportManager.create3MFOptions

Version

Introduced in version November 2021


CAM3MFExportOptions.areSimulationSurrogatesSplit Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if surrogate supports used in the simulation should be split. This option might not be available for all machine types. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.areSimulationSurrogatesSplit

# Set the value of the property.
cAM3MFExportOptions_var.areSimulationSurrogatesSplit = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->areSimulationSurrogatesSplit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->areSimulationSurrogatesSplit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.areSimulationThickeningStructuresKept Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if thickening structures used for simulation should be kept. This option might not be available for all machine types. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.areSimulationThickeningStructuresKept

# Set the value of the property.
cAM3MFExportOptions_var.areSimulationThickeningStructuresKept = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->areSimulationThickeningStructuresKept();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->areSimulationThickeningStructuresKept(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.areSupportsIncluded Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Flag toggling if support information should be included in the exported file. Includes both support structures marked as open or closed support as well as meta data used in Netfabb. This option might not be available for all machine types. The default value is false.

Remarks

This property has been retired. Please use supportInclusion for setting how to include support.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.areSupportsIncluded

# Set the value of the property.
cAM3MFExportOptions_var.areSupportsIncluded = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->areSupportsIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->areSupportsIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021
Retired in version January 2024


CAM3MFExportOptions.classType Method

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAM3MFExportOptions.classType()
This is a static method.

#include <Cam/CAM/CAM3MFExportOptions.h>

returnValue = adsk::cam::CAM3MFExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2021


CAM3MFExportOptions.error Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.error
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportOptions_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


CAM3MFExportOptions.exportObject Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.exportObject

# Set the value of the property.
cAM3MFExportOptions_var.exportObject = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAM3MFExportOptions_var->exportObject();

// Set the value of the property, where value_var is a Base.
bool returnValue = cAM3MFExportOptions_var->exportObject(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2021


CAM3MFExportOptions.fullFilename Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.fullFilename

# Set the value of the property.
cAM3MFExportOptions_var.fullFilename = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportOptions_var->fullFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportOptions_var->fullFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2021


CAM3MFExportOptions.isMachineInformationIncluded Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if machine information should be included in the exported file. The machine information is only compatible with Netfabb. This option might not be available for all machine types. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isMachineInformationIncluded

# Set the value of the property.
cAM3MFExportOptions_var.isMachineInformationIncluded = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isMachineInformationIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->isMachineInformationIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.isProcessSimulationDataIncluded Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if simulation information should be included in the exported file. This option might not be available for all machine types. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isProcessSimulationDataIncluded

# Set the value of the property.
cAM3MFExportOptions_var.isProcessSimulationDataIncluded = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isProcessSimulationDataIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->isProcessSimulationDataIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.isSimulationPostProcessingIncluded Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if post processing of the simulation should be included. This option might not be available for all machine types. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isSimulationPostProcessingIncluded

# Set the value of the property.
cAM3MFExportOptions_var.isSimulationPostProcessingIncluded = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isSimulationPostProcessingIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->isSimulationPostProcessingIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.isThumbnailSupported Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Method to check if the exporter implementation supports thumbnail

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isThumbnailSupported
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isThumbnailSupported();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CAM3MFExportOptions.isValid Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isValid
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2021


CAM3MFExportOptions.isVolumetricDataIncluded Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag toggling if volumetric data should be included in the exported file. The flag is only evaluated if the user has bought the product design extension. The default value is false.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.isVolumetricDataIncluded

# Set the value of the property.
cAM3MFExportOptions_var.isVolumetricDataIncluded = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAM3MFExportOptions_var->isVolumetricDataIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAM3MFExportOptions_var->isVolumetricDataIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


CAM3MFExportOptions.metadata Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Class for setting the meta data options with in the 3mf export

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.metadata
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
Ptr<CAM3MFExportMetadataOptions> propertyValue = cAM3MFExportOptions_var->metadata();

Property Value

This is a read only property whose value is a CAM3MFExportMetadataOptions.

Version

Introduced in version May 2023


CAM3MFExportOptions.objectType Property

Parent Object: CAM3MFExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.objectType
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2021


CAM3MFExportOptions.supportInclusion Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Flag setting if support information should be included in the exported file. Includes both support structures marked as open or closed support as well as meta data used in Netfabb. This option might not be available for all machine types. The default value is NotIncluded.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.supportInclusion

# Set the value of the property.
cAM3MFExportOptions_var.supportInclusion = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
CAM3MFSupportInclusionType propertyValue = cAM3MFExportOptions_var->supportInclusion();

// Set the value of the property, where value_var is a CAM3MFSupportInclusionType.
bool returnValue = cAM3MFExportOptions_var->supportInclusion(value_var);

Property Value

This is a read/write property whose value is a CAM3MFSupportInclusionType.

Version

Introduced in version January 2024


CAM3MFExportOptions.thumbnailPath Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Path to the thumbnail for the buildfile

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.thumbnailPath

# Set the value of the property.
cAM3MFExportOptions_var.thumbnailPath = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
string propertyValue = cAM3MFExportOptions_var->thumbnailPath();

// Set the value of the property, where value_var is a string.
bool returnValue = cAM3MFExportOptions_var->thumbnailPath(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAM3MFExportOptions.volumetricDataResolution Property

Parent Object: CAM3MFExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAM3MFExportOptions.h>

Description

Integer value representing the resolution of the volumetric data. The value is only evaluated if the user has bought the product design extension. The default value is 128.

Syntax

  • Python
  • C++
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.

# Get the value of the property.
propertyValue = cAM3MFExportOptions_var.volumetricDataResolution

# Set the value of the property.
cAM3MFExportOptions_var.volumetricDataResolution = propertyValue
"cAM3MFExportOptions_var" is a variable referencing a CAM3MFExportOptions object.
#include <Cam/CAM/CAM3MFExportOptions.h>

// Get the value of the property.
integer propertyValue = cAM3MFExportOptions_var->volumetricDataResolution();

// Set the value of the property, where value_var is an integer.
bool returnValue = cAM3MFExportOptions_var->volumetricDataResolution(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version January 2025


CAMAdditiveBuildExportFilter Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

Export filter used by CAMAdditiveMachineBuildFileExportOptions.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
extension | The extension of the file format, including a leading "."
id | The id of the file format.
isMultiFileExport | True if the export outputs multiple files. If so, fullFilename should point to a directory, not a 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 | The name of the file format. Might indicate whether a file format is binary or not.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMAdditiveBuildExportOptions.exportFilters

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.classType Method

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMAdditiveBuildExportFilter.classType()
This is a static method.

#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

returnValue = adsk::cam::CAMAdditiveBuildExportFilter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.extension Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

The extension of the file format, including a leading "."

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.extension
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportFilter_var->extension();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.id Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

The id of the file format.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.id
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportFilter_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.isMultiFileExport Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

True if the export outputs multiple files. If so, fullFilename should point to a directory, not a file.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.isMultiFileExport
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveBuildExportFilter_var->isMultiFileExport();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.isValid Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.isValid
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveBuildExportFilter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.name Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

The name of the file format. Might indicate whether a file format is binary or not.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.name
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportFilter_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportFilter.objectType Property

Parent Object: CAMAdditiveBuildExportFilter
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportFilter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportFilter_var.objectType
"cAMAdditiveBuildExportFilter_var" is a variable referencing a CAMAdditiveBuildExportFilter object.
#include <Cam/CAM/CAMAdditiveBuildExportFilter.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportFilter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions Object

Derived from: CAMExportOptions Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Additive buildfile export option. Available with all additive machines except for FFF and DED based machines. Currently picks the first export filter from the print setting's export filter list.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.
exportFilters | Gets a list of available export filters from the setup's print setting. The export object must be set before using this function.
exportObject | The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.
fullFilename | The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.
isThumbnailSupported | Preview Method to check if the exporter implementation supports thumbnail
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
selectedExportFilterId | Gets and sets the export filter to be used for the export. By default, this is the first entry in the print setting's filter list.
thumbnailPath | Preview Path to the thumbnail for the buildfile

Accessed From

CAMExportManager.createCAMAdditiveBuildExportOptions

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.classType Method

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMAdditiveBuildExportOptions.classType()
This is a static method.

#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

returnValue = adsk::cam::CAMAdditiveBuildExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.error Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.error
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportOptions_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.exportFilters Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Gets a list of available export filters from the setup's print setting. The export object must be set before using this function.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.exportFilters
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
std::vector<Ptr<CAMAdditiveBuildExportFilter>> propertyValue = cAMAdditiveBuildExportOptions_var->exportFilters();

Property Value

This is a read only property whose value is an array of type CAMAdditiveBuildExportFilter.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.exportObject Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.exportObject

# Set the value of the property.
cAMAdditiveBuildExportOptions_var.exportObject = propertyValue
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMAdditiveBuildExportOptions_var->exportObject();

// Set the value of the property, where value_var is a Base.
bool returnValue = cAMAdditiveBuildExportOptions_var->exportObject(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.fullFilename Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.fullFilename

# Set the value of the property.
cAMAdditiveBuildExportOptions_var.fullFilename = propertyValue
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportOptions_var->fullFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMAdditiveBuildExportOptions_var->fullFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.isThumbnailSupported Property

Parent Object: CAMAdditiveBuildExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Method to check if the exporter implementation supports thumbnail

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.isThumbnailSupported
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveBuildExportOptions_var->isThumbnailSupported();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.isValid Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.isValid
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveBuildExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.objectType Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.objectType
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.selectedExportFilterId Property

Parent Object: CAMAdditiveBuildExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Gets and sets the export filter to be used for the export. By default, this is the first entry in the print setting's filter list.

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.selectedExportFilterId

# Set the value of the property.
cAMAdditiveBuildExportOptions_var.selectedExportFilterId = propertyValue
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportOptions_var->selectedExportFilterId();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMAdditiveBuildExportOptions_var->selectedExportFilterId(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveBuildExportOptions.thumbnailPath Property

Parent Object: CAMAdditiveBuildExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveBuildExportOptions.h>

Description

Path to the thumbnail for the buildfile

Syntax

  • Python
  • C++
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.

# Get the value of the property.
propertyValue = cAMAdditiveBuildExportOptions_var.thumbnailPath

# Set the value of the property.
cAMAdditiveBuildExportOptions_var.thumbnailPath = propertyValue
"cAMAdditiveBuildExportOptions_var" is a variable referencing a CAMAdditiveBuildExportOptions object.
#include <Cam/CAM/CAMAdditiveBuildExportOptions.h>

// Get the value of the property.
string propertyValue = cAMAdditiveBuildExportOptions_var->thumbnailPath();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMAdditiveBuildExportOptions_var->thumbnailPath(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


CAMAdditiveContainer Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Object that represents an additive container in an existing Setup. Note: All additive containers cannot be duplicated and depending on the type, some cannot be deleted.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this container. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this object.
error | Returns a message corresponding to any active error associated with the value of this parameter.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
parameters | Gets the CAMParameters collection for this operation.
parent | Returns the parent Setup.
parentSetup | Gets the Setup this operation belongs to.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

Setup.additiveContainerByType

Version

Introduced in version July 2024


CAMAdditiveContainer.allOperations Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets a collection containing all of the operations in this container. This includes all operations nested in folders and patterns.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.allOperations
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = cAMAdditiveContainer_var->allOperations();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version July 2024


CAMAdditiveContainer.attributes Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.attributes
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cAMAdditiveContainer_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2024


CAMAdditiveContainer.classType Method

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMAdditiveContainer.classType()
This is a static method.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = adsk::cam::CAMAdditiveContainer::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2024


CAMAdditiveContainer.copyAfter Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.copyAfter(operation)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version July 2024


CAMAdditiveContainer.copyBefore Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.copyBefore(operation)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version July 2024


CAMAdditiveContainer.copyInto Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.copyInto(container)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version July 2024


CAMAdditiveContainer.deleteMe Method

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.deleteMe()
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version July 2024


CAMAdditiveContainer.duplicate Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.duplicate()
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version July 2024


CAMAdditiveContainer.error Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.error
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2024


CAMAdditiveContainer.generatedDataCollection Property

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.generatedDataCollection
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = cAMAdditiveContainer_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2024


CAMAdditiveContainer.hasError Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.hasError
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.hasWarning Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.hasWarning
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isLightBulbOn Property

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isLightBulbOn

# Set the value of the property.
cAMAdditiveContainer_var.isLightBulbOn = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMAdditiveContainer_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isOptional Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isOptional

# Set the value of the property.
cAMAdditiveContainer_var.isOptional = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMAdditiveContainer_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isProtected Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isProtected

# Set the value of the property.
cAMAdditiveContainer_var.isProtected = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMAdditiveContainer_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isSelected Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets if this operation is selected in the 'Setups' browser.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isSelected
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isSuppressed Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isSuppressed

# Set the value of the property.
cAMAdditiveContainer_var.isSuppressed = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMAdditiveContainer_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isValid Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isValid
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.isVisible Property

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.isVisible
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
boolean propertyValue = cAMAdditiveContainer_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2024


CAMAdditiveContainer.modifyUtility Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.modifyUtility(utility)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version July 2024


CAMAdditiveContainer.moveAfter Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.moveAfter(operation)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version July 2024


CAMAdditiveContainer.moveBefore Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.moveBefore(operation)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version July 2024


CAMAdditiveContainer.moveInto Method

Parent Object: CAMAdditiveContainer

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
returnValue = cAMAdditiveContainer_var.moveInto(container)
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

#include <Cam/CAM/CAMAdditiveContainer.h>

returnValue = cAMAdditiveContainer_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version July 2024


CAMAdditiveContainer.name Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

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.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.name

# Set the value of the property.
cAMAdditiveContainer_var.name = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMAdditiveContainer_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2024


CAMAdditiveContainer.notes Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets and sets the notes of the operation.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.notes

# Set the value of the property.
cAMAdditiveContainer_var.notes = propertyValue
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMAdditiveContainer_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2024


CAMAdditiveContainer.objectType Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.objectType
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2024


CAMAdditiveContainer.operationId Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

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.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.operationId
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
integer propertyValue = cAMAdditiveContainer_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version July 2024


CAMAdditiveContainer.parameters Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.parameters
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = cAMAdditiveContainer_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version July 2024


CAMAdditiveContainer.parent Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Returns the parent Setup.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.parent
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMAdditiveContainer_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2024


CAMAdditiveContainer.parentSetup Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets the Setup this operation belongs to.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.parentSetup
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
Ptr<Setup> propertyValue = cAMAdditiveContainer_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version July 2024


CAMAdditiveContainer.strategy Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.strategy
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2024


CAMAdditiveContainer.warning Property

Parent Object: CAMAdditiveContainer
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMAdditiveContainer.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.

# Get the value of the property.
propertyValue = cAMAdditiveContainer_var.warning
"cAMAdditiveContainer_var" is a variable referencing a CAMAdditiveContainer object.
#include <Cam/CAM/CAMAdditiveContainer.h>

// Get the value of the property.
string propertyValue = cAMAdditiveContainer_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2024


CAMArrangeParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

A parameter value that is a CAMArrangeParameterValue. The user needs to set the parameter anew via the API after a model update or after the ArrangeSelections returned by getArrangeSelections() have been edited.

Methods

Name | Description
applyArrangeSelections | Set the values of the parameter as a collection of CadObjects.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getArrangeSelections | Get the values of the parameter as a collection of CadObjects, which currently consist of occurrences.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.

Version

Introduced in version March 2024


CAMArrangeParameterValue.applyArrangeSelections Method

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

Set the values of the parameter as a collection of CadObjects.

Syntax

  • Python
  • C++
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.
returnValue = cAMArrangeParameterValue_var.applyArrangeSelections(arrangeSelections)
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.

#include <Cam/Operations/CAMArrangeParameterValue.h>

returnValue = cAMArrangeParameterValue_var->applyArrangeSelections(arrangeSelections);

Parameters

Name | Type | Description
arrangeSelections | ArrangeSelections |

Version

Introduced in version March 2024


CAMArrangeParameterValue.classType Method

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMArrangeParameterValue.classType()
This is a static method.

#include <Cam/Operations/CAMArrangeParameterValue.h>

returnValue = adsk::cam::CAMArrangeParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


CAMArrangeParameterValue.getArrangeSelections Method

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

Get the values of the parameter as a collection of CadObjects, which currently consist of occurrences.

Syntax

  • Python
  • C++
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.
returnValue = cAMArrangeParameterValue_var.getArrangeSelections()
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.

#include <Cam/Operations/CAMArrangeParameterValue.h>

returnValue = cAMArrangeParameterValue_var->getArrangeSelections();

Return Value

Type | Description
ArrangeSelections | Returns current ArrangeSelections of the value.

Version

Introduced in version March 2024


CAMArrangeParameterValue.isValid Property

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.

# Get the value of the property.
propertyValue = cAMArrangeParameterValue_var.isValid
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.
#include <Cam/Operations/CAMArrangeParameterValue.h>

// Get the value of the property.
boolean propertyValue = cAMArrangeParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


CAMArrangeParameterValue.objectType Property

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.

# Get the value of the property.
propertyValue = cAMArrangeParameterValue_var.objectType
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.
#include <Cam/Operations/CAMArrangeParameterValue.h>

// Get the value of the property.
string propertyValue = cAMArrangeParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


CAMArrangeParameterValue.parent Property

Parent Object: CAMArrangeParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMArrangeParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.

# Get the value of the property.
propertyValue = cAMArrangeParameterValue_var.parent
"cAMArrangeParameterValue_var" is a variable referencing a CAMArrangeParameterValue object.
#include <Cam/Operations/CAMArrangeParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMArrangeParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2024


Camera Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

The Camera class represents the information that specifies how a model is displayed within a viewport. It's analogous to a real camera, which has a position in space, is pointed towards a specific point, is oriented in a particular way, and has a specific type of lens.

Whether a camera is created statically using the Camera.create() method or obtained from a Viewport, a Camera object is always temporary and not associated with anything. This means when you get it from a Viewport, the Camera object captures the current state of the Viewport and stores it but doesn't save where it came from, so it is completely independent.

To update the camera settings associated with a Viewport, get a Camera object from a Viewport or create a new Camera using Camera.create(), modify the Camera object to define the view you want, and assign it to the Viewport.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Camera object that is independent of any viewport. This can be used to construct a camera to be used as input to modify a viewport, and create or update a named view.
getExtents | Gets the extents of the camera. This is only used for orthographic cameras. The extents of a perspective camera is defined by a combination of the position of the eye point (how close the eye is to the model) and the perspective angle.
setExtents | Sets the extents of the camera. This is only used for orthographic cameras. The extents of a perspective camera is defined by a combination of the position of the eye point (how close the eye is to the model) and the perspective angle. When the camera is assigned to a viewport, typically only the width or the height is used depending on the aspect ratio of the viewport. For example, if the width and height are both 10, but the viewport is twice as wide as it is tall (2:1 aspect ratio). The height extent will be 10 and the width extent will be recomputed to be 20 to match the viewport.

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 or creating a camera using Camera.create(), this property defaults to false.
isSmoothTransition This property controls if Fusion will perform a smooth transition animation from the current camera position to the new position. If this property is set to true, it will smoothly transition. If false, the camera will jump to the position defined by the camera without any animated transition.

When a camera is obtained from a Viewport or created using the Camera.create() method, this property defaults to 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | **RETIRED** 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 the camera values except the camera type. The orientation is based on the current orientation defined by the ViewCube. This means, that the view orientations cannot be expected to be consistent from one view to another.

Accessed From

Camera.create, NamedView.camera, 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 API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Camera.cameraType Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Gets and sets the current camera type.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.create Method

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Creates a new Camera object that is independent of any viewport. This can be used to construct a camera to be used as input to modify a viewport, and create or update a named view.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Camera.create()
This is a static method.

#include <Core/Application/Camera.h>

returnValue = adsk::core::Camera::create();

Return Value

Type | Description
Camera | Returns the created camera.

Version

Introduced in version September 2023


Camera.eye Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Gets and sets the position of the eye in world space.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Camera.getExtents Method

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Gets the extents of the camera. This is only used for orthographic cameras. The extents of a perspective camera is defined by a combination of the position of the eye point (how close the eye is to the model) and the perspective angle.

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

(returnValue, width, height) = camera_var.getExtents()

#include <Core/Application/Camera.h

// Declare the output arguments.
double width;
double height;
boolean returnValue = camera_var->getExtents(width, height);

Return Value

Type | Description
boolean | Returns true if successful. This will fail in the case it is used for a perspective camera.

Parameters

Name | Type | Description
width | double | The width of the extent in centimeters.
height | double | The height of the extent in centimeters.

Version

Introduced in version October 2023


Camera.isFitView Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

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 or creating a camera using Camera.create(), this property defaults to false.

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 API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Camera.isSmoothTransition Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

This property controls if Fusion will perform a smooth transition animation from the current camera position to the new position. If this property is set to true, it will smoothly transition. If false, the camera will jump to the position defined by the camera without any animated transition.

When a camera is obtained from a Viewport or created using the Camera.create() method, this property defaults to false.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Gets and sets the perspective angle of the camera. This property is only valid when the CameraType property is either Perspective or PerspectiveWithOrthoFaces.

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.setExtents Method

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Sets the extents of the camera. This is only used for orthographic cameras. The extents of a perspective camera is defined by a combination of the position of the eye point (how close the eye is to the model) and the perspective angle.

When the camera is assigned to a viewport, typically only the width or the height is used depending on the aspect ratio of the viewport. For example, if the width and height are both 10, but the viewport is twice as wide as it is tall (2:1 aspect ratio). The height extent will be 10 and the width extent will be recomputed to be 20 to match the viewport.

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.
returnValue = camera_var.setExtents(width, height)
"camera_var" is a variable referencing a Camera object.

#include <Core/Application/Camera.h>

returnValue = camera_var->setExtents(width, height);

Return Value

Type | Description
boolean | Returns true if successful. This will fail in the case it is used for a perspective camera.

Parameters

Name | Type | Description
width | double | The width of the extent in centimeters.
height | double | The height of the extent in centimeters.

Version

Introduced in version October 2023


Camera.target Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Gets and sets the camera target point in world space.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Camera.upVector Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

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.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Camera.viewExtents Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This property has been replaced by the getExtents and setExtents methods.

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
Retired in version October 2023


Camera.viewOrientation Property

Parent Object: Camera
Defined in namespace "adsk::core" and the header file is <Core/Application/Camera.h>

Description

Sets the camera to a standard orientation. If this is set, it will result in resetting all the camera values except the camera type. The orientation is based on the current orientation defined by the ViewCube. This means, that the view orientations cannot be expected to be consistent from one view to another.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

Add a handler to be notified when the event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
viewport | Returns the viewport that the modified camera is associated with.

Version

Introduced in version December 2017


CameraEventArgs.classType Method

Parent Object: CameraEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventArgs.h>

Description

Returns the viewport that the modified camera is associated with.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventHandler.h>

Description

The CameraEventHandler is a client implemented class that can be added as a handler to an CameraEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version December 2017


CameraEventHandler.notify Method

Parent Object: CameraEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/CameraEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"cameraEventHandler_var" is a variable referencing a CameraEventHandler object.
returnValue = cameraEventHandler_var.notify(eventArgs)
"cameraEventHandler_var" is a variable referencing a CameraEventHandler object.

#include <Core/Application/CameraEventHandler.h>

returnValue = 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


CAMExportFuture Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Used to check the state and get back the results of an operation generation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Gets the last encountered error message generated on the export thread.
exportOptions | Returns the export option used to define the export associated with this future object.
isGenerationCompleted | Returns true if the export has finished generating.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
progress | Returns the progress as a percentage value between 0.0% and 100.0%.
warning | Gets the last encountered warning message generated on the export thread.

Accessed From

CAMExportManager.executeWithExportFuture

Version

Introduced in version September 2024


CAMExportFuture.classType Method

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMExportFuture.classType()
This is a static method.

#include <Cam/CAM/CAMExportFuture.h>

returnValue = adsk::cam::CAMExportFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


CAMExportFuture.error Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Gets the last encountered error message generated on the export thread.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.error
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
string propertyValue = cAMExportFuture_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


CAMExportFuture.exportOptions Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Returns the export option used to define the export associated with this future object.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.exportOptions
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
Ptr<CAMExportOptions> propertyValue = cAMExportFuture_var->exportOptions();

Property Value

This is a read only property whose value is a CAMExportOptions.

Version

Introduced in version September 2024


CAMExportFuture.isGenerationCompleted Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Returns true if the export has finished generating.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.isGenerationCompleted
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
boolean propertyValue = cAMExportFuture_var->isGenerationCompleted();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


CAMExportFuture.isValid Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.isValid
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
boolean propertyValue = cAMExportFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


CAMExportFuture.objectType Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.objectType
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
string propertyValue = cAMExportFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


CAMExportFuture.progress Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Returns the progress as a percentage value between 0.0% and 100.0%.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.progress
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
float propertyValue = cAMExportFuture_var->progress();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version September 2024


CAMExportFuture.warning Property

Parent Object: CAMExportFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportFuture.h>

Description

Gets the last encountered warning message generated on the export thread.

Syntax

  • Python
  • C++
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.

# Get the value of the property.
propertyValue = cAMExportFuture_var.warning
"cAMExportFuture_var" is a variable referencing a CAMExportFuture object.
#include <Cam/CAM/CAMExportFuture.h>

// Get the value of the property.
string propertyValue = cAMExportFuture_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


CAMExportManager Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Export manager used to export the setup's models in one of the formats defined the ExportOptions objects. The export is currently restricted to additive setups only and the availability of the export option and its settings depends on the chosen machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create3MFOptions | Creates a new 3MF export option.
createCAMAdditiveBuildExportOptions | Preview Creates a new export option based on the print setting's export formats. FFF and DED machines are not supported, their export files are generated using posts.
execute | Executes an export based on the export options.
executeWithExportFuture | Preview Executes an export based on the export options

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.exportManager

Version

Introduced in version November 2021


CAMExportManager.classType Method

Parent Object: CAMExportManager
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMExportManager.classType()
This is a static method.

#include <Cam/CAM/CAMExportManager.h>

returnValue = adsk::cam::CAMExportManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2021


CAMExportManager.create3MFOptions Method

Parent Object: CAMExportManager
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Creates a new 3MF export option.

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
returnValue = cAMExportManager_var.create3MFOptions()
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

#include <Cam/CAM/CAMExportManager.h>

returnValue = cAMExportManager_var->create3MFOptions();

Return Value

Type | Description
CAM3MFExportOptions | Returns new CAM3MFExportOptions.

Version

Introduced in version November 2021


CAMExportManager.createCAMAdditiveBuildExportOptions Method

Parent Object: CAMExportManager

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Creates a new export option based on the print setting's export formats. FFF and DED machines are not supported, their export files are generated using posts.

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
returnValue = cAMExportManager_var.createCAMAdditiveBuildExportOptions()
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

#include <Cam/CAM/CAMExportManager.h>

returnValue = cAMExportManager_var->createCAMAdditiveBuildExportOptions();

Return Value

Type | Description
CAMAdditiveBuildExportOptions | Returns new CAMAdditiveBuildExportOptions.

Version

Introduced in version October 2023


CAMExportManager.execute Method

Parent Object: CAMExportManager
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Executes an export based on the export options.

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
returnValue = cAMExportManager_var.execute(exportOptions)
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

#include <Cam/CAM/CAMExportManager.h>

returnValue = cAMExportManager_var->execute(exportOptions);

Return Value

Type | Description
boolean | Returns true if the export finished successfully.

Parameters

Name | Type | Description
exportOptions | CAMExportOptions | The export options defining the export type and necessary meta data.

Version

Introduced in version November 2021


CAMExportManager.executeWithExportFuture Method

Parent Object: CAMExportManager

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Executes an export based on the export options

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
returnValue = cAMExportManager_var.executeWithExportFuture(exportOptions)
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

#include <Cam/CAM/CAMExportManager.h>

returnValue = cAMExportManager_var->executeWithExportFuture(exportOptions);

Return Value

Type | Description
CAMExportFuture | Returns a CAMExportFuture object if the export has started successfully.

Parameters

Name | Type | Description
exportOptions | CAMExportOptions | The export options defining the export type and necessary meta data.

Version

Introduced in version September 2024


CAMExportManager.isValid Property

Parent Object: CAMExportManager
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

# Get the value of the property.
propertyValue = cAMExportManager_var.isValid
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
#include <Cam/CAM/CAMExportManager.h>

// Get the value of the property.
boolean propertyValue = cAMExportManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2021


CAMExportManager.objectType Property

Parent Object: CAMExportManager
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMExportManager_var" is a variable referencing a CAMExportManager object.

# Get the value of the property.
propertyValue = cAMExportManager_var.objectType
"cAMExportManager_var" is a variable referencing a CAMExportManager object.
#include <Cam/CAM/CAMExportManager.h>

// Get the value of the property.
string propertyValue = cAMExportManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2021


CAMExportOptions Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Parent class for all ExportOptions objects giving access to the setup and file name used for the export.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.
exportObject | The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.
fullFilename | The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.
isThumbnailSupported | Preview Method to check if the exporter implementation supports thumbnail
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
thumbnailPath | Preview Path to the thumbnail for the buildfile

Accessed From

CAMExportFuture.exportOptions

Derived Classes

CAM3MFExportOptions, CAMAdditiveBuildExportOptions

Version

Introduced in version November 2021


CAMExportOptions.classType Method

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMExportOptions.classType()
This is a static method.

#include <Cam/CAM/CAMExportOptions.h>

returnValue = adsk::cam::CAMExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2021


CAMExportOptions.error Property

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Gets the last encountered error message. When the CAMExportManager's executeWithExportFuture() method is used, this method only returns errors encoutered when setting up the export. Errors thrown afterwards can be retrieved via the CAMExportFuture object. When the CAMExportManager's execute() method is used, any error can be retrieved using this property.

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.error
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
string propertyValue = cAMExportOptions_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


CAMExportOptions.exportObject Property

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

The export object we want to export. Depending on the actual export option, this might be geometry, an operation or a setup.

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.exportObject

# Set the value of the property.
cAMExportOptions_var.exportObject = propertyValue
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMExportOptions_var->exportObject();

// Set the value of the property, where value_var is a Base.
bool returnValue = cAMExportOptions_var->exportObject(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2021


CAMExportOptions.fullFilename Property

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

The file we want to export to. Needs to contain a valid path, as no intermediate folders are created.

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.fullFilename

# Set the value of the property.
cAMExportOptions_var.fullFilename = propertyValue
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
string propertyValue = cAMExportOptions_var->fullFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMExportOptions_var->fullFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2021


CAMExportOptions.isThumbnailSupported Property

Parent Object: CAMExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Method to check if the exporter implementation supports thumbnail

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.isThumbnailSupported
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAMExportOptions_var->isThumbnailSupported();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CAMExportOptions.isValid Property

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.isValid
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
boolean propertyValue = cAMExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2021


CAMExportOptions.objectType Property

Parent Object: CAMExportOptions
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.objectType
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
string propertyValue = cAMExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2021


CAMExportOptions.thumbnailPath Property

Parent Object: CAMExportOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMExportOptions.h>

Description

Path to the thumbnail for the buildfile

Syntax

  • Python
  • C++
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.

# Get the value of the property.
propertyValue = cAMExportOptions_var.thumbnailPath

# Set the value of the property.
cAMExportOptions_var.thumbnailPath = propertyValue
"cAMExportOptions_var" is a variable referencing a CAMExportOptions object.
#include <Cam/CAM/CAMExportOptions.h>

// Get the value of the property.
string propertyValue = cAMExportOptions_var->thumbnailPath();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMExportOptions_var->thumbnailPath(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CAMFolder Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Object that represents a folder in an existing Setup, Folder or Pattern.

Methods

Name | Description
activate | Sets this object as the default container.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
createFromCAMTemplate | **RETIRED** Creates and adds operations, folders or patterns from the specified CAMTemplate to the end of this folder.
createFromCAMTemplate2 | Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.
createFromTemplate | **RETIRED** Creates and adds operations, folders or patterns from the specified template file to the end of this folder.
createFromTemplateXML | **RETIRED** Creates and adds operations, folders or patterns from the specified template content XML to the end of this folder.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this object.
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.
error | Returns a message corresponding to any active error associated with the value of this parameter.
folders | Returns the Folders collection that provides access to existing folders in this folder.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isActive | Gets if this folder is active.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

CAMFolders.addFolder, CAMFolders.item, CAMFolders.itemByName, CAMFolders.itemByOperationId

Derived Classes

CAMPattern

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


CAMFolder.activate Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Sets this object as the default container.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.activate()
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version April 2023


CAMFolder.allOperations Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.

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.attributes Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.attributes
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cAMFolder_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2021


CAMFolder.children Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copyAfter Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.copyAfter(operation)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


CAMFolder.copyBefore Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.copyBefore(operation)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


CAMFolder.copyInto Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.copyInto(container)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


CAMFolder.createFromCAMTemplate Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified CAMTemplate to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.createFromCAMTemplate(camTemplate)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->createFromCAMTemplate(camTemplate);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
camTemplate | CAMTemplate | The CAMTemplate object to apply

Version

Introduced in version April 2023
Retired in version July 2024


CAMFolder.createFromCAMTemplate2 Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.createFromCAMTemplate2(input)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->createFromCAMTemplate2(input);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
input | CreateFromCAMTemplateInput | Input object that contains the template to create from and the generation mode.

Version

Introduced in version October 2023


CAMFolder.createFromTemplate Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified template file to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.createFromTemplate(templateFilePath)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_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 September 2020
Retired in version July 2024


CAMFolder.createFromTemplateXML Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified template content XML to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.createFromTemplateXML(templateXML)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->createFromTemplateXML(templateXML);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
templateXML | string | The full XML content of the template.

Version

Introduced in version April 2023
Retired in version July 2024


CAMFolder.deleteMe Method

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.deleteMe()
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


CAMFolder.duplicate Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.duplicate()
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


CAMFolder.error Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.error
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMFolder.folders Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns the Folders collection that provides access to existing folders in this folder.

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.generatedDataCollection Property

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.generatedDataCollection
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = cAMFolder_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


CAMFolder.hasError Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.hasError
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMFolder.hasWarning Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.hasWarning
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMFolder.isActive Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if this folder is active.

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.isLightBulbOn Property

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isLightBulbOn

# Set the value of the property.
cAMFolder_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMFolder_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


CAMFolder.isOptional Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if this operation is selected in the 'Setups' browser.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isVisible
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CAMFolder.modifyUtility Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.modifyUtility(utility)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


CAMFolder.moveAfter Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.moveAfter(operation)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


CAMFolder.moveBefore Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.moveBefore(operation)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


CAMFolder.moveInto Method

Parent Object: CAMFolder

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.
returnValue = cAMFolder_var.moveInto(container)
"cAMFolder_var" is a variable referencing a CAMFolder object.

#include <Cam/CAM/CAMFolder.h>

returnValue = cAMFolder_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


CAMFolder.name Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets and sets the notes of the operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns the Operations collection that provides access to existing individual operations in this folder.

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.parameters Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.parameters
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = cAMFolder_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version September 2020


CAMFolder.parent Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns the parent Setup, Folder or Pattern for this Folder.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets the Setup this operation belongs to.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns the Patterns collection that provides access to existing patterns in this folder.

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


CAMFolder.strategy Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.strategy
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


CAMFolder.warning Property

Parent Object: CAMFolder
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolder.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.warning
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMFolders Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Collection that provides access to the folders within an existing setup, folder or pattern.

Methods

Name | Description
addFolder | Preview Creates a folder with the specified name and returns it as CAMFolder 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().
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMFolder.folders, CAMHoleRecognition.folders, CAMPattern.folders, Setup.folders

Version

Introduced in version January 2016


CAMFolders.addFolder Method

Parent Object: CAMFolders

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Creates a folder with the specified name and returns it as CAMFolder object.

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.
returnValue = cAMFolders_var.addFolder(name)
"cAMFolders_var" is a variable referencing a CAMFolders object.

#include <Cam/CAM/CAMFolders.h>

returnValue = cAMFolders_var->addFolder(name);

Return Value

Type | Description
CAMFolder | Returns the newly created folder or null if folder can't be created.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the folder.

Version

Introduced in version January 2024


CAMFolders.classType Method

Parent Object: CAMFolders
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

The number of items in the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Function that returns the specified folder using an index into the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Returns the folder with the specified name (as appears in the browser).

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

Returns the folder with the specified operation id.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMFolders.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


CAMHoleRecognition Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Object that represents a hole recognition object in an existing Setup, Folder or Pattern.

Methods

Name | Description
activate | Set this object as the default container.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
allOperations | Returns an array containing all of the operations in this hole recognition. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this object.
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.
error | Returns a message corresponding to any active error associated with the value of this parameter.
folders | Returns the Folders collection that provides access to existing folders in this hole recognition.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isActive | Gets if this hole recognition is active.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 hole recognition.
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.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Version

Introduced in version April 2023


CAMHoleRecognition.activate Method

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Set this object as the default container.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.activate()
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version May 2023


CAMHoleRecognition.allOperations Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns an array containing all of the operations in this hole recognition. This includes all operations nested in folders and patterns.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.allOperations
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
std::vector<Ptr<OperationBase>> propertyValue = cAMHoleRecognition_var->allOperations();

Property Value

This is a read only property whose value is an array of type OperationBase.

Version

Introduced in version April 2023


CAMHoleRecognition.attributes Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.attributes
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cAMHoleRecognition_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version April 2023


CAMHoleRecognition.children Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

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.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.children
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<ChildOperationList> propertyValue = cAMHoleRecognition_var->children();

Property Value

This is a read only property whose value is a ChildOperationList.

Version

Introduced in version April 2023


CAMHoleRecognition.classType Method

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMHoleRecognition.classType()
This is a static method.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = adsk::cam::CAMHoleRecognition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMHoleRecognition.copyAfter Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.copyAfter(operation)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


CAMHoleRecognition.copyBefore Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.copyBefore(operation)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


CAMHoleRecognition.copyInto Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.copyInto(container)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


CAMHoleRecognition.deleteMe Method

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.deleteMe()
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


CAMHoleRecognition.duplicate Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.duplicate()
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


CAMHoleRecognition.error Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.error
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMHoleRecognition.folders Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns the Folders collection that provides access to existing folders in this hole recognition.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.folders
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<CAMFolders> propertyValue = cAMHoleRecognition_var->folders();

Property Value

This is a read only property whose value is a CAMFolders.

Version

Introduced in version April 2023


CAMHoleRecognition.generatedDataCollection Property

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.generatedDataCollection
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = cAMHoleRecognition_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


CAMHoleRecognition.hasError Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.hasError
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.hasWarning Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.hasWarning
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isActive Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if this hole recognition is active.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isActive
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isLightBulbOn Property

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isLightBulbOn

# Set the value of the property.
cAMHoleRecognition_var.isLightBulbOn = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMHoleRecognition_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


CAMHoleRecognition.isOptional Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isOptional

# Set the value of the property.
cAMHoleRecognition_var.isOptional = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMHoleRecognition_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isProtected Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isProtected

# Set the value of the property.
cAMHoleRecognition_var.isProtected = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMHoleRecognition_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isSelected Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if this operation is selected in the 'Setups' browser.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isSelected
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isSuppressed Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isSuppressed

# Set the value of the property.
cAMHoleRecognition_var.isSuppressed = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMHoleRecognition_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isValid Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isValid
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMHoleRecognition.isVisible Property

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.isVisible
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
boolean propertyValue = cAMHoleRecognition_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CAMHoleRecognition.modifyUtility Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.modifyUtility(utility)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


CAMHoleRecognition.moveAfter Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.moveAfter(operation)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


CAMHoleRecognition.moveBefore Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.moveBefore(operation)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


CAMHoleRecognition.moveInto Method

Parent Object: CAMHoleRecognition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
returnValue = cAMHoleRecognition_var.moveInto(container)
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

#include <Cam/CAM/CAMHoleRecognition.h>

returnValue = cAMHoleRecognition_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


CAMHoleRecognition.name Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

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.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.name

# Set the value of the property.
cAMHoleRecognition_var.name = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMHoleRecognition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


CAMHoleRecognition.notes Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets and sets the notes of the operation.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.notes

# Set the value of the property.
cAMHoleRecognition_var.notes = propertyValue
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMHoleRecognition_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


CAMHoleRecognition.objectType Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.objectType
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMHoleRecognition.operationId Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

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.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.operationId
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
integer propertyValue = cAMHoleRecognition_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version April 2023


CAMHoleRecognition.operations Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns the Operations collection that provides access to existing individual operations in this hole recognition.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.operations
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<Operations> propertyValue = cAMHoleRecognition_var->operations();

Property Value

This is a read only property whose value is an Operations.

Version

Introduced in version April 2023


CAMHoleRecognition.parameters Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.parameters
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = cAMHoleRecognition_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version April 2023


CAMHoleRecognition.parent Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns the parent Setup, Folder or Pattern for this Folder.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.parent
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMHoleRecognition_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version April 2023


CAMHoleRecognition.parentSetup Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets the Setup this operation belongs to.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.parentSetup
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
Ptr<Setup> propertyValue = cAMHoleRecognition_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version April 2023


CAMHoleRecognition.strategy Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.strategy
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMHoleRecognition.warning Property

Parent Object: CAMHoleRecognition
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMHoleRecognition.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.

# Get the value of the property.
propertyValue = cAMHoleRecognition_var.warning
"cAMHoleRecognition_var" is a variable referencing a CAMHoleRecognition object.
#include <Cam/CAM/CAMHoleRecognition.h>

// Get the value of the property.
string propertyValue = cAMHoleRecognition_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMLibrary Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

The CAMLibrary is the base-class for all other asset-specific libraries.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

CAMTemplateLibrary, MachineLibrary, PostLibrary, PrintSettingLibrary, StockMaterialLibrary, ToolLibraries

Version

Introduced in version April 2023


CAMLibrary.assetTypeName Property

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

# Get the value of the property.
propertyValue = cAMLibrary_var.assetTypeName
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
#include <Cam/Global/CAMLibrary.h>

// Get the value of the property.
string propertyValue = cAMLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMLibrary.childAssetURLs Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.childAssetURLs(url)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


CAMLibrary.childFolderURLs Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.childFolderURLs(url)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


CAMLibrary.classType Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMLibrary.classType()
This is a static method.

#include <Cam/Global/CAMLibrary.h>

returnValue = adsk::cam::CAMLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMLibrary.createFolder Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.createFolder(parentUrl, folderName)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


CAMLibrary.deleteAsset Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.deleteAsset(url)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


CAMLibrary.deleteFolder Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.deleteFolder(url)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


CAMLibrary.displayName Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.displayName(url)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


CAMLibrary.isValid Property

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

# Get the value of the property.
propertyValue = cAMLibrary_var.isValid
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
#include <Cam/Global/CAMLibrary.h>

// Get the value of the property.
boolean propertyValue = cAMLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMLibrary.objectType Property

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

# Get the value of the property.
propertyValue = cAMLibrary_var.objectType
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
#include <Cam/Global/CAMLibrary.h>

// Get the value of the property.
string propertyValue = cAMLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMLibrary.urlByLocation Method

Parent Object: CAMLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"cAMLibrary_var" is a variable referencing a CAMLibrary object.
returnValue = cAMLibrary_var.urlByLocation(location)
"cAMLibrary_var" is a variable referencing a CAMLibrary object.

#include <Cam/Global/CAMLibrary.h>

returnValue = cAMLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Version

Introduced in version April 2023


CAMLibraryManager Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

CAMLibraryManager provides access to properties related to various libraries in the Fusion Manufacture workspace, such as the post library and machine library.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
fusion360MachineFolder | **RETIRED** Gets the absolute path to the folder containing Fusion machines. Fusion machines appear in the machine library under the Fusion tab.
fusion360PostFolder | **RETIRED** Gets the absolute path to the folder containing Fusion posts. Fusion posts appear in the post library under the Fusion tab.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
localMachineFolder | **RETIRED** Gets the absolute path to the folder containing local machines. Local Machines appear in machine library under the local tab.
localPostFolder | **RETIRED** Gets the absolute path to the folder containing local posts. Local posts appear in post library under the local tab.
machineLibrary | The MachineLibrary provides access to machines.
networkMachineFolder | Gets the absolute path to the folder containing network machines. Network machines appear in the machine library under the network tab.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
postLibrary | The PostLibrary provides access to postConfigurations.
printSettingLibrary | The PrintSettingLibrary provides access to print settings.
stockMaterialLibrary | Preview The StockMaterialLibrary provides access to stock materials. You can only get a valid StockMaterialLibrary when you have access to Stock Materials private preview feature and enable the feature flag.
templateLibrary | The CAMTemplateLibrary provides access to templates
toolLibraries | The ToolLibraries provides access to tools.

Accessed From

CAMManager.libraryManager

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMLibraryManager.classType Method

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMLibraryManager.classType()
This is a static method.

#include <Cam/Global/CAMLibraryManager.h>

returnValue = adsk::cam::CAMLibraryManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMLibraryManager.fusion360MachineFolder Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets the absolute path to the folder containing Fusion machines. Fusion machines appear in the machine library under the Fusion tab.

Remarks

This property has been retired. Please use the machine library to access machines instead.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.fusion360MachineFolder
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->fusion360MachineFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023
Retired in version January 2024


CAMLibraryManager.fusion360PostFolder Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets the absolute path to the folder containing Fusion posts. Fusion posts appear in the post library under the Fusion tab.

Remarks

This property has been retired. Please use the post library to access posts instead.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.fusion360PostFolder
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->fusion360PostFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023
Retired in version January 2024


CAMLibraryManager.isValid Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.isValid
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
boolean propertyValue = cAMLibraryManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMLibraryManager.localMachineFolder Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets the absolute path to the folder containing local machines. Local Machines appear in machine library under the local tab.

Remarks

This property has been retired. Please use the machine library to access machines instead.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.localMachineFolder
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->localMachineFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023
Retired in version March 2023


CAMLibraryManager.localPostFolder Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets the absolute path to the folder containing local posts. Local posts appear in post library under the local tab.

Remarks

This property has been retired. Please use the post library to access posts instead.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.localPostFolder
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->localPostFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023
Retired in version March 2023


CAMLibraryManager.machineLibrary Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The MachineLibrary provides access to machines.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.machineLibrary
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<MachineLibrary> propertyValue = cAMLibraryManager_var->machineLibrary();

Property Value

This is a read only property whose value is a MachineLibrary.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


CAMLibraryManager.networkMachineFolder Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

Gets the absolute path to the folder containing network machines. Network machines appear in the machine library under the network tab.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.networkMachineFolder
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->networkMachineFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMLibraryManager.objectType Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.objectType
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
string propertyValue = cAMLibraryManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMLibraryManager.postLibrary Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The PostLibrary provides access to postConfigurations.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.postLibrary
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<PostLibrary> propertyValue = cAMLibraryManager_var->postLibrary();

Property Value

This is a read only property whose value is a PostLibrary.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMLibraryManager.printSettingLibrary Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The PrintSettingLibrary provides access to print settings.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.printSettingLibrary
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<PrintSettingLibrary> propertyValue = cAMLibraryManager_var->printSettingLibrary();

Property Value

This is a read only property whose value is a PrintSettingLibrary.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


CAMLibraryManager.stockMaterialLibrary Property

Parent Object: CAMLibraryManager

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The StockMaterialLibrary provides access to stock materials. You can only get a valid StockMaterialLibrary when you have access to Stock Materials private preview feature and enable the feature flag.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.stockMaterialLibrary
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<StockMaterialLibrary> propertyValue = cAMLibraryManager_var->stockMaterialLibrary();

Property Value

This is a read only property whose value is a StockMaterialLibrary.

Version

Introduced in version September 2024


CAMLibraryManager.templateLibrary Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The CAMTemplateLibrary provides access to templates

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.templateLibrary
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<CAMTemplateLibrary> propertyValue = cAMLibraryManager_var->templateLibrary();

Property Value

This is a read only property whose value is a CAMTemplateLibrary.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


CAMLibraryManager.toolLibraries Property

Parent Object: CAMLibraryManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMLibraryManager.h>

Description

The ToolLibraries provides access to tools.

Syntax

  • Python
  • C++
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.

# Get the value of the property.
propertyValue = cAMLibraryManager_var.toolLibraries
"cAMLibraryManager_var" is a variable referencing a CAMLibraryManager object.
#include <Cam/Global/CAMLibraryManager.h>

// Get the value of the property.
Ptr<ToolLibraries> propertyValue = cAMLibraryManager_var->toolLibraries();

Property Value

This is a read only property whose value is a ToolLibraries.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMManager Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

This singleton object provides access to application-level events and properties that relate to the CAM (Manufacture) workspace in Fusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
get | Access to the root CAMManager 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.
libraryManager | CAMLibraryManager provides access to properties related to various libraries in the Fusion Manufacture workspace, such as the post library and machine library.
networkMachineIntegrationManager | Gets the NetworkMachineIntegrationManager needed to integrate add-ins into the 'Find network machines' dialog.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
postEnginePath | Gets the absolute path to the post engine (post.exe) installed with Fusion.

Accessed From

CAMManager.get

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMManager.classType Method

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMManager.classType()
This is a static method.

#include <Cam/Global/CAMManager.h>

returnValue = adsk::cam::CAMManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMManager.get Method

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

Access to the root CAMManager object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMManager.get()
This is a static method.

#include <Cam/Global/CAMManager.h>

returnValue = adsk::cam::CAMManager::get();

Return Value

Type | Description
CAMManager | Return the root CAMManager object or null if it failed.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMManager.isValid Property

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMManager_var" is a variable referencing a CAMManager object.

# Get the value of the property.
propertyValue = cAMManager_var.isValid
"cAMManager_var" is a variable referencing a CAMManager object.
#include <Cam/Global/CAMManager.h>

// Get the value of the property.
boolean propertyValue = cAMManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMManager.libraryManager Property

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

CAMLibraryManager provides access to properties related to various libraries in the Fusion Manufacture workspace, such as the post library and machine library.

Syntax

  • Python
  • C++
"cAMManager_var" is a variable referencing a CAMManager object.

# Get the value of the property.
propertyValue = cAMManager_var.libraryManager
"cAMManager_var" is a variable referencing a CAMManager object.
#include <Cam/Global/CAMManager.h>

// Get the value of the property.
Ptr<CAMLibraryManager> propertyValue = cAMManager_var->libraryManager();

Property Value

This is a read only property whose value is a CAMLibraryManager.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CAMManager.networkMachineIntegrationManager Property

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

Gets the NetworkMachineIntegrationManager needed to integrate add-ins into the 'Find network machines' dialog.

Syntax

  • Python
  • C++
"cAMManager_var" is a variable referencing a CAMManager object.

# Get the value of the property.
propertyValue = cAMManager_var.networkMachineIntegrationManager
"cAMManager_var" is a variable referencing a CAMManager object.
#include <Cam/Global/CAMManager.h>

// Get the value of the property.
NetworkMachineIntegrationManager propertyValue = cAMManager_var->networkMachineIntegrationManager();

Property Value

This is a read only property whose value is a NetworkMachineIntegrationManager.

Version

Introduced in version April 2023


CAMManager.objectType Property

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMManager_var" is a variable referencing a CAMManager object.

# Get the value of the property.
propertyValue = cAMManager_var.objectType
"cAMManager_var" is a variable referencing a CAMManager object.
#include <Cam/Global/CAMManager.h>

// Get the value of the property.
string propertyValue = cAMManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMManager.postEnginePath Property

Parent Object: CAMManager
Defined in namespace "adsk::cam" and the header file is <Cam/Global/CAMManager.h>

Description

Gets the absolute path to the post engine (post.exe) installed with Fusion.

Syntax

  • Python
  • C++
"cAMManager_var" is a variable referencing a CAMManager object.

# Get the value of the property.
propertyValue = cAMManager_var.postEnginePath
"cAMManager_var" is a variable referencing a CAMManager object.
#include <Cam/Global/CAMManager.h>

// Get the value of the property.
string propertyValue = cAMManager_var->postEnginePath();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMParameter Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Base class for representing parameter of an operation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Returns a message corresponding to any active error associated with the value of this parameter.
expression | Gets and sets the value expression of the parameter.
isDeprecated | Gets if this parameter is deprecated. Some parameters are deprecated when their usage becomes obsolete. Reading deprecated parameters is allowed, but setting deprecated parameters will throw an error.
isEditable | Returns whether or not the parameter's expression or value can be modified.
isEnabled | Gets if this parameter is enabled. Some parameters are enabled/disabled depending on the values set for other parameters.
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 (internal name) of the parameter.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
title | Returns the title of this parameter as seen in the user interface. This title is localized and can change based on the current language
value | Returns an object that allows you to get and set the value associated with the parameter.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

CAMParameters.item, CAMParameters.itemByName

Samples

Name | Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version September 2020


CAMParameter.classType Method

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMParameter.classType()
This is a static method.

#include <Cam/Operations/CAMParameter.h>

returnValue = adsk::cam::CAMParameter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


CAMParameter.error Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.error
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMParameter.expression Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Gets and sets the value expression of the parameter.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.expression

# Set the value of the property.
cAMParameter_var.expression = propertyValue
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMParameter_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version September 2020


CAMParameter.isDeprecated Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Gets if this parameter is deprecated. Some parameters are deprecated when their usage becomes obsolete. Reading deprecated parameters is allowed, but setting deprecated parameters will throw an error.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.isDeprecated
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
boolean propertyValue = cAMParameter_var->isDeprecated();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


CAMParameter.isEditable Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Returns whether or not the parameter's expression or value can be modified.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.isEditable
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
boolean propertyValue = cAMParameter_var->isEditable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2021


CAMParameter.isEnabled Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Gets if this parameter is enabled. Some parameters are enabled/disabled depending on the values set for other parameters.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.isEnabled
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
boolean propertyValue = cAMParameter_var->isEnabled();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


CAMParameter.isValid Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.isValid
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
boolean propertyValue = cAMParameter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


CAMParameter.name Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Gets the name (internal name) of the parameter.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.name
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMParameter.objectType Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.objectType
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMParameter.title Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Returns the title of this parameter as seen in the user interface. This title is localized and can change based on the current language

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.title
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->title();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMParameter.value Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Returns an object that allows you to get and set the value associated with the parameter.

Remarks

Within CAM operations, floating point values (via FloatParameterValue) are returned and set using a standardized set of "internal" units, rather than using the document units. The units used depend on the type of parameter. For reference, the units used are:
  • Length - centimeters (cm)
  • Angle - radians (rad)
  • Linear velocity - millimeters/minute (mm/min)
  • Rotational velocity - revolutions per minute (rpm)
  • Time - seconds (s)
  • Weight - kilograms (kg)
  • Power - Watts (W)
  • Flow rate - liters/minute (l/min)
  • Area - square centimeters (cm²)
  • Volume - cubic centimeters (cm³)
  • Temperature - degrees Celsius (C)

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.value
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
Ptr<ParameterValue> propertyValue = cAMParameter_var->value();

Property Value

This is a read only property whose value is a ParameterValue.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version November 2021


CAMParameter.warning Property

Parent Object: CAMParameter
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameter.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMParameter_var" is a variable referencing a CAMParameter object.

# Get the value of the property.
propertyValue = cAMParameter_var.warning
"cAMParameter_var" is a variable referencing a CAMParameter object.
#include <Cam/Operations/CAMParameter.h>

// Get the value of the property.
string propertyValue = cAMParameter_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMParameters Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

Collection that provides access to the parameters of an existing operation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 parameter using an index into the collection.
itemByName | Returns the parameter of the specified id (internal name).

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMAdditiveContainer.parameters, CAMFolder.parameters, CAMHoleRecognition.parameters, CAMPattern.parameters, CAMTemplateOperationInput.parameters, NCProgram.parameters, NCProgram.postParameters, NCProgramInput.parameters, Operation.parameters, OperationBase.parameters, OperationInput.parameters, PostProcessingMachineElement.postParameters, PrintSetting.parameters, PrintSettingItem.parameters, Setup.parameters, SetupInput.parameters, Tool.parameters, ToolPreset.parameters

Samples

Name | Description
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version September 2020


CAMParameters.classType Method

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMParameters.classType()
This is a static method.

#include <Cam/Operations/CAMParameters.h>

returnValue = adsk::cam::CAMParameters::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


CAMParameters.count Property

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"cAMParameters_var" is a variable referencing a CAMParameters object.

# Get the value of the property.
propertyValue = cAMParameters_var.count
"cAMParameters_var" is a variable referencing a CAMParameters object.
#include <Cam/Operations/CAMParameters.h>

// Get the value of the property.
uinteger propertyValue = cAMParameters_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


CAMParameters.isValid Property

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMParameters_var" is a variable referencing a CAMParameters object.

# Get the value of the property.
propertyValue = cAMParameters_var.isValid
"cAMParameters_var" is a variable referencing a CAMParameters object.
#include <Cam/Operations/CAMParameters.h>

// Get the value of the property.
boolean propertyValue = cAMParameters_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


CAMParameters.item Method

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

Function that returns the specified parameter using an index into the collection.

Syntax

  • Python
  • C++
"cAMParameters_var" is a variable referencing a CAMParameters object.
returnValue = cAMParameters_var.item(index)
"cAMParameters_var" is a variable referencing a CAMParameters object.

#include <Cam/Operations/CAMParameters.h>

returnValue = cAMParameters_var->item(index);

Return Value

Type | Description
CAMParameter | 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 2020


CAMParameters.itemByName Method

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

Returns the parameter of the specified id (internal name).

Syntax

  • Python
  • C++
"cAMParameters_var" is a variable referencing a CAMParameters object.
returnValue = cAMParameters_var.itemByName(internalName)
"cAMParameters_var" is a variable referencing a CAMParameters object.

#include <Cam/Operations/CAMParameters.h>

returnValue = cAMParameters_var->itemByName(internalName);

Return Value

Type | Description
CAMParameter | Returns the specified parameter or null in the case where there is no parameter with the specified id.

Parameters

Name | Type | Description
internalName | string | The id (internal name) of the parameter.

Samples

Name | Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version September 2020


CAMParameters.objectType Property

Parent Object: CAMParameters
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/CAMParameters.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMParameters_var" is a variable referencing a CAMParameters object.

# Get the value of the property.
propertyValue = cAMParameters_var.objectType
"cAMParameters_var" is a variable referencing a CAMParameters object.
#include <Cam/Operations/CAMParameters.h>

// Get the value of the property.
string propertyValue = cAMParameters_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CAMPattern Object

Derived from: CAMFolder Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Object that represents a pattern in an existing Setup, Folder or Pattern.

Methods

Name | Description
activate | Sets this object as the default container.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
createFromCAMTemplate | **RETIRED** Creates and adds operations, folders or patterns from the specified CAMTemplate to the end of this folder.
createFromCAMTemplate2 | Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.
createFromTemplate | **RETIRED** Creates and adds operations, folders or patterns from the specified template file to the end of this folder.
createFromTemplateXML | **RETIRED** Creates and adds operations, folders or patterns from the specified template content XML to the end of this folder.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this object.
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.
error | Returns a message corresponding to any active error associated with the value of this parameter.
folders | Returns the Folders collection that provides access to existing folders in this folder.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isActive | Gets if this folder is active.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

CAMPatterns.item, CAMPatterns.itemByName, CAMPatterns.itemByOperationId

Version

Introduced in version January 2016


CAMPattern.activate Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Sets this object as the default container.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.activate()
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version April 2023


CAMPattern.allOperations Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.

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.attributes Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.attributes
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cAMPattern_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2021


CAMPattern.children Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copyAfter Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.copyAfter(operation)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


CAMPattern.copyBefore Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.copyBefore(operation)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


CAMPattern.copyInto Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.copyInto(container)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


CAMPattern.createFromCAMTemplate Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified CAMTemplate to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.createFromCAMTemplate(camTemplate)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->createFromCAMTemplate(camTemplate);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
camTemplate | CAMTemplate | The CAMTemplate object to apply

Version

Introduced in version April 2023
Retired in version July 2024


CAMPattern.createFromCAMTemplate2 Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.createFromCAMTemplate2(input)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->createFromCAMTemplate2(input);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
input | CreateFromCAMTemplateInput | Input object that contains the template to create from and the generation mode.

Version

Introduced in version October 2023


CAMPattern.createFromTemplate Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified template file to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

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
Retired in version July 2024


CAMPattern.createFromTemplateXML Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates and adds operations, folders or patterns from the specified template content XML to the end of this folder.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.createFromTemplateXML(templateXML)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->createFromTemplateXML(templateXML);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
templateXML | string | The full XML content of the template.

Version

Introduced in version April 2023
Retired in version July 2024


CAMPattern.deleteMe Method

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.deleteMe()
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


CAMPattern.duplicate Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.duplicate()
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


CAMPattern.error Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.error
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMPattern.folders Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns the Folders collection that provides access to existing folders in this folder.

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.generatedDataCollection Property

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.generatedDataCollection
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = cAMPattern_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


CAMPattern.hasError Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.hasError
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMPattern.hasWarning Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.hasWarning
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMPattern.isActive Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if this folder is active.

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.isLightBulbOn Property

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isLightBulbOn

# Set the value of the property.
cAMPattern_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMPattern_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


CAMPattern.isOptional Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if this operation is selected in the 'Setups' browser.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isVisible
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CAMPattern.modifyUtility Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.modifyUtility(utility)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


CAMPattern.moveAfter Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.moveAfter(operation)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


CAMPattern.moveBefore Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.moveBefore(operation)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


CAMPattern.moveInto Method

Parent Object: CAMPattern

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.moveInto(container)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


CAMPattern.name Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets and sets the notes of the operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns the Operations collection that provides access to existing individual operations in this folder.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets the CAMParameters collection for this operation.

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 September 2020


CAMPattern.parent Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns the parent Setup, Folder or Pattern for this Folder.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets the Setup this operation belongs to.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns the Patterns collection that provides access to existing patterns in this folder.

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


CAMPattern.strategy Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.strategy
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


CAMPattern.warning Property

Parent Object: CAMPattern
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPattern.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.warning
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMPatterns Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Collection that provides access to the patterns within an existing setup, folder or pattern.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMFolder.patterns, CAMPattern.patterns, Setup.patterns

Version

Introduced in version January 2016


CAMPatterns.classType Method

Parent Object: CAMPatterns
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

The number of items in the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Function that returns the specified pattern using an index into the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Returns the pattern with the specified name (as appears in the browser).

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

Returns the pattern with the specified operation id.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CAMPatterns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


CAMTemplate Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Object that represents a template for a set of operations. These can be created from operations, optionally stored to files or in a library. The template can be used to re-create those operations in another document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createEmpty | Preview Create an empty CAMTemplate
createFromFile | Create a CAMTemplate from a file on disk, i.e. Import the template file. Invalid files will produce errors
createFromOperations | Create a CAMTemplate from a list of Operations
createFromXML | Creates a CAMTemplate from an XML string. Invalid template XML will produce errors
createHoleTemplateFromOperations | Create a hole CAMTemplate from a list of hole operations. Hole templates may be used in Hole Recognition
getHoleSignatureXML | Preview Convert hole signature to XML. This will be empty if this is not a hole template, or if there is no signature.
save | Save the CAMTemplate to a file
setHoleSignatureXML | Preview Provide an XML snippet to specify a hole signature. This will have no effect if this is not a hole template. This will fail if the provided snippet is not valid.

Properties

Name | Description
description | Gets and sets the description of the template.
isHoleTemplate | Whether or not this is a hole template
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 template.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operations | Preview Expose operations.

Accessed From

CAMTemplate.createEmpty, CAMTemplate.createFromFile, CAMTemplate.createFromOperations, CAMTemplate.createFromXML, CAMTemplate.createHoleTemplateFromOperations, CAMTemplateLibrary.childTemplates, CAMTemplateLibrary.templateAtURL, CreateFromCAMTemplateInput.camTemplate

Version

Introduced in version April 2023


CAMTemplate.classType Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.classType()
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMTemplate.createEmpty Method

Parent Object: CAMTemplate

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Create an empty CAMTemplate

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.createEmpty()
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::createEmpty();

Return Value

Type | Description
CAMTemplate | Returns the newly created template.

Version

Introduced in version May 2025


CAMTemplate.createFromFile Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Create a CAMTemplate from a file on disk, i.e. Import the template file. Invalid files will produce errors

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.createFromFile(filePath)
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::createFromFile(filePath);

Return Value

Type | Description
CAMTemplate | Returns the newly created template.

Parameters

Name | Type | Description
filePath | string | The path to a template file.

Version

Introduced in version April 2023


CAMTemplate.createFromOperations Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Create a CAMTemplate from a list of Operations

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.createFromOperations(operations)
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::createFromOperations(operations);

Return Value

Type | Description
CAMTemplate | Returns the newly created template.

Parameters

Name | Type | Description
operations | Operation[] | An array of operations to bundle into a template.

Version

Introduced in version April 2023


CAMTemplate.createFromXML Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Creates a CAMTemplate from an XML string. Invalid template XML will produce errors

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.createFromXML(xml)
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::createFromXML(xml);

Return Value

Type | Description
CAMTemplate | Returns the newly created template.

Parameters

Name | Type | Description
xml | string | The XML representation to act as a base for creating a template.

Version

Introduced in version April 2023


CAMTemplate.createHoleTemplateFromOperations Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Create a hole CAMTemplate from a list of hole operations. Hole templates may be used in Hole Recognition

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplate.createHoleTemplateFromOperations(operations)
This is a static method.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = adsk::cam::CAMTemplate::createHoleTemplateFromOperations(operations);

Return Value

Type | Description
CAMTemplate | Returns the newly created template.

Parameters

Name | Type | Description
operations | Operation[] | A list of operations to bundle into a template. Only 2D Adaptive, 2D Chamfer, 2D Contour, 2D Pocket, Bore, Circular, Drill and Thread operations are allowed in hole templates. Passing in other operation types will throw an error.

Version

Introduced in version April 2023


CAMTemplate.description Property

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Gets and sets the description of the template.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.description

# Set the value of the property.
cAMTemplate_var.description = propertyValue
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
string propertyValue = cAMTemplate_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMTemplate_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


CAMTemplate.getHoleSignatureXML Method

Parent Object: CAMTemplate

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Convert hole signature to XML. This will be empty if this is not a hole template, or if there is no signature.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
returnValue = cAMTemplate_var.getHoleSignatureXML()
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = cAMTemplate_var->getHoleSignatureXML();

Version

Introduced in version May 2025


CAMTemplate.isHoleTemplate Property

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Whether or not this is a hole template

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.isHoleTemplate
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
boolean propertyValue = cAMTemplate_var->isHoleTemplate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMTemplate.isValid Property

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.isValid
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
boolean propertyValue = cAMTemplate_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMTemplate.name Property

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Gets and sets the name of the template.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.name

# Set the value of the property.
cAMTemplate_var.name = propertyValue
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
string propertyValue = cAMTemplate_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMTemplate_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


CAMTemplate.objectType Property

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.objectType
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
string propertyValue = cAMTemplate_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMTemplate.operations Property

Parent Object: CAMTemplate

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Expose operations.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

# Get the value of the property.
propertyValue = cAMTemplate_var.operations

# Set the value of the property.
cAMTemplate_var.operations = propertyValue
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
#include <Cam/CAMTemplate/CAMTemplate.h>

// Get the value of the property.
Ptr<CAMTemplateOperations> propertyValue = cAMTemplate_var->operations();

// Set the value of the property, where value_var is a CAMTemplateOperations.
bool returnValue = cAMTemplate_var->operations(value_var);

Property Value

This is a read/write property whose value is a CAMTemplateOperations.

Version

Introduced in version May 2025


CAMTemplate.save Method

Parent Object: CAMTemplate
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Save the CAMTemplate to a file

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
returnValue = cAMTemplate_var.save(filePath)
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = cAMTemplate_var->save(filePath);

Return Value

Type | Description
boolean | Returns true if the template was saved successfully, false otherwise.

Parameters

Name | Type | Description
filePath | string | The path to the file you wish to save

Version

Introduced in version April 2023


CAMTemplate.setHoleSignatureXML Method

Parent Object: CAMTemplate

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplate.h>

Description

Provide an XML snippet to specify a hole signature. This will have no effect if this is not a hole template. This will fail if the provided snippet is not valid.

Syntax

  • Python
  • C++
"cAMTemplate_var" is a variable referencing a CAMTemplate object.
returnValue = cAMTemplate_var.setHoleSignatureXML(xmlSnippet)
"cAMTemplate_var" is a variable referencing a CAMTemplate object.

#include <Cam/CAMTemplate/CAMTemplate.h>

returnValue = cAMTemplate_var->setHoleSignatureXML(xmlSnippet);

Return Value

Type | Description
boolean | This will return true on success, false on failure.

Parameters

Name | Type | Description
xmlSnippet | string |

Version

Introduced in version May 2025


CAMTemplateLibrary Object

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

The CAMTemplateLibrary provides access to templates. Using this object you can import templates and get existing templates using a URL.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
childTemplates | Get all templates by the given parent folder URL. Returns null if there is no folder at the URL.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importTemplate | Import a given template at a specific location. The template will be stored in the library. Throws an error if the given URL is read-only.
templateAtURL | Gets a specific template specified by the given URL. Returns null if the specified template does not exist.
updateTemplate | Update a template in the library. The library substitutes the existing template at the URL by given template. Throws an error if the URL does not already point to an existing template. If the name member of the CAMTemplate doesn't match the name portion of the URL then this will include a rename operation and the returned URL will reflect the new name.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.templateLibrary

Samples

Name Description
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


CAMTemplateLibrary.assetTypeName Property

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

# Get the value of the property.
propertyValue = cAMTemplateLibrary_var.assetTypeName
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

// Get the value of the property.
string propertyValue = cAMTemplateLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMTemplateLibrary.childAssetURLs Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.childAssetURLs(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


CAMTemplateLibrary.childFolderURLs Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.childFolderURLs(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


CAMTemplateLibrary.childTemplates Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get all templates by the given parent folder URL. Returns null if there is no folder at the URL.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.childTemplates(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->childTemplates(url);

Return Value

Type | Description
CAMTemplate[] | Returns an array of templates contained within the specified folder URL. Returns null if the URL is not valid.

Parameters

Name | Type | Description
url | URL | The URL of the folder to get the templates from.

Version

Introduced in version April 2023


CAMTemplateLibrary.classType Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMTemplateLibrary.classType()
This is a static method.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = adsk::cam::CAMTemplateLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CAMTemplateLibrary.createFolder Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.createFolder(parentUrl, folderName)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


CAMTemplateLibrary.deleteAsset Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.deleteAsset(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


CAMTemplateLibrary.deleteFolder Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.deleteFolder(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


CAMTemplateLibrary.displayName Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.displayName(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


CAMTemplateLibrary.importTemplate Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Import a given template at a specific location. The template will be stored in the library. Throws an error if the given URL is read-only.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.importTemplate(camTemplate, destinationUrl)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->importTemplate(camTemplate, destinationUrl);

Return Value

Type | Description
URL | Returns the URL of the newly imported template, or null if the import failed.

Parameters

Name | Type | Description
camTemplate | CAMTemplate | The template that should be imported.
destinationUrl | URL | The URL to the folder where to save the template.

Version

Introduced in version April 2023


CAMTemplateLibrary.isValid Property

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

# Get the value of the property.
propertyValue = cAMTemplateLibrary_var.isValid
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

// Get the value of the property.
boolean propertyValue = cAMTemplateLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CAMTemplateLibrary.objectType Property

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

# Get the value of the property.
propertyValue = cAMTemplateLibrary_var.objectType
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

// Get the value of the property.
string propertyValue = cAMTemplateLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CAMTemplateLibrary.templateAtURL Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Gets a specific template specified by the given URL. Returns null if the specified template does not exist.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.templateAtURL(url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->templateAtURL(url);

Return Value

Type | Description
CAMTemplate | Returns the template for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the template to be fetched.

Version

Introduced in version April 2023


CAMTemplateLibrary.updateTemplate Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Update a template in the library. The library substitutes the existing template at the URL by given template. Throws an error if the URL does not already point to an existing template. If the name member of the CAMTemplate doesn't match the name portion of the URL then this will include a rename operation and the returned URL will reflect the new name.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.updateTemplate(camTemplate, url)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->updateTemplate(camTemplate, url);

Return Value

Type | Description
URL | Returns the URL of the updated template, or null if the update failed.

Parameters

Name | Type | Description
camTemplate | CAMTemplate | The template that should be persisted.
url | URL | The URL to the existing template in the library that should be updated.

Version

Introduced in version April 2023


CAMTemplateLibrary.urlByLocation Method

Parent Object: CAMTemplateLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/CAMTemplate/CAMTemplateLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.
returnValue = cAMTemplateLibrary_var.urlByLocation(location)
"cAMTemplateLibrary_var" is a variable referencing a CAMTemplateLibrary object.

#include <Cam/CAMTemplate/CAMTemplateLibrary.h>

returnValue = cAMTemplateLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Version

Introduced in version April 2023


Canvas Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Represents a Canvas within a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 canvas from the component.
flipHorizontal | Flips the image along the horizontal axis. This is a convenience method that flips the direction of the X axis of the transform.
flipVertical | Flips the image along the vertical axis. This is a convenience method that flips the direction of the Y axis of the transform.
saveImage | Saves the image associated with the canvas to the specified file. This is useful in cases where the original image file is no longer available but you need the image for some other purpose.

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.
entityToken Returns a token for the Canvas object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same canvas.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
imageFilename Gets and sets the filename of the image used for the canvas. When getting this property, the filename returned is the file that was used when the canvas was initially created. it's possible the file may no longer exist.

When setting this property, it is the full filename to the image to use for the canvas. PNG, JPEG, and TIFF files are supported.
isDisplayedThrough | Controls if the image is visible through the model or not.
isLightBulbOn Gets and sets if the light bulb of this canvas as displayed in the browser is on or off.

A canvas will only be visible if the light bulb is switched on. However, the light bulb can be on and the canvas still invisible if the visibility of a higher level occurrence has its light bulb off or if the light bulb for Canvases folder is off to turn off all canvases in a component.
isRenderable | Controls if the canvas will be rendered when ray tracing within the Render workspace.
isSelectable | Controls if the canvas is selectable or not within 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 | Returns if the canvas is currently visible in the graphics window. The isLightBulbOn property of the canvas controls if the canvas should be displayed or not, but even when true, the canvas may not be visible because the occurrence that references the component may not be visible. It's also possible to turn off the visibility of all canvases for a component. This property takes all of that into account when reporting if the canvas is visible or not.
name | Gets and sets the name of the canvas. This is the name 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity | Gets and sets the opacity of the canvas where 0 is completely transparent and 100 is completely opaque. Setting this property to a value outside the range of 0-100 will result in the value being set to the closest valid value.
planarEntity | Gets and sets the plane the canvas is associated with. This can be either a planar Face or a construction plane. In a direct modeling design or the canvas is being created in a base feature, this can be a Plane object.
plane | Returns a Plane object that represents the position and orientation of the canvas in model space.
timelineObject | Returns the timeline object associated with the creation of this canvas.
transform Gets and sets the transform of the canvas. This allows you to control the position, rotation, scaling, and flipping. The X and Y axes defined by the matrix and must be perpendicular to one another.

This is a 3x3 matrix where the third column controls the position of the canvas and defines the position using 2D coordinates in the model space.

Accessed From

Canvas.createForAssemblyContext, Canvas.nativeObject, Canvases.add, Canvases.item, Canvases.itemByName

Version

Introduced in version May 2023


Canvas.assemblyContext Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

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.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.assemblyContext
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = canvas_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2023


Canvas.classType Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Canvas.classType()
This is a static method.

#include <Fusion/Image/Canvas.h>

returnValue = adsk::fusion::Canvas::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


Canvas.createForAssemblyContext Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

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.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.
returnValue = canvas_var.createForAssemblyContext(occurrence)
"canvas_var" is a variable referencing a Canvas object.

#include <Fusion/Image/Canvas.h>

returnValue = canvas_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Canvas | 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 2023


Canvas.deleteMe Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Deletes the canvas from the component.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.
returnValue = canvas_var.deleteMe()
"canvas_var" is a variable referencing a Canvas object.

#include <Fusion/Image/Canvas.h>

returnValue = canvas_var->deleteMe();

Version

Introduced in version May 2023


Canvas.entityToken Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Returns a token for the Canvas object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same canvas.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.entityToken
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
string propertyValue = canvas_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


Canvas.flipHorizontal Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Flips the image along the horizontal axis. This is a convenience method that flips the direction of the X axis of the transform.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.
returnValue = canvas_var.flipHorizontal()
"canvas_var" is a variable referencing a Canvas object.

#include <Fusion/Image/Canvas.h>

returnValue = canvas_var->flipHorizontal();

Return Value

Type | Description
boolean | Returns true if the flip was successful.

Version

Introduced in version May 2023


Canvas.flipVertical Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Flips the image along the vertical axis. This is a convenience method that flips the direction of the Y axis of the transform.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.
returnValue = canvas_var.flipVertical()
"canvas_var" is a variable referencing a Canvas object.

#include <Fusion/Image/Canvas.h>

returnValue = canvas_var->flipVertical();

Return Value

Type | Description
boolean | Returns true if the flip was successful.

Version

Introduced in version May 2023


Canvas.imageFilename Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets the filename of the image used for the canvas. When getting this property, the filename returned is the file that was used when the canvas was initially created. it's possible the file may no longer exist.

When setting this property, it is the full filename to the image to use for the canvas. PNG, JPEG, and TIFF files are supported.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.imageFilename

# Set the value of the property.
canvas_var.imageFilename = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
string propertyValue = canvas_var->imageFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = canvas_var->imageFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


Canvas.isDisplayedThrough Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Controls if the image is visible through the model or not.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isDisplayedThrough

# Set the value of the property.
canvas_var.isDisplayedThrough = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isDisplayedThrough();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvas_var->isDisplayedThrough(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.isLightBulbOn Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets if the light bulb of this canvas as displayed in the browser is on or off.

A canvas will only be visible if the light bulb is switched on. However, the light bulb can be on and the canvas still invisible if the visibility of a higher level occurrence has its light bulb off or if the light bulb for Canvases folder is off to turn off all canvases in a component.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isLightBulbOn

# Set the value of the property.
canvas_var.isLightBulbOn = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvas_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.isRenderable Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Controls if the canvas will be rendered when ray tracing within the Render workspace.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isRenderable

# Set the value of the property.
canvas_var.isRenderable = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isRenderable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvas_var->isRenderable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.isSelectable Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Controls if the canvas is selectable or not within the graphics window.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isSelectable

# Set the value of the property.
canvas_var.isSelectable = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvas_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.isValid Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isValid
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.isVisible Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Returns if the canvas is currently visible in the graphics window. The isLightBulbOn property of the canvas controls if the canvas should be displayed or not, but even when true, the canvas may not be visible because the occurrence that references the component may not be visible. It's also possible to turn off the visibility of all canvases for a component. This property takes all of that into account when reporting if the canvas is visible or not.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.isVisible
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
boolean propertyValue = canvas_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


Canvas.name Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets the name of the canvas. This is the name seen in the browser and timeline.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.name

# Set the value of the property.
canvas_var.name = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
string propertyValue = canvas_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = canvas_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


Canvas.nativeObject Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

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.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.nativeObject
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<Canvas> propertyValue = canvas_var->nativeObject();

Property Value

This is a read only property whose value is a Canvas.

Version

Introduced in version May 2023


Canvas.objectType Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.objectType
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
string propertyValue = canvas_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


Canvas.opacity Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets the opacity of the canvas where 0 is completely transparent and 100 is completely opaque. Setting this property to a value outside the range of 0-100 will result in the value being set to the closest valid value.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.opacity

# Set the value of the property.
canvas_var.opacity = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
integer propertyValue = canvas_var->opacity();

// Set the value of the property, where value_var is an integer.
bool returnValue = canvas_var->opacity(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


Canvas.planarEntity Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets the plane the canvas is associated with. This can be either a planar Face or a construction plane. In a direct modeling design or the canvas is being created in a base feature, this can be a Plane object.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.planarEntity

# Set the value of the property.
canvas_var.planarEntity = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<Base> propertyValue = canvas_var->planarEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = canvas_var->planarEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2023


Canvas.plane Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Returns a Plane object that represents the position and orientation of the canvas in model space.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.plane
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<Plane> propertyValue = canvas_var->plane();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version May 2023


Canvas.saveImage Method

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Saves the image associated with the canvas to the specified file. This is useful in cases where the original image file is no longer available but you need the image for some other purpose.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.
returnValue = canvas_var.saveImage(filename)
"canvas_var" is a variable referencing a Canvas object.

#include <Fusion/Image/Canvas.h>

returnValue = canvas_var->saveImage(filename);

Return Value

Type | Description
boolean | Returns true if writing the file was successful.

Parameters

Name | Type | Description
filename | string | The full filename of the image to save, including the file extension, which controls the format of the image file. If a file extension other than png, jpg, or tiff is specified, a png extension will be added to the filename by default. This method will fail if a file with the specified filename already exists. If you want to overwrite the file, you'll need to delete it first before calling this method.

Version

Introduced in version May 2023


Canvas.timelineObject Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Returns the timeline object associated with the creation of this canvas.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.timelineObject
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = canvas_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version May 2023


Canvas.transform Property

Parent Object: Canvas
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvas.h>

Description

Gets and sets the transform of the canvas. This allows you to control the position, rotation, scaling, and flipping. The X and Y axes defined by the matrix and must be perpendicular to one another.

This is a 3x3 matrix where the third column controls the position of the canvas and defines the position using 2D coordinates in the model space.

Syntax

  • Python
  • C++
"canvas_var" is a variable referencing a Canvas object.

# Get the value of the property.
propertyValue = canvas_var.transform

# Set the value of the property.
canvas_var.transform = propertyValue
"canvas_var" is a variable referencing a Canvas object.
#include <Fusion/Image/Canvas.h>

// Get the value of the property.
Ptr<Matrix2D> propertyValue = canvas_var->transform();

// Set the value of the property, where value_var is a Matrix2D.
bool returnValue = canvas_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix2D.

Version

Introduced in version May 2023


CanvasEffects Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Provides access to the settings that control the canvas effects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isAmbientOcclusionEnabled Gets and sets if ambient occlusion is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isAntiAliasingEnabled Gets and sets if antialiasing is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isEnvironmentDomeEnabled Gets and sets if the environment dome is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isGroundPlaneEnabled Gets and sets if the ground plane is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isGroundReflectionEnabled Gets and sets if ground reflection is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isGroundShadowEnabled Gets and sets if the ground shadow is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isObjectShadowEnabled Gets and sets if object shadows is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

GraphicsPreferences.canvasEffects

Version

Introduced in version May 2025


CanvasEffects.classType Method

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CanvasEffects.classType()
This is a static method.

#include <Core/Application/CanvasEffects.h>

returnValue = adsk::core::CanvasEffects::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


CanvasEffects.isAmbientOcclusionEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if ambient occlusion is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isAmbientOcclusionEnabled

# Set the value of the property.
canvasEffects_var.isAmbientOcclusionEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isAmbientOcclusionEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isAmbientOcclusionEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isAntiAliasingEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if antialiasing is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isAntiAliasingEnabled

# Set the value of the property.
canvasEffects_var.isAntiAliasingEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isAntiAliasingEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isAntiAliasingEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isEnvironmentDomeEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if the environment dome is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isEnvironmentDomeEnabled

# Set the value of the property.
canvasEffects_var.isEnvironmentDomeEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isEnvironmentDomeEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isEnvironmentDomeEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isGroundPlaneEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if the ground plane is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isGroundPlaneEnabled

# Set the value of the property.
canvasEffects_var.isGroundPlaneEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isGroundPlaneEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isGroundPlaneEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isGroundReflectionEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if ground reflection is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isGroundReflectionEnabled

# Set the value of the property.
canvasEffects_var.isGroundReflectionEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isGroundReflectionEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isGroundReflectionEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isGroundShadowEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if the ground shadow is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isGroundShadowEnabled

# Set the value of the property.
canvasEffects_var.isGroundShadowEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isGroundShadowEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isGroundShadowEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isObjectShadowEnabled Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Gets and sets if object shadows is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isObjectShadowEnabled

# Set the value of the property.
canvasEffects_var.isObjectShadowEnabled = propertyValue
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isObjectShadowEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasEffects_var->isObjectShadowEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.isValid Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.isValid
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
boolean propertyValue = canvasEffects_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


CanvasEffects.objectType Property

Parent Object: CanvasEffects
Defined in namespace "adsk::core" and the header file is <Core/Application/CanvasEffects.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"canvasEffects_var" is a variable referencing a CanvasEffects object.

# Get the value of the property.
propertyValue = canvasEffects_var.objectType
"canvasEffects_var" is a variable referencing a CanvasEffects object.
#include <Core/Application/CanvasEffects.h>

// Get the value of the property.
string propertyValue = canvasEffects_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Canvases Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Provides access to the Canvases in a component and provides the functionality to add new Canvases.

Methods

Name | Description
add | Creates a new canvas. Use the createInput method to first create an input object and set the available options. Then, pass that input object to the add method to create the canvas.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 CanvasInput object. A CanvasInput object is the logical equivalent to the command dialog when creating a canvas. It provides access to the various options when creating a canvas. Calling the add method and passing in the CanvasInput is the equivalent to clicking the OK button on the dialog to create the canvas.
item | Returns the specified canvas using an index into the collection.
itemByName | Returns the specified canvas using the name of the canvas.

Properties

Name | Description
count | Returns the number of canvases in the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.canvases, Component.canvases, FlatPatternComponent.canvases

Version

Introduced in version May 2023


Canvases.add Method

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Creates a new canvas. Use the createInput method to first create an input object and set the available options. Then, pass that input object to the add method to create the canvas.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.
returnValue = canvases_var.add(input)
"canvases_var" is a variable referencing a Canvases object.

#include <Fusion/Image/Canvases.h>

returnValue = canvases_var->add(input);

Return Value

Type | Description
Canvas | Returns the newly created Canvas object.

Parameters

Name | Type | Description
input | CanvasInput | The CanvasInput object that defines the required information needed to create a new canvas. A CanvasInput object is the logical equivalent to the command dialog when creating a canvas. It provides access to the various options when creating a canvas. Calling the add method and passing in the CanvasInput is the equivalent to clicking the OK button on the dialog to create the canvas.

Version

Introduced in version May 2023


Canvases.classType Method

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Canvases.classType()
This is a static method.

#include <Fusion/Image/Canvases.h>

returnValue = adsk::fusion::Canvases::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


Canvases.count Property

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Returns the number of canvases in the component.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.

# Get the value of the property.
propertyValue = canvases_var.count
"canvases_var" is a variable referencing a Canvases object.
#include <Fusion/Image/Canvases.h>

// Get the value of the property.
uinteger propertyValue = canvases_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2023


Canvases.createInput Method

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Creates a new CanvasInput object. A CanvasInput object is the logical equivalent to the command dialog when creating a canvas. It provides access to the various options when creating a canvas. Calling the add method and passing in the CanvasInput is the equivalent to clicking the OK button on the dialog to create the canvas.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.
returnValue = canvases_var.createInput(imageFilename, planarEntity)
"canvases_var" is a variable referencing a Canvases object.

#include <Fusion/Image/Canvases.h>

returnValue = canvases_var->createInput(imageFilename, planarEntity);

Return Value

Type | Description
CanvasInput | Returns a CanvasInput object or null in the case of failure.

Parameters

Name | Type | Description
imageFilename | string | The full filename to the image to use for the canvas. PNG, JPEG, and TIFF files are supported.
planarEntity | Base | A planar BRepFace or a Construction plane to create the canvas on. If the canvas is being created in a base feature or in a direct modeling design, this can be a Plane object.

Version

Introduced in version May 2023


Canvases.isValid Property

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.

# Get the value of the property.
propertyValue = canvases_var.isValid
"canvases_var" is a variable referencing a Canvases object.
#include <Fusion/Image/Canvases.h>

// Get the value of the property.
boolean propertyValue = canvases_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


Canvases.item Method

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Returns the specified canvas using an index into the collection.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.
returnValue = canvases_var.item(index)
"canvases_var" is a variable referencing a Canvases object.

#include <Fusion/Image/Canvases.h>

returnValue = canvases_var->item(index);

Return Value

Type | Description
Canvas | 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 May 2023


Canvases.itemByName Method

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

Returns the specified canvas using the name of the canvas.

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.
returnValue = canvases_var.itemByName(name)
"canvases_var" is a variable referencing a Canvases object.

#include <Fusion/Image/Canvases.h>

returnValue = canvases_var->itemByName(name);

Return Value

Type | Description
Canvas | Returns the specified Canvas, if it exists. Otherwise it returns null.

Parameters

Name | Type | Description
name | string | The name of the canvas as seen in the browser and timeline.

Version

Introduced in version May 2023


Canvases.objectType Property

Parent Object: Canvases
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Canvases.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"canvases_var" is a variable referencing a Canvases object.

# Get the value of the property.
propertyValue = canvases_var.objectType
"canvases_var" is a variable referencing a Canvases object.
#include <Fusion/Image/Canvases.h>

// Get the value of the property.
string propertyValue = canvases_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


CanvasInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

The CanvasInput object is used to define the various options when creating a new canvas. It's created using the Canvases.createInput method and is used by the Canvases.add method to create a Canvas.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
flipHorizontal | Flips the image along the horizontal axis. This is a convenience method that flips the direction of the X axis of the transform.
flipVertical | Flips the image along the vertical axis. This is a convenience method that flips the direction of the Y axis of the transform.

Properties

Name | Description
imageFilename Gets and sets the filename of the image used for the canvas.

When setting this property, it is the full filename to the image to use for the canvas. PNG, JPEG, and TIFF files are supported.
isDisplayedThrough Controls if the image is visible through the model or not.

Defaults to true when the input is created.
isRenderable Controls if the canvas will be rendered when ray tracing within the Render workspace.

Defaults to false when the input is created.
isSelectable Controls if the canvas is selectable or not within the graphics window.

Defaults to false when the input is created.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity Gets and sets the opacity of the canvas where 0 is completely transparent and 100 is completely opaque. Setting this property to a value outside the range of 0-100 will result in the value being set to the closest valid value.

Defaults to 50 when the input is created.
planarEntity | Gets and sets the plane the canvas is associated with. This can be either a planar Face or a construction plane. In a direct modeling design or the canvas is being created in a base feature, this can be a Plane object.
plane | Returns a Plane object that is obtained from the planar face or construction plane and defines the parameter space the canvas is positioned relative to.
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 transform of the canvas. This allows you to control the position, rotation, scaling, and flipping. The X and Y axes defined by the matrix, must be perpendicular to one another. The directions of the X and Y axes defines the orientation of the image.

This is a 3x3 matrix where the third column controls the position of the canvas and is relative to the parameter space of the plane defined by the specified planar face or construction plane.

Accessed From

Canvases.createInput

Version

Introduced in version May 2023


CanvasInput.classType Method

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CanvasInput.classType()
This is a static method.

#include <Fusion/Image/CanvasInput.h>

returnValue = adsk::fusion::CanvasInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


CanvasInput.flipHorizontal Method

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Flips the image along the horizontal axis. This is a convenience method that flips the direction of the X axis of the transform.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.
returnValue = canvasInput_var.flipHorizontal()
"canvasInput_var" is a variable referencing a CanvasInput object.

#include <Fusion/Image/CanvasInput.h>

returnValue = canvasInput_var->flipHorizontal();

Return Value

Type | Description
boolean | Returns true if the flip was successful.

Version

Introduced in version May 2023


CanvasInput.flipVertical Method

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Flips the image along the vertical axis. This is a convenience method that flips the direction of the Y axis of the transform.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.
returnValue = canvasInput_var.flipVertical()
"canvasInput_var" is a variable referencing a CanvasInput object.

#include <Fusion/Image/CanvasInput.h>

returnValue = canvasInput_var->flipVertical();

Return Value

Type | Description
boolean | Returns true if the flip was successful.

Version

Introduced in version May 2023


CanvasInput.imageFilename Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Gets and sets the filename of the image used for the canvas.

When setting this property, it is the full filename to the image to use for the canvas. PNG, JPEG, and TIFF files are supported.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.imageFilename

# Set the value of the property.
canvasInput_var.imageFilename = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
string propertyValue = canvasInput_var->imageFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = canvasInput_var->imageFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2023


CanvasInput.isDisplayedThrough Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Controls if the image is visible through the model or not.

Defaults to true when the input is created.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.isDisplayedThrough

# Set the value of the property.
canvasInput_var.isDisplayedThrough = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
boolean propertyValue = canvasInput_var->isDisplayedThrough();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasInput_var->isDisplayedThrough(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


CanvasInput.isRenderable Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Controls if the canvas will be rendered when ray tracing within the Render workspace.

Defaults to false when the input is created.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.isRenderable

# Set the value of the property.
canvasInput_var.isRenderable = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
boolean propertyValue = canvasInput_var->isRenderable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasInput_var->isRenderable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


CanvasInput.isSelectable Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Controls if the canvas is selectable or not within the graphics window.

Defaults to false when the input is created.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.isSelectable

# Set the value of the property.
canvasInput_var.isSelectable = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
boolean propertyValue = canvasInput_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = canvasInput_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


CanvasInput.isValid Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.isValid
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
boolean propertyValue = canvasInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


CanvasInput.objectType Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.objectType
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
string propertyValue = canvasInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


CanvasInput.opacity Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Gets and sets the opacity of the canvas where 0 is completely transparent and 100 is completely opaque. Setting this property to a value outside the range of 0-100 will result in the value being set to the closest valid value.

Defaults to 50 when the input is created.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.opacity

# Set the value of the property.
canvasInput_var.opacity = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
integer propertyValue = canvasInput_var->opacity();

// Set the value of the property, where value_var is an integer.
bool returnValue = canvasInput_var->opacity(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


CanvasInput.planarEntity Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Gets and sets the plane the canvas is associated with. This can be either a planar Face or a construction plane. In a direct modeling design or the canvas is being created in a base feature, this can be a Plane object.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.planarEntity

# Set the value of the property.
canvasInput_var.planarEntity = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = canvasInput_var->planarEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = canvasInput_var->planarEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2023


CanvasInput.plane Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Returns a Plane object that is obtained from the planar face or construction plane and defines the parameter space the canvas is positioned relative to.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.plane
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
Ptr<Plane> propertyValue = canvasInput_var->plane();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version May 2023


CanvasInput.targetBaseFeature Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

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.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.targetBaseFeature

# Set the value of the property.
canvasInput_var.targetBaseFeature = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = canvasInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = canvasInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2023


CanvasInput.transform Property

Parent Object: CanvasInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/CanvasInput.h>

Description

Gets and sets the transform of the canvas. This allows you to control the position, rotation, scaling, and flipping. The X and Y axes defined by the matrix, must be perpendicular to one another. The directions of the X and Y axes defines the orientation of the image.

This is a 3x3 matrix where the third column controls the position of the canvas and is relative to the parameter space of the plane defined by the specified planar face or construction plane.

Syntax

  • Python
  • C++
"canvasInput_var" is a variable referencing a CanvasInput object.

# Get the value of the property.
propertyValue = canvasInput_var.transform

# Set the value of the property.
canvasInput_var.transform = propertyValue
"canvasInput_var" is a variable referencing a CanvasInput object.
#include <Fusion/Image/CanvasInput.h>

// Get the value of the property.
Ptr<Matrix2D> propertyValue = canvasInput_var->transform();

// Set the value of the property, where value_var is a Matrix2D.
bool returnValue = canvasInput_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix2D.

Version

Introduced in version May 2023


ChainSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Represents a chain type of curve selection. Allows B-Rep edges and sketch geometry for the inputGeometry property. The automatic tool side detection is currently disabled when using the API, thus the side is determined based on the direction of the first edge and the z-axis of the tool orientation.

This class overrides the value property of its GeometrySelection parent to return the result edge selection. The result may contain more edges than the input if gaps between the desired start and end edge were automatically filled.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
endExtensionLength | Property that gets and sets the length of the extension of an open curve at the end of the chain. The value is specified in centimeters. This is only applicable to open contours and when DistanceCap is chosen as the extension cap.
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
extensionMethod | Property that gets and sets extension method to use. The default is TangentExtension. Only applicable to open contours.
extensionType | Property that gets and sets the desired extension type method. The default is DistanceCap. This is only applicable to open contours.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isOpen | Property to get or set if an open contour should be closed or not. If true and the input does not specify a closed contour, additional curve segments will be generated to close the contour.
isOpenAllowed | Property to specify if the underlying CadContours2DParameterValue allows open contours. Some examples of some open contours are adaptive clearing 3d and swarf. And, some examples of closed contours are face and machining boundary.
isReverted Property to control if the curve is reverted or not. The curve needs to be reverted, if Fusion's guess does not match the user's expectation.

The initial tool placement depends on the first input edge or sketch line and the height of the bordering faces or sketch boundaries, with the tool being placed outside of the higher face or sketch boundary.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
startExtensionLength | Property that gets and sets the length of the extension of an open curve at the start of the chain. This is only applicable to open contours and when DistanceCap is chosen as the extension cap.
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewChainSelection

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ChainSelection.classType Method

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ChainSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/ChainSelection.h>

returnValue = adsk::cam::ChainSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ChainSelection.endExtensionLength Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property that gets and sets the length of the extension of an open curve at the end of the chain. The value is specified in centimeters. This is only applicable to open contours and when DistanceCap is chosen as the extension cap.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.endExtensionLength

# Set the value of the property.
chainSelection_var.endExtensionLength = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
double propertyValue = chainSelection_var->endExtensionLength();

// Set the value of the property, where value_var is a double.
bool returnValue = chainSelection_var->endExtensionLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


ChainSelection.error Property

Parent Object: ChainSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.error
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
string propertyValue = chainSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


ChainSelection.extensionMethod Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property that gets and sets extension method to use. The default is TangentExtension. Only applicable to open contours.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.extensionMethod

# Set the value of the property.
chainSelection_var.extensionMethod = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
ExtensionMethods propertyValue = chainSelection_var->extensionMethod();

// Set the value of the property, where value_var is an ExtensionMethods.
bool returnValue = chainSelection_var->extensionMethod(value_var);

Property Value

This is a read/write property whose value is an ExtensionMethods.

Version

Introduced in version April 2023


ChainSelection.extensionType Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property that gets and sets the desired extension type method. The default is DistanceCap. This is only applicable to open contours.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.extensionType

# Set the value of the property.
chainSelection_var.extensionType = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
ExtensionTypes propertyValue = chainSelection_var->extensionType();

// Set the value of the property, where value_var is an ExtensionTypes.
bool returnValue = chainSelection_var->extensionType(value_var);

Property Value

This is a read/write property whose value is an ExtensionTypes.

Version

Introduced in version April 2023


ChainSelection.hasError Property

Parent Object: ChainSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.hasError
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


ChainSelection.hasWarning Property

Parent Object: ChainSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.hasWarning
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


ChainSelection.inputGeometry Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.inputGeometry

# Set the value of the property.
chainSelection_var.inputGeometry = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = chainSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = chainSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ChainSelection.isOpen Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property to get or set if an open contour should be closed or not. If true and the input does not specify a closed contour, additional curve segments will be generated to close the contour.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.isOpen

# Set the value of the property.
chainSelection_var.isOpen = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->isOpen();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chainSelection_var->isOpen(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


ChainSelection.isOpenAllowed Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property to specify if the underlying CadContours2DParameterValue allows open contours. Some examples of some open contours are adaptive clearing 3d and swarf. And, some examples of closed contours are face and machining boundary.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.isOpenAllowed
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->isOpenAllowed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ChainSelection.isReverted Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property to control if the curve is reverted or not. The curve needs to be reverted, if Fusion's guess does not match the user's expectation.

The initial tool placement depends on the first input edge or sketch line and the height of the bordering faces or sketch boundaries, with the tool being placed outside of the higher face or sketch boundary.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.isReverted

# Set the value of the property.
chainSelection_var.isReverted = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->isReverted();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chainSelection_var->isReverted(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version April 2023


ChainSelection.isValid Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.isValid
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
boolean propertyValue = chainSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ChainSelection.objectType Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.objectType
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
string propertyValue = chainSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ChainSelection.startExtensionLength Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Property that gets and sets the length of the extension of an open curve at the start of the chain. This is only applicable to open contours and when DistanceCap is chosen as the extension cap.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.startExtensionLength

# Set the value of the property.
chainSelection_var.startExtensionLength = propertyValue
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
double propertyValue = chainSelection_var->startExtensionLength();

// Set the value of the property, where value_var is a double.
bool returnValue = chainSelection_var->startExtensionLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


ChainSelection.value Property

Parent Object: ChainSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.value
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = chainSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


ChainSelection.warning Property

Parent Object: ChainSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/ChainSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"chainSelection_var" is a variable referencing a ChainSelection object.

# Get the value of the property.
propertyValue = chainSelection_var.warning
"chainSelection_var" is a variable referencing a ChainSelection object.
#include <Cam/GeometrySelections/ChainSelection.h>

// Get the value of the property.
string propertyValue = chainSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


ChamferEdgeSet Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

The base class for the classes that define the different types of chamfer edge sets.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 chamfer edge set from the chamfer. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
isTangentChain | Gets and sets the Tangent chain for chamfer. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ChamferEdgeSets.item

Derived Classes

DistanceAndAngleChamferEdgeSet, EqualDistanceChamferEdgeSet, TwoDistancesChamferEdgeSet

Version

Introduced in version December 2020


ChamferEdgeSet.classType Method

Parent Object: ChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferEdgeSet.classType()
This is a static method.

#include <Fusion/Features/ChamferEdgeSet.h>

returnValue = adsk::fusion::ChamferEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


ChamferEdgeSet.deleteMe Method

Parent Object: ChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

Deletes the chamfer edge set from the chamfer.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.
returnValue = chamferEdgeSet_var.deleteMe()
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.

#include <Fusion/Features/ChamferEdgeSet.h>

returnValue = chamferEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version December 2020


ChamferEdgeSet.isTangentChain Property

Parent Object: ChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

Gets and sets the Tangent chain for chamfer. This enables tangent chain option for chamfer.

Syntax

  • Python
  • C++
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.

# Get the value of the property.
propertyValue = chamferEdgeSet_var.isTangentChain

# Set the value of the property.
chamferEdgeSet_var.isTangentChain = propertyValue
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.
#include <Fusion/Features/ChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = chamferEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chamferEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


ChamferEdgeSet.isValid Property

Parent Object: ChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.

# Get the value of the property.
propertyValue = chamferEdgeSet_var.isValid
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.
#include <Fusion/Features/ChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = chamferEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


ChamferEdgeSet.objectType Property

Parent Object: ChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.

# Get the value of the property.
propertyValue = chamferEdgeSet_var.objectType
"chamferEdgeSet_var" is a variable referencing a ChamferEdgeSet object.
#include <Fusion/Features/ChamferEdgeSet.h>

// Get the value of the property.
string propertyValue = chamferEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


ChamferEdgeSets Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Collection that provides access to all of the existing chamfer edge sets associated with a chamfer feature.

Methods

Name | Description
addDistanceAndAngleChamferEdgeSet | Adds a set of edges an equal distance offset to this chamfer feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
addEqualDistanceChamferEdgeSet | Adds a set of edges an equal distance offset to this chamfer feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
addTwoDistancesChamferEdgeSet | Adds a set of edges an equal distance offset to this chamfer feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 chamfer edge set using an index into the collection.

Properties

Name | Description
count | The number of chamfer 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ChamferFeature.edgeSets, ChamferFeatureInput.chamferEdgeSets

Samples

Name | Description
Equal Distance Chamfer Feature API Sample | 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 December 2020


ChamferEdgeSets.addDistanceAndAngleChamferEdgeSet Method

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Adds a set of edges an equal distance offset to this chamfer feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
returnValue = chamferEdgeSets_var.addDistanceAndAngleChamferEdgeSet(edges, distance, angle, isFlipped, isTangentChain)
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

#include <Fusion/Features/ChamferEdgeSets.h>

returnValue = chamferEdgeSets_var->addDistanceAndAngleChamferEdgeSet(edges, distance, angle, isFlipped, isTangentChain);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the ChamferFeatureInput.

Parameters

Name | Type | Description
edges | ObjectCollection | An ObjectCollection containing the edges to be chamfered. Edges can be defined by passing in BrepEdge, BRepFace, or Feature objects. If BRepFace or Feature objects are passed in all of the edges associated with those objects will be chamfered. If BRepEdge objects are provided and the isTangentChain argument is true additional edges may also get chamfered if they are tangentially connected to any of the input edges.
distance | ValueInput | A ValueInput object that defines the distance offset 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") or if no units are specified it is interpreted using the current default units for length.
angle | ValueInput | A ValueInput object that defines the angle of the chamfer. 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. "2 rad") or if no units are specified it is interpreted as degrees.
isFlipped | boolean | Swaps the directions for distance one and two.
isTangentChain | boolean | A boolean value for setting whether or not edges that are tangentially connected to the input edges (if any) will also be chamfered.

Version

Introduced in version December 2020


ChamferEdgeSets.addEqualDistanceChamferEdgeSet Method

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Adds a set of edges an equal distance offset to this chamfer feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
returnValue = chamferEdgeSets_var.addEqualDistanceChamferEdgeSet(edges, distance, isTangentChain)
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

#include <Fusion/Features/ChamferEdgeSets.h>

returnValue = chamferEdgeSets_var->addEqualDistanceChamferEdgeSet(edges, distance, isTangentChain);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the ChamferFeatureInput.

Parameters

Name | Type | Description
edges | ObjectCollection | An ObjectCollection containing the edges to be chamfered. Edges can be defined by passing in BrepEdge, BRepFace, or Feature objects. If BRepFace or Feature objects are passed in all of the edges associated with those objects will be chamfered. If BRepEdge objects are provided and the isTangentChain argument is true additional edges may also get chamfered if they are tangentially connected to any of the input edges.
distance | ValueInput | A ValueInput object that defines the distance offset 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") or 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 chamfered.

Samples

Name | Description
chamferFeatures.add | Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.
Equal Distance Chamfer Feature API Sample | 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 December 2020


ChamferEdgeSets.addTwoDistancesChamferEdgeSet Method

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Adds a set of edges an equal distance offset to this chamfer feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
returnValue = chamferEdgeSets_var.addTwoDistancesChamferEdgeSet(edges, distanceOne, distanceTwo, isFlipped, isTangentChain)
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

#include <Fusion/Features/ChamferEdgeSets.h>

returnValue = chamferEdgeSets_var->addTwoDistancesChamferEdgeSet(edges, distanceOne, distanceTwo, isFlipped, isTangentChain);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the ChamferFeatureInput.

Parameters

Name | Type | Description
edges | ObjectCollection | An ObjectCollection containing the edges to be chamfered. Edges can be defined by passing in BrepEdge, BRepFace, or Feature objects. If BRepFace or Feature objects are passed in all of the edges associated with those objects will be chamfered. If BRepEdge objects are provided and the isTangentChain argument is true additional edges may also get chamfered if they are tangentially connected to any of the input edges.
distanceOne | ValueInput | A ValueInput object that defines the first distance offset 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") or if no units are specified it is interpreted using the current default units for length.
distanceTwo | ValueInput | A ValueInput object that defines the second distance offset 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") or if no units are specified it is interpreted using the current default units for length.
isFlipped | boolean | Swaps the directions for distance one and two.
isTangentChain | boolean | A boolean value for setting whether or not edges that are tangentially connected to the input edges (if any) will also be chamfered.

Version

Introduced in version December 2020


ChamferEdgeSets.classType Method

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferEdgeSets.classType()
This is a static method.

#include <Fusion/Features/ChamferEdgeSets.h>

returnValue = adsk::fusion::ChamferEdgeSets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


ChamferEdgeSets.count Property

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

The number of chamfer edge sets in the collection.

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

# Get the value of the property.
propertyValue = chamferEdgeSets_var.count
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
#include <Fusion/Features/ChamferEdgeSets.h>

// Get the value of the property.
uinteger propertyValue = chamferEdgeSets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version December 2020


ChamferEdgeSets.isValid Property

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

# Get the value of the property.
propertyValue = chamferEdgeSets_var.isValid
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
#include <Fusion/Features/ChamferEdgeSets.h>

// Get the value of the property.
boolean propertyValue = chamferEdgeSets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


ChamferEdgeSets.item Method

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

Function that returns the specified chamfer edge set using an index into the collection.

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
returnValue = chamferEdgeSets_var.item(index)
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

#include <Fusion/Features/ChamferEdgeSets.h>

returnValue = chamferEdgeSets_var->item(index);

Return Value

Type | Description
ChamferEdgeSet | 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 December 2020


ChamferEdgeSets.objectType Property

Parent Object: ChamferEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferEdgeSets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.

# Get the value of the property.
propertyValue = chamferEdgeSets_var.objectType
"chamferEdgeSets_var" is a variable referencing a ChamferEdgeSets object.
#include <Fusion/Features/ChamferEdgeSets.h>

// Get the value of the property.
string propertyValue = chamferEdgeSets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


ChamferFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Object that represents an existing chamfer feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** Changes the type of chamfer to be a distance and angle chamfer.
setEqualDistance | **RETIRED** Changes the type of chamfer to be an equal distance chamfer.
setTwoDistances | **RETIRED** 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
chamferType | **RETIRED** 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 | **RETIRED** 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.
cornerType | Gets and sets the type of corner to be modeled when multiple edges connect at a vertex.
edges **RETIRED** Gets and sets the edges being chamfered. Specific edges can be defined using one or more BRepEdge objects or BRepFace objects can be used to chamfer all edges of the face or Feature objects can be used to chamfer all edges associated with the input features. If BRepEdge objects are provided and the isTangentChain argument is true additional edges may also get chamfered if they are tangentially connected to any of the input edges. When getting the property, your code should check for the different types in the returned collection and handle it appropriately.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

This property returns nothing in the case where the feature is non-parametric.
edgeSets | Returns the edge sets associated with this chamfer.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 | **RETIRED** 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

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
Retired in version December 2020


ChamferFeature.chamferTypeDefinition Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

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
Retired in version December 2020


ChamferFeature.classType Method

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.cornerType Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Gets and sets the type of corner to be modeled when multiple edges connect at a vertex.

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.cornerType

# Set the value of the property.
chamferFeature_var.cornerType = propertyValue
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
ChamferCornerTypes propertyValue = chamferFeature_var->cornerType();

// Set the value of the property, where value_var is a ChamferCornerTypes.
bool returnValue = chamferFeature_var->cornerType(value_var);

Property Value

This is a read/write property whose value is a ChamferCornerTypes.

Version

Introduced in version December 2020


ChamferFeature.createForAssemblyContext Method

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the edges being chamfered. Specific edges can be defined using one or more BRepEdge objects or BRepFace objects can be used to chamfer all edges of the face or Feature objects can be used to chamfer all edges associated with the input features. If BRepEdge objects are provided and the isTangentChain argument is true additional edges may also get chamfered if they are tangentially connected to any of the input edges. When getting the property, your code should check for the different types in the returned collection and handle it appropriately.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

This property returns nothing in the case where the feature is non-parametric.

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
Retired in version December 2020


ChamferFeature.edgeSets Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the edge sets associated with this chamfer.

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.edgeSets
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<ChamferEdgeSets> propertyValue = chamferFeature_var->edgeSets();

Property Value

This is a read only property whose value is a ChamferEdgeSets.

Version

Introduced in version December 2020


ChamferFeature.entityToken Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.entityToken
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
string propertyValue = chamferFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ChamferFeature.errorOrWarningMessage Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be chamfered.

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
Retired in version December 2020


ChamferFeature.isValid Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Changes the type of chamfer to be a distance and angle chamfer.

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
Retired in version December 2020


ChamferFeature.setEqualDistance Method

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Changes the type of chamfer to be an equal distance chamfer.

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
Retired in version December 2020


ChamferFeature.setTwoDistances Method

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Changes the type of chamfer to be a two distances chamfer.

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
Retired in version December 2020


ChamferFeature.timelineObject Property

Parent Object: ChamferFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a chamfer feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** Adds a set of edges to this input.
setToEqualDistance | **RETIRED** Adds a set of edges to this input.
setToTwoDistances | **RETIRED** Adds a set of edges to this input.

Properties

Name | Description
chamferEdgeSets | Returns the collection of edge sets for this chamfer feature input.
cornerType | Gets and sets the type of corner to be modeled when multiple edges connect at a vertex.
edges **RETIRED** Gets and sets the collection of edges that will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | **RETIRED** 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, ChamferFeatures.createInput2

Samples

Name | Description
Equal Distance Chamfer Feature API Sample | 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.chamferEdgeSets Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

Returns the collection of edge sets for this chamfer feature input.

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.chamferEdgeSets
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
Ptr<ChamferEdgeSets> propertyValue = chamferFeatureInput_var->chamferEdgeSets();

Property Value

This is a read only property whose value is a ChamferEdgeSets.

Samples

Name | Description
chamferFeatures.add | Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.
Equal Distance Chamfer Feature API Sample | 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 December 2020


ChamferFeatureInput.classType Method

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.cornerType Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

Gets and sets the type of corner to be modeled when multiple edges connect at a vertex.

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.cornerType

# Set the value of the property.
chamferFeatureInput_var.cornerType = propertyValue
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
ChamferCornerTypes propertyValue = chamferFeatureInput_var->cornerType();

// Set the value of the property, where value_var is a ChamferCornerTypes.
bool returnValue = chamferFeatureInput_var->cornerType(value_var);

Property Value

This is a read/write property whose value is a ChamferCornerTypes.

Version

Introduced in version December 2020


ChamferFeatureInput.edges Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the collection of edges that will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Retired in version December 2020


ChamferFeatureInput.isTangentChain Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets if any edges that are tangentially connected to any of chamfered edges will also be included in the chamfer.

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
Retired in version December 2020


ChamferFeatureInput.isValid Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a set of edges to this input.

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
Retired in version December 2020


ChamferFeatureInput.setToEqualDistance Method

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a set of edges to this input.

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.

Version

Introduced in version November 2014
Retired in version December 2020


ChamferFeatureInput.setToTwoDistances Method

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a set of edges to this input.

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
Retired in version December 2020


ChamferFeatureInput.targetBaseFeature Property

Parent Object: ChamferFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Collection that provides access to all of the existing chamfer features in a component and supports the ability to create new chamfer features.

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 | **RETIRED** 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.
createInput2 | 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.chamferFeatures

Samples

Name | Description
Equal Distance Chamfer Feature API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Creates a new chamfer feature.

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
chamferFeatures.add | Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.
Equal Distance Chamfer Feature API Sample | 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

Description

Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.

Code Samples

  • Python
def demo_chamferFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    selection = _ui.selectEntity('Select edge to chamfer', 'Edges')
    edge : adsk.fusion.BRepEdge = selection.entity
    edgeCollection = adsk.core.ObjectCollection.create()
    edgeCollection.add(edge)

    chamfers = rootComp.features.chamferFeatures
    input = chamfers.createInput2()
    offset = adsk.core.ValueInput.createByReal(1)
    input.chamferEdgeSets.addEqualDistanceChamferEdgeSet(edgeCollection, offset, True)

    # Create the chamfer
    chamfer = chamfers.add(input)


ChamferFeatures.classType Method

Parent Object: ChamferFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

The number of chamfer features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

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.

Version

Introduced in version November 2014
Retired in version December 2020


ChamferFeatures.createInput2 Method

Parent Object: ChamferFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

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.

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
returnValue = chamferFeatures_var.createInput2()
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = chamferFeatures_var->createInput2();

Return Value

Type | Description
ChamferFeatureInput | Returns the newly created ChamferFeatureInput object or null if the creation failed.

Samples

Name | Description
chamferFeatures.add | Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.
Equal Distance Chamfer Feature API Sample | 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 December 2020


ChamferFeatures.isValid Property

Parent Object: ChamferFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Function that returns the specified chamfer feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

Function that returns the specified chamfer feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferTypeDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

The base class for the classes that define how a chamfer can be defined.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferTypeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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 March 2022


ChamferTypeDefinition.isValid Property

Parent Object: ChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferTypeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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 March 2022


ChamferTypeDefinition.objectType Property

Parent Object: ChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferTypeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 March 2022


ChamferTypeDefinition.parentFeature Property

Parent Object: ChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChamferTypeDefinition.h>

Description

Returns the feature that owns this chamfer type definition

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 March 2022


CheckBoxControlDefinition Object

Derived from: ControlDefinition Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


CheckBoxControlDefinition.classType Method

Parent Object: CheckBoxControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

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.

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.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isEnabled Property

Parent Object: CheckBoxControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

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.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isValid Property

Parent Object: CheckBoxControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

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.

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.

Version

Introduced in version August 2014


CheckBoxControlDefinition.name Property

Parent Object: CheckBoxControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

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.

Version

Introduced in version August 2014


CheckBoxControlDefinition.objectType Property

Parent Object: CheckBoxControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CheckBoxControlDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Provides access to the collection of child operations, folders and patterns of an existing setup.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMFolder.children, CAMHoleRecognition.children, CAMPattern.children, Setup.children

Version

Introduced in version January 2016


ChildOperationList.classType Method

Parent Object: ChildOperationList
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Gets the number of objects in the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Returns the specified item using an index into the collection.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Returns the operation, folder or pattern with the specified name (the name seen in the browser).

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

Returns the operation, folder or pattern with the specified operation id.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/ChildOperationList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ChoiceParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

A parameter value that is a list of choices.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
value | Get or set the value of the parameter. This value will correspond to one of the available values of the parameter.

Version

Introduced in version September 2021


ChoiceParameterValue.classType Method

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ChoiceParameterValue.classType()
This is a static method.

#include <Cam/Operations/ChoiceParameterValue.h>

returnValue = adsk::cam::ChoiceParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


ChoiceParameterValue.getChoices Method

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

Method that returns the list of available choices.

Syntax

  • Python
  • C++
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.

(returnValue, names, values) = choiceParameterValue_var.getChoices()

#include <Cam/Operations/ChoiceParameterValue.h

// Declare the output arguments.
string[] names;
string[] values;
boolean returnValue = choiceParameterValue_var->getChoices(names, values);

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 possible values returned by the values argument.
values | string[] | An array of the possible values. These coincide with the array of names returned by the names argument.

Version

Introduced in version September 2021


ChoiceParameterValue.isValid Property

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.

# Get the value of the property.
propertyValue = choiceParameterValue_var.isValid
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.
#include <Cam/Operations/ChoiceParameterValue.h>

// Get the value of the property.
boolean propertyValue = choiceParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


ChoiceParameterValue.objectType Property

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.

# Get the value of the property.
propertyValue = choiceParameterValue_var.objectType
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.
#include <Cam/Operations/ChoiceParameterValue.h>

// Get the value of the property.
string propertyValue = choiceParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


ChoiceParameterValue.parent Property

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.

# Get the value of the property.
propertyValue = choiceParameterValue_var.parent
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.
#include <Cam/Operations/ChoiceParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = choiceParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


ChoiceParameterValue.value Property

Parent Object: ChoiceParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ChoiceParameterValue.h>

Description

Get or set the value of the parameter. This value will correspond to one of the available values of the parameter.

Syntax

  • Python
  • C++
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.

# Get the value of the property.
propertyValue = choiceParameterValue_var.value

# Set the value of the property.
choiceParameterValue_var.value = propertyValue
"choiceParameterValue_var" is a variable referencing a ChoiceParameterValue object.
#include <Cam/Operations/ChoiceParameterValue.h>

// Get the value of the property.
string propertyValue = choiceParameterValue_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = choiceParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2021


ChoiceProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

A property that is a predefined list of choices.

This is most commonly used for properties associated with materials and appearances.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
value | Gets and sets the which choice is selected from the set of choices. The value is a string that matches one of the predefined 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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ChoiceProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Method that returns the list of available choices.

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

(returnValue, names, choices) = choiceProperty_var.getChoices()

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ChoiceProperty.h>

Description

Gets and sets the which choice is selected from the set of choices. The value is a string that matches one of the predefined choices. The names of the available choices can be obtained using GetChoices method.

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/Application/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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Provides access to the edges and the parameter associated with a chord length fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 fillet edge set from the fillet. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.
edges Gets and sets an ObjectCollection containing the BRepEdge, BRepFace, and Feature that are filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | Gets and sets the Tangent chain for fillet. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tangencyWeight | Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Accessed From

FilletEdgeSets.addChordLengthEdgeSet

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


ChordLengthFilletEdgeSet.chordLength Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


ChordLengthFilletEdgeSet.classType Method

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.continuity Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.continuity

# Set the value of the property.
chordLengthFilletEdgeSet_var.continuity = propertyValue
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = chordLengthFilletEdgeSet_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = chordLengthFilletEdgeSet_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2022


ChordLengthFilletEdgeSet.deleteMe Method

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Deletes the fillet edge set from the fillet.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
returnValue = chordLengthFilletEdgeSet_var.deleteMe()
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

returnValue = chordLengthFilletEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSet.edges Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Gets and sets an ObjectCollection containing the BRepEdge, BRepFace, and Feature that are filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


ChordLengthFilletEdgeSet.isTangentChain Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Gets and sets the Tangent chain for fillet. This enables tangent chain option for fillet.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.isTangentChain

# Set the value of the property.
chordLengthFilletEdgeSet_var.isTangentChain = propertyValue
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = chordLengthFilletEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chordLengthFilletEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


ChordLengthFilletEdgeSet.isValid Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ChordLengthFilletEdgeSet.tangencyWeight Property

Parent Object: ChordLengthFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSet.h>

Description

Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.tangencyWeight
"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->tangencyWeight();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput Object

Derived from: FilletEdgeSetInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Provides access to the edges and the parameter associated with a chord length fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets and sets a ValueInput object that defines the chord length of the fillet. If the ValueInput uses a real value 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") or if no units are specified it is interpreted using the current document units for length.
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.
entities | Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tangencyWeight | Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Accessed From

FilletEdgeSetInputs.addChordLengthEdgeSet

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.chordLength Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Gets and sets a ValueInput object that defines the chord length of the fillet. If the ValueInput uses a real value 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") or if no units are specified it is interpreted using the current document units for length.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.chordLength

# Set the value of the property.
chordLengthFilletEdgeSetInput_var.chordLength = propertyValue
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = chordLengthFilletEdgeSetInput_var->chordLength();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = chordLengthFilletEdgeSetInput_var->chordLength(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.classType Method

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChordLengthFilletEdgeSetInput.classType()
This is a static method.

#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

returnValue = adsk::fusion::ChordLengthFilletEdgeSetInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.continuity Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.continuity

# Set the value of the property.
chordLengthFilletEdgeSetInput_var.continuity = propertyValue
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = chordLengthFilletEdgeSetInput_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = chordLengthFilletEdgeSetInput_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.entities Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.entities

# Set the value of the property.
chordLengthFilletEdgeSetInput_var.entities = propertyValue
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = chordLengthFilletEdgeSetInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = chordLengthFilletEdgeSetInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.isValid Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.isValid
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
boolean propertyValue = chordLengthFilletEdgeSetInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.objectType Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.objectType
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
string propertyValue = chordLengthFilletEdgeSetInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


ChordLengthFilletEdgeSetInput.tangencyWeight Property

Parent Object: ChordLengthFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

Description

Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSetInput_var.tangencyWeight

# Set the value of the property.
chordLengthFilletEdgeSetInput_var.tangencyWeight = propertyValue
"chordLengthFilletEdgeSetInput_var" is a variable referencing a ChordLengthFilletEdgeSetInput object.
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = chordLengthFilletEdgeSetInput_var->tangencyWeight();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = chordLengthFilletEdgeSetInput_var->tangencyWeight(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


Circle2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Returns a NURBS curve that is geometrically identical to the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Gets and sets the center position of the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Creates and returns an independent copy of this Circle2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Creates a transient 2D circle object by specifying a center and radius.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Creates a transient 2D circle through three points.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Gets all of the data defining the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Gets and sets the radius of the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Sets all of the data defining the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Circle3D.asNurbsCurve Property

Parent Object: Circle3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Returns a NURBS curve that is geometrically identical to the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Gets and sets the center position of the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Creates and returns an independent copy of this Circle3D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Creates a transient 3D circle object by specifying a center and radius.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Creates a transient 3D circle through three points.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Gets all of the data defining the circle.

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 API Sample | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Circle3D.isValid Property

Parent Object: Circle3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Gets and sets the normal of the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Gets and sets the radius of the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Sets all of the data defining the circle.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Circle3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

A circular pattern constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
centerPoint | Gets and sets the sketch point that defines the center of the pattern.
createdEntities | Returns an array that contains all of the sketch entities that were created as a result of the pattern. This does not contain the original entities that were used as input to the pattern. The input entities can be obtained by using the entities property.
entities | Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isDeletable | Indicates if this constraint is deletable.
isSuppressed | Specifies which, if any, instances of the pattern are suppressed. This returns an array of Boolean values that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.
isSymmetric | Gets and sets if the angle extent is in one direction or is symmetric.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
quantity | Returns the parameter that controls the number of instances in the pattern. To change the value, use the properties on the returned ModelParameter object.
totalAngle | Returns the parameter that controls the number of instances in the pattern. A positive angle is a counter-clockwise direction and 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

CircularPatternConstraint.createForAssemblyContext, CircularPatternConstraint.nativeObject, GeometricConstraints.addCircularPattern

Version

Introduced in version March 2016


CircularPatternConstraint.assemblyContext Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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.centerPoint Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Gets and sets the sketch point that defines the center of the pattern.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.centerPoint

# Set the value of the property.
circularPatternConstraint_var.centerPoint = propertyValue
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = circularPatternConstraint_var->centerPoint();

// Set the value of the property, where value_var is a SketchPoint.
bool returnValue = circularPatternConstraint_var->centerPoint(value_var);

Property Value

This is a read/write property whose value is a SketchPoint.

Version

Introduced in version September 2022


CircularPatternConstraint.classType Method

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.createdEntities Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns an array that contains all of the sketch entities that were created as a result of the pattern. This does not contain the original entities that were used as input to the pattern. The input entities can be obtained by using the entities property.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.createdEntities
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = circularPatternConstraint_var->createdEntities();

Property Value

This is a read only property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


CircularPatternConstraint.createForAssemblyContext Method

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

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.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
returnValue = circularPatternConstraint_var.createForAssemblyContext(occurrence)
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

#include <Fusion/Sketch/CircularPatternConstraint.h>

returnValue = circularPatternConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CircularPatternConstraint | 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 2022


CircularPatternConstraint.deleteMe Method

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entities Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.entities

# Set the value of the property.
circularPatternConstraint_var.entities = propertyValue
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = circularPatternConstraint_var->entities();

// Set the value of the property, where value_var is a SketchEntity.
bool returnValue = circularPatternConstraint_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


CircularPatternConstraint.entityToken Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.entityToken
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
string propertyValue = circularPatternConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CircularPatternConstraint.isDeletable Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Indicates if this constraint is deletable.

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.isSuppressed Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Specifies which, if any, instances of the pattern are suppressed. This returns an array of Boolean values that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.isSuppressed

# Set the value of the property.
circularPatternConstraint_var.isSuppressed = propertyValue
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
std::vector<boolean> propertyValue = circularPatternConstraint_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternConstraint_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is an array of type boolean.

Version

Introduced in version September 2022


CircularPatternConstraint.isSymmetric Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Gets and sets if the angle extent is in one direction or is symmetric.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.isSymmetric

# Set the value of the property.
circularPatternConstraint_var.isSymmetric = propertyValue
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = circularPatternConstraint_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternConstraint_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


CircularPatternConstraint.isValid Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.nativeObject Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

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.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.nativeObject
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<CircularPatternConstraint> propertyValue = circularPatternConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a CircularPatternConstraint.

Version

Introduced in version September 2022


CircularPatternConstraint.objectType Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns the parent sketch object.

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


CircularPatternConstraint.quantity Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns the parameter that controls the number of instances in the pattern. To change the value, use the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.quantity
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = circularPatternConstraint_var->quantity();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


CircularPatternConstraint.totalAngle Property

Parent Object: CircularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraint.h>

Description

Returns the parameter that controls the number of instances in the pattern. A positive angle is a counter-clockwise direction and 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.

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.totalAngle
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = circularPatternConstraint_var->totalAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


CircularPatternConstraintInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

This class defines the methods and properties that pertain to the definition of a circular pattern in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
centerPoint | Gets and sets the sketch point that defines the center of the pattern.
entities | Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.
isSuppressed | Specifies which, if any, instances of the pattern are suppressed. This defaults to all instances being visible. This returns an array of Booleans that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.
isSymmetric | Gets and sets if the angle extent is in one direction or is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
quantity | Gets and sets quantity of the elements.
totalAngle | Gets and sets total angle. A positive angle is a counter-clockwise direction and 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

GeometricConstraints.createCircularPatternInput

Version

Introduced in version September 2022


CircularPatternConstraintInput.centerPoint Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Gets and sets the sketch point that defines the center of the pattern.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.centerPoint

# Set the value of the property.
circularPatternConstraintInput_var.centerPoint = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = circularPatternConstraintInput_var->centerPoint();

// Set the value of the property, where value_var is a SketchPoint.
bool returnValue = circularPatternConstraintInput_var->centerPoint(value_var);

Property Value

This is a read/write property whose value is a SketchPoint.

Version

Introduced in version September 2022


CircularPatternConstraintInput.classType Method

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CircularPatternConstraintInput.classType()
This is a static method.

#include <Fusion/Sketch/CircularPatternConstraintInput.h>

returnValue = adsk::fusion::CircularPatternConstraintInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2022


CircularPatternConstraintInput.entities Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.entities

# Set the value of the property.
circularPatternConstraintInput_var.entities = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = circularPatternConstraintInput_var->entities();

// Set the value of the property, where value_var is a SketchEntity.
bool returnValue = circularPatternConstraintInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


CircularPatternConstraintInput.isSuppressed Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Specifies which, if any, instances of the pattern are suppressed. This defaults to all instances being visible. This returns an array of Booleans that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.isSuppressed

# Set the value of the property.
circularPatternConstraintInput_var.isSuppressed = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
std::vector<boolean> propertyValue = circularPatternConstraintInput_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternConstraintInput_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is an array of type boolean.

Version

Introduced in version September 2022


CircularPatternConstraintInput.isSymmetric Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Gets and sets if the angle extent is in one direction or is symmetric.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.isSymmetric

# Set the value of the property.
circularPatternConstraintInput_var.isSymmetric = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
boolean propertyValue = circularPatternConstraintInput_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternConstraintInput_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


CircularPatternConstraintInput.isValid Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.isValid
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
boolean propertyValue = circularPatternConstraintInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2022


CircularPatternConstraintInput.objectType Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.objectType
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
string propertyValue = circularPatternConstraintInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2022


CircularPatternConstraintInput.quantity Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Gets and sets quantity of the elements.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.quantity

# Set the value of the property.
circularPatternConstraintInput_var.quantity = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = circularPatternConstraintInput_var->quantity();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = circularPatternConstraintInput_var->quantity(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


CircularPatternConstraintInput.totalAngle Property

Parent Object: CircularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CircularPatternConstraintInput.h>

Description

Gets and sets total angle. A positive angle is a counter-clockwise direction and 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.

Syntax

  • Python
  • C++
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.

# Get the value of the property.
propertyValue = circularPatternConstraintInput_var.totalAngle

# Set the value of the property.
circularPatternConstraintInput_var.totalAngle = propertyValue
"circularPatternConstraintInput_var" is a variable referencing a CircularPatternConstraintInput object.
#include <Fusion/Sketch/CircularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = circularPatternConstraintInput_var->totalAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = circularPatternConstraintInput_var->totalAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


CircularPatternFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Object that represents an existing circular pattern feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.).

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
isSymmetric Gets and sets if the angle extent is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.).

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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.entityToken Property

Parent Object: CircularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.entityToken
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
string propertyValue = circularPatternFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CircularPatternFeature.errorOrWarningMessage Property

Parent Object: CircularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Gets and sets if the angle extent is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Gets the PatternElements collection that contains the elements created by this pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Gets and sets the id's of the elements to suppress.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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<uinteger> propertyValue = circularPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = circularPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type uinteger.

Version

Introduced in version November 2014


CircularPatternFeature.timelineObject Property

Parent Object: CircularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a circular pattern feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

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.).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

Gets and sets if the angle extent is in one direction or symmetric.

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
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatureInput.isValid Property

Parent Object: CircularPatternFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

Description

Gets and sets quantity of the elements.

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
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatureInput.targetBaseFeature Property

Parent Object: CircularPatternFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatureInput.h>

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.

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
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

Creates a new circular pattern feature.

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
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


circularPatternFeatures.add

Description

Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.

Code Samples

  • Python
def demo_circularPatternFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the body to be pattern selected and add it to a collection.
    selectedBody = _ui.selectEntity('Select a body', 'Bodies').entity
    inputEntities = adsk.core.ObjectCollection.create()
    inputEntities.add(selectedBody)

    # Define the required inputs and create the feature.
    circularFeats = rootComp.features.circularPatternFeatures
    yAxis: adsk.core.Base = rootComp.yConstructionAxis
    circularFeatInput = circularFeats.createInput(inputEntities, yAxis)
    circularFeatInput.quantity = adsk.core.ValueInput.createByReal(5)
    circularFeatInput.totalAngle = adsk.core.ValueInput.createByString('180 deg')
    circularFeatInput.isSymmetric = False
    circularFeat = circularFeats.add(circularFeatInput)


CircularPatternFeatures.classType Method

Parent Object: CircularPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

The number of circular pattern features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

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.

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
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures.isValid Property

Parent Object: CircularPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

Function that returns the specified circular pattern feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

Function that returns the specified circular pattern feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CircularPatternFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


CloudFileDialog Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Provides access to a cloud file dialog. A cloud file dialog can be used to prompt the user to select a location and file on Fusion web client.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 canceled without selecting a file. The dataFile and dataFiles 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 canceled without giving a filename. The filename property can be used to get that file.

Properties

Name | Description
dataFile Gets the DataFile selected by the user in the dialog. This property is used after the ShowOpen method has been called to retrieve the filename specified by the user.

If ShowOpen was used and isMultiSelectEnabled is true, then this property will only display the first DataFile selected and the dataFiles property should be used instead to retrieved the full list. If ShowSave was used, then only a single DataFile is ever returned.
dataFiles Gets the DataFiles specified by the user in the dialog. This property is used after the ShowOpen method has been called to retrieve the DataFiles specified by the user.

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.
dataFolder Gets or sets the initial DataFolder displayed in the dialog. The DataFolder should be in current project. If null, this defaults to the DataFolder that is currently active in the Data Panel.

When using the showSave method, use this property to get the DataFolder that the user specified.
filename Gets and sets the filename when using the showSave method. If you set this value before using the showSave method, this will display the filename as the default in the dialog, but the user can change it. The default is an empty string, which indicates there is not an initial filename.

After calling the showSave method, use this property to get the filename the user specified. You can use this in combination with the dataFolder property to know where the user has specified to save the file.
filter Gets or sets the current file type filter. This controls the types of files displayed in the dialog. The filter consists of file extensions separated by a semi-colon. The string below is an example of the filter used by Fusion for the Open command.

"f3d;f2d;f2t;fbrd;fsch;flbr;fprj;prt;par;sldprt;sldasm;ipt;iam;stp;ste;step"

An empty string indicates that no filter should be used and all files in the current DataFolder should be displayed.
isMultiSelectEnabled | Gets or sets a value indicating whether the dialog allows multiple files to be selected. This defaults to False when a new CloudFileDialog is created. It is only used when using the showOpen 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
title | Gets or sets the title displayed on the dialog.

Accessed From

UserInterface.createCloudFileDialog

Version

Introduced in version October 2022


CloudFileDialog.classType Method

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CloudFileDialog.classType()
This is a static method.

#include <Core/UserInterface/CloudFileDialog.h>

returnValue = adsk::core::CloudFileDialog::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


CloudFileDialog.dataFile Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets the DataFile selected by the user in the dialog. This property is used after the ShowOpen method has been called to retrieve the filename specified by the user.

If ShowOpen was used and isMultiSelectEnabled is true, then this property will only display the first DataFile selected and the dataFiles property should be used instead to retrieved the full list. If ShowSave was used, then only a single DataFile is ever returned.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.dataFile
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = cloudFileDialog_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version October 2022


CloudFileDialog.dataFiles Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets the DataFiles specified by the user in the dialog. This property is used after the ShowOpen method has been called to retrieve the DataFiles specified by the user.

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.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.dataFiles
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
std::vector<Ptr<DataFile>> propertyValue = cloudFileDialog_var->dataFiles();

Property Value

This is a read only property whose value is an array of type DataFile.

Version

Introduced in version October 2022


CloudFileDialog.dataFolder Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets or sets the initial DataFolder displayed in the dialog. The DataFolder should be in current project. If null, this defaults to the DataFolder that is currently active in the Data Panel.

When using the showSave method, use this property to get the DataFolder that the user specified.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.dataFolder

# Set the value of the property.
cloudFileDialog_var.dataFolder = propertyValue
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = cloudFileDialog_var->dataFolder();

// Set the value of the property, where value_var is a DataFolder.
bool returnValue = cloudFileDialog_var->dataFolder(value_var);

Property Value

This is a read/write property whose value is a DataFolder.

Version

Introduced in version October 2022


CloudFileDialog.filename Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets and sets the filename when using the showSave method. If you set this value before using the showSave method, this will display the filename as the default in the dialog, but the user can change it. The default is an empty string, which indicates there is not an initial filename.

After calling the showSave method, use this property to get the filename the user specified. You can use this in combination with the dataFolder property to know where the user has specified to save the file.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.filename

# Set the value of the property.
cloudFileDialog_var.filename = propertyValue
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
string propertyValue = cloudFileDialog_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = cloudFileDialog_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CloudFileDialog.filter Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets or sets the current file type filter. This controls the types of files displayed in the dialog. The filter consists of file extensions separated by a semi-colon. The string below is an example of the filter used by Fusion for the Open command.

"f3d;f2d;f2t;fbrd;fsch;flbr;fprj;prt;par;sldprt;sldasm;ipt;iam;stp;ste;step"

An empty string indicates that no filter should be used and all files in the current DataFolder should be displayed.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.filter

# Set the value of the property.
cloudFileDialog_var.filter = propertyValue
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
string propertyValue = cloudFileDialog_var->filter();

// Set the value of the property, where value_var is a string.
bool returnValue = cloudFileDialog_var->filter(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CloudFileDialog.isMultiSelectEnabled Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets or sets a value indicating whether the dialog allows multiple files to be selected. This defaults to False when a new CloudFileDialog is created. It is only used when using the showOpen method.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.isMultiSelectEnabled

# Set the value of the property.
cloudFileDialog_var.isMultiSelectEnabled = propertyValue
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
boolean propertyValue = cloudFileDialog_var->isMultiSelectEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cloudFileDialog_var->isMultiSelectEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


CloudFileDialog.isValid Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.isValid
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
boolean propertyValue = cloudFileDialog_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


CloudFileDialog.objectType Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.objectType
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
string propertyValue = cloudFileDialog_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


CloudFileDialog.showOpen Method

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

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 canceled without selecting a file. The dataFile and dataFiles properties can be used to get the selected files.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
returnValue = cloudFileDialog_var.showOpen()
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

#include <Core/UserInterface/CloudFileDialog.h>

returnValue = cloudFileDialog_var->showOpen();

Return Value

Type | Description
DialogResults | Returns an enum value indicating which button was clicked on the dialog.

Version

Introduced in version October 2022


CloudFileDialog.showSave Method

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

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 canceled without giving a filename. The filename property can be used to get that file.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
returnValue = cloudFileDialog_var.showSave()
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

#include <Core/UserInterface/CloudFileDialog.h>

returnValue = cloudFileDialog_var->showSave();

Return Value

Type | Description
DialogResults | Returns an enum value indicating which button was clicked on the dialog.

Version

Introduced in version October 2022


CloudFileDialog.title Property

Parent Object: CloudFileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CloudFileDialog.h>

Description

Gets or sets the title displayed on the dialog.

Syntax

  • Python
  • C++
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.

# Get the value of the property.
propertyValue = cloudFileDialog_var.title

# Set the value of the property.
cloudFileDialog_var.title = propertyValue
"cloudFileDialog_var" is a variable referencing a CloudFileDialog object.
#include <Core/UserInterface/CloudFileDialog.h>

// Get the value of the property.
string propertyValue = cloudFileDialog_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = cloudFileDialog_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CoilFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Object that represents an existing coil primitive feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

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.

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.entityToken Property

Parent Object: CoilFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.entityToken
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
string propertyValue = coilFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CoilFeature.errorOrWarningMessage Property

Parent Object: CoilFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a coil feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the angle. Returns null in the case where the coilType property returns SpiralCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets and sets the base plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the section position of the coil. It defaults to InsideCoilSectionPosition.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the section type of the coil. It defaults to CircularCoilSectionType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the type of the coil.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets and sets the diameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the height. Returns null in the case where the coilType property returns RevolutionsAndPitchCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets and sets whether the rotation is clockwise or counter-clockwise. A value of true indicates clockwise rotation. It defaults to true.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets and sets the type of operation performed by the coil.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the pitch. Returns null in the case where the coilType property returns RevolutionsAndHeightCoilType or SpiralCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets the revolutions number. Returns null in the case where the coilType property returns HeightAndPitchCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Gets and sets the section size.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Sets the coil type to HeightAndPitchCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Sets the coil type to RevolutionsAndHeightCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Sets the coil type to RevolutionsAndPitchCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

Description

Sets the coil type to SpiralCoilType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

Collection that provides access to all of the existing coil features in a design and supports the ability to create new coil features.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.coilFeatures

Version

Introduced in version March 2015


CoilFeatures.classType Method

Parent Object: CoilFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

The number of coil features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

Function that returns the specified coil feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

Function that returns the specified coil feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CoilFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

A coincident constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

The sketch curve or point the point is constrained to.

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.entityToken Property

Parent Object: CoincidentConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.entityToken
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
string propertyValue = coincidentConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CoincidentConstraint.isDeletable Property

Parent Object: CoincidentConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentConstraint.h>

Description

Returns the sketch point that is constrained.

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


CoincidentToSurfaceConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

A sketch constraint defining that a point is coincident to a surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
point | Returns the sketch point that is constrained.
surface | Returns the BRepFace or ConstructionPlane the point is constrained to.

Accessed From

CoincidentToSurfaceConstraint.createForAssemblyContext, CoincidentToSurfaceConstraint.nativeObject, GeometricConstraints.addCoincidentToSurface

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.assemblyContext Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.assemblyContext
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = coincidentToSurfaceConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.attributes Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.attributes
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = coincidentToSurfaceConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.classType Method

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CoincidentToSurfaceConstraint.classType()
This is a static method.

#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

returnValue = adsk::fusion::CoincidentToSurfaceConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.createForAssemblyContext Method

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
returnValue = coincidentToSurfaceConstraint_var.createForAssemblyContext(occurrence)
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

returnValue = coincidentToSurfaceConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CoincidentToSurfaceConstraint | 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 2023


CoincidentToSurfaceConstraint.deleteMe Method

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
returnValue = coincidentToSurfaceConstraint_var.deleteMe()
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

returnValue = coincidentToSurfaceConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.entityToken Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.entityToken
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = coincidentToSurfaceConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.isDeletable Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Indicates if this constraint is deletable.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.isDeletable
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = coincidentToSurfaceConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.isValid Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.isValid
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = coincidentToSurfaceConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.nativeObject Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.nativeObject
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<CoincidentToSurfaceConstraint> propertyValue = coincidentToSurfaceConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a CoincidentToSurfaceConstraint.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.objectType Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.objectType
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = coincidentToSurfaceConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.parentSketch Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.parentSketch
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = coincidentToSurfaceConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.point Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Returns the sketch point that is constrained.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.point
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = coincidentToSurfaceConstraint_var->point();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version September 2023


CoincidentToSurfaceConstraint.surface Property

Parent Object: CoincidentToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

Description

Returns the BRepFace or ConstructionPlane the point is constrained to.

Syntax

  • Python
  • C++
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.

# Get the value of the property.
propertyValue = coincidentToSurfaceConstraint_var.surface
"coincidentToSurfaceConstraint_var" is a variable referencing a CoincidentToSurfaceConstraint object.
#include <Fusion/Sketch/CoincidentToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Base> propertyValue = coincidentToSurfaceConstraint_var->surface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


CollinearConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

A collinear constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: CollinearConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.entityToken
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
string propertyValue = collinearConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CollinearConstraint.isDeletable Property

Parent Object: CollinearConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Returns the first line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Returns the second line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/CollinearConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

The Color class wraps all of the information that defines a simple color.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity | Gets and sets the opacity of the color. The value can be 0 to 255. A value of 0 is transparent and 255 is opaque.
red | Gets and sets the red component of the color. The value can be 0 to 255.

Accessed From

Color.create, ColorControlPoint.value, ColorGraphNodeProperty.value, ColorProperty.value, ColorProperty.values, Component.componentColor, CustomGraphicsBasicMaterialColorEffect.ambientColor, CustomGraphicsBasicMaterialColorEffect.diffuseColor, CustomGraphicsBasicMaterialColorEffect.emissiveColor, CustomGraphicsBasicMaterialColorEffect.specularColor, CustomGraphicsCoordinates.getColor, CustomGraphicsShowThroughColorEffect.color, CustomGraphicsSolidColorEffect.color, FlatPatternComponent.componentColor, SceneSettings.backgroundSolidColor, SectionAnalysis.sectionColor, SectionAnalysisInput.sectionColor, VolumetricColorSample.value

Version

Introduced in version August 2014


Color.blue Property

Parent Object: Color
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Gets and sets the blue component of the color. The value can be 0 to 255.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Creates a new color.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Gets all of the information defining this color.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Gets and sets the green component of the color. The value can be 0 to 255.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Gets and sets the opacity of the color. The value can be 0 to 255. A value of 0 is transparent and 255 is opaque.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Gets and sets the red component of the color. The value can be 0 to 255.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Color.h>

Description

Sets all of the color information.

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


ColorControlPoint Object

ColorControlPoint Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A read-only structure that represents a control point used in ColorControlPointMapGraphNodeProperty.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
interpolator | The interpolator function.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameter | The parameter inside the input domain of the control point map for this point.
value | The output color value of the control point for this point.

Accessed From

ColorControlPointMapGraphNodeProperty.getPoint

Version

Introduced in version May 2025


ColorControlPoint.classType Method

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ColorControlPoint.classType()
This is a static method.

#include <Volume/Volumetric/ColorControlPoint.h>

returnValue = adsk::volume::ColorControlPoint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ColorControlPoint.interpolator Property

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

The interpolator function.

Syntax

  • Python
  • C++
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.

# Get the value of the property.
propertyValue = colorControlPoint_var.interpolator
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.
#include <Volume/Volumetric/ColorControlPoint.h>

// Get the value of the property.
ControlPointInterpolators propertyValue = colorControlPoint_var->interpolator();

Property Value

This is a read only property whose value is a ControlPointInterpolators.

Version

Introduced in version May 2025


ColorControlPoint.isValid Property

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.

# Get the value of the property.
propertyValue = colorControlPoint_var.isValid
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.
#include <Volume/Volumetric/ColorControlPoint.h>

// Get the value of the property.
boolean propertyValue = colorControlPoint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ColorControlPoint.objectType Property

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.

# Get the value of the property.
propertyValue = colorControlPoint_var.objectType
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.
#include <Volume/Volumetric/ColorControlPoint.h>

// Get the value of the property.
string propertyValue = colorControlPoint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorControlPoint.parameter Property

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

The parameter inside the input domain of the control point map for this point.

Syntax

  • Python
  • C++
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.

# Get the value of the property.
propertyValue = colorControlPoint_var.parameter
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.
#include <Volume/Volumetric/ColorControlPoint.h>

// Get the value of the property.
double propertyValue = colorControlPoint_var->parameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


ColorControlPoint.value Property

Parent Object: ColorControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPoint.h>

Description

The output color value of the control point for this point.

Syntax

  • Python
  • C++
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.

# Get the value of the property.
propertyValue = colorControlPoint_var.value
"colorControlPoint_var" is a variable referencing a ColorControlPoint object.
#include <Volume/Volumetric/ColorControlPoint.h>

// Get the value of the property.
Ptr<Color> propertyValue = colorControlPoint_var->value();

Property Value

This is a read only property whose value is a Color.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty Object

ColorControlPointMapGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that defines a complex mapping curve from an input domain of double values to an output range of color values. The mapping is represented by a set of points ordered by their domain value parameters. For a given input value, the output value is interpolated from the values of the two points before and after it using the specified interpolation function for each point.

Methods

Name | Description
addPoint | Add a point to the map.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Remove all points from the map.
getPoint | Get the point at index.
removePoint | Remove a point from the map.

Properties

Name | Description
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointCount | The number of points.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.addPoint Method

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Add a point to the map.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
returnValue = colorControlPointMapGraphNodeProperty_var.addPoint(parameter, value, interpolator)
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

returnValue = colorControlPointMapGraphNodeProperty_var->addPoint(parameter, value, interpolator);

Return Value

Type | Description
boolean | True if successfully added.

Parameters

Name | Type | Description
parameter | double | Where in the input domain where the point lies.
value | Color | The color value of the parameter in the output domain.
interpolator | ControlPointInterpolators | The function used to interpolate an output value for a input parameter between this point and the next.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.classType Method

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ColorControlPointMapGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

returnValue = adsk::volume::ColorControlPointMapGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.clear Method

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Remove all points from the map.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
returnValue = colorControlPointMapGraphNodeProperty_var.clear()
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

returnValue = colorControlPointMapGraphNodeProperty_var->clear();

Return Value

Type | Description
boolean | True if successfully cleared.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.description Property

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorControlPointMapGraphNodeProperty_var.description
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorControlPointMapGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.getPoint Method

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Get the point at index.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
returnValue = colorControlPointMapGraphNodeProperty_var.getPoint(index)
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

returnValue = colorControlPointMapGraphNodeProperty_var->getPoint(index);

Return Value

Type | Description
ColorControlPoint | The control point at this index.

Parameters

Name | Type | Description
index | uinteger | Index of the point to get.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.isValid Property

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorControlPointMapGraphNodeProperty_var.isValid
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = colorControlPointMapGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.name Property

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorControlPointMapGraphNodeProperty_var.name
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorControlPointMapGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.objectType Property

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorControlPointMapGraphNodeProperty_var.objectType
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorControlPointMapGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.pointCount Property

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

The number of points.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorControlPointMapGraphNodeProperty_var.pointCount
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

// Get the value of the property.
uinteger propertyValue = colorControlPointMapGraphNodeProperty_var->pointCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


ColorControlPointMapGraphNodeProperty.removePoint Method

Parent Object: ColorControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

Description

Remove a point from the map.

Syntax

  • Python
  • C++
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.
returnValue = colorControlPointMapGraphNodeProperty_var.removePoint(index)
"colorControlPointMapGraphNodeProperty_var" is a variable referencing a ColorControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ColorControlPointMapGraphNodeProperty.h>

returnValue = colorControlPointMapGraphNodeProperty_var->removePoint(index);

Return Value

Type | Description
boolean | True if successfully removed.

Parameters

Name | Type | Description
index | uinteger | Index of the point to remove.

Version

Introduced in version May 2025


ColorGraphNodeProperty Object

ColorGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a color.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


ColorGraphNodeProperty.classType Method

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ColorGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/ColorGraphNodeProperty.h>

returnValue = adsk::volume::ColorGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ColorGraphNodeProperty.description Property

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorGraphNodeProperty_var.description
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.
#include <Volume/Volumetric/ColorGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorGraphNodeProperty.isValid Property

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorGraphNodeProperty_var.isValid
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.
#include <Volume/Volumetric/ColorGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = colorGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ColorGraphNodeProperty.name Property

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorGraphNodeProperty_var.name
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.
#include <Volume/Volumetric/ColorGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorGraphNodeProperty.objectType Property

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorGraphNodeProperty_var.objectType
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.
#include <Volume/Volumetric/ColorGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = colorGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ColorGraphNodeProperty.value Property

Parent Object: ColorGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ColorGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.

# Get the value of the property.
propertyValue = colorGraphNodeProperty_var.value

# Set the value of the property.
colorGraphNodeProperty_var.value = propertyValue
"colorGraphNodeProperty_var" is a variable referencing a ColorGraphNodeProperty object.
#include <Volume/Volumetric/ColorGraphNodeProperty.h>

// Get the value of the property.
Ptr<Color> propertyValue = colorGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a Color.
bool returnValue = colorGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version May 2025


ColorProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

A property that defines a color.

This is most commonly used for properties associated with materials and appearances.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Used for appearances and 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ColorProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Used for appearances and 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.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

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.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Indicates if this property has multiple values or not.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

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.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/ColorProperty.h>

Description

Gets and sets the values associated with this property. The HasMultipleValues property indicates if this property will be returning more than one value.

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/Application/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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Object that represents an existing Combine feature in a design. In non-parametric environment this object does not exist.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
parentComponent | Returns the parent component that owns this feature.
targetBody
timelineObject | Returns the timeline object associated with this feature.
toolBodies

Accessed From

CombineFeature.createForAssemblyContext, CombineFeature.nativeObject, CombineFeatures.add, CombineFeatures.item, CombineFeatures.itemByName

Version

Introduced in version November 2014


CombineFeature.assemblyContext Property

Parent Object: CombineFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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.entityToken Property

Parent Object: CombineFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.entityToken
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
string propertyValue = combineFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CombineFeature.errorOrWarningMessage Property

Parent Object: CombineFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Gets and sets a boolean value for whether or not the tool bodies are retrained after the combine results.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Gets a boolean value for whether or not a new component was created when this feature was created.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeature.h>

Description

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a combine feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
toolBodies

Accessed From

CombineFeatures.createInput

Version

Introduced in version November 2014


CombineFeatureInput.classType Method

Parent Object: CombineFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

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.

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.

Samples

Name | Description
combineFeatures.add | Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Version

Introduced in version November 2014


CombineFeatureInput.isValid Property

Parent Object: CombineFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

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.

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.

Samples

Name | Description
combineFeatures.add | Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Version

Introduced in version November 2014


CombineFeatureInput.targetBaseFeature Property

Parent Object: CombineFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatureInput.h>

Description

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Collection that provides access to all of the existing Combine features in a component and supports the ability to create new Combine features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.combineFeatures

Version

Introduced in version November 2014


CombineFeatures.add Method

Parent Object: CombineFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Creates a new combine feature.

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.

Samples

Name | Description
combineFeatures.add | Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Version

Introduced in version November 2014


combineFeatures.add

Description

Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Code Samples

  • Python
def demo_combineFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the two bodies selected.
    targetBody = _ui.selectEntity('Select a body', 'Bodies').entity
    toolBody = _ui.selectEntity('Select Bodies', 'Bodies').entity

    # Define the required inputs and create te combine feature.
    combineFeatures = rootComp.features.combineFeatures
    tools = adsk.core.ObjectCollection.create()
    tools.add(toolBody)
    input: adsk.fusion.CombineFeatureInput = combineFeatures.createInput(targetBody, tools)
    input.isNewComponent = False
    input.isKeepToolBodies = False
    input.operation = adsk.fusion.FeatureOperations.JoinFeatureOperation
    combineFeature = combineFeatures.add(input)


CombineFeatures.classType Method

Parent Object: CombineFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

The number of combine features in the collection. This property returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

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.

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.

Samples

Name | Description
combineFeatures.add | Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Version

Introduced in version November 2014


CombineFeatures.isValid Property

Parent Object: CombineFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Function that returns the specified combine feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

Function that returns the specified combine feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CombineFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

Methods

Name | Description
beginStep | Preview Begin a transacted step within the command's transaction. If the all of the command inputs are valid, this will trigger the execute event for the current step.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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.
setDialogSize | Sets the size of the dialog and overrides any size. This can be used when the command is created or anytime while the command is running. If the height is zero, the dialog will be sized to fit the command inputs currently displayed.

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.
editingFeature | Preview Sets the editing feature for this command. The timeline will be rolled to the editing feature on activate and will the current position will be restored on deactivate.
hasDistinctSelectionSets Preview Determines if this selection input shares a common selection set with the other selection inputs of this command or its own unique selection set. The default is False, which means each selection input will have its own selection set. This means that the items in this selection set are only shown as selected when this selection input is active. As a result, other selection inputs associated with this command can select those same entities.

If this is True, then all selection inputs share a selection set, which means that when entities are selected by any of the selection inputs of this command, they will remain selected regardless of which command input is active. This has the side effect that once an entity is selected, it cannot be selected again by another selection input.
helpFile | Gets and sets the associated HTML help file for this command.
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 preempted 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 commands, 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
incomingFromHTML | This event is fired when the JavaScript associated with the HTML displayed in a BrowserCommandInput calls the adsk.fusionSendData function and when the JavaScript responds to the sendInfoToHTML call. The HTMLEventArgs provided by the event indicates which BrowserCommandInput triggered the event.
inputChanged | Gets an event that is fired whenever an input value is changed.
keyDown | Gets 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.
navigatingURL | This event is fired when a navigation event occurs on the page displayed within a BrowserCommandInput. This allows the add-in to determine how this navigation should be handled by the browser. The NavigationEventArgs provided by the event indicates which BrowserCommandInput triggered the event.
preSelect This event is used to be able to participate 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 referred to as the "preselect" 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 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 event, 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.
preSelectStart As the mouse moves over entities in the graphics window, entities valid for selection are highlighted. Before an entity is highlighted, Fusion determines if it is a valid selectable entity using the selection filter defined on the SelectionCommandInput and the preSelect event of the command. The preSelectStart event fires when the mouse first moves over an entity valid for selection. You can obtain the entity and mouse position from the Selection object returned by the selection property of the SelectionEventArgs object provided through the event.

Some related events are the preSelectMouseMove event, which fires as the mouse moves across the entity, and the preSelectEnd event, which fires when the mouse moves off the entity.
select This even fires when the user selects an entity. This is different from the preselect 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 | **RETIRED** Provides a notification when the mouse passes over an entity allowing you to determine if the entity should be available for selection or not.
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.

The timing of this event is indeterminate and not always tied to the editing of an input. There are cases where this isn't fired when an input is edited. This happens when an input is able to validate its content on its own. For example, if you enter an invalid value for a ValueCommandInput, it can evaluate this on its own, and as a result, the validate inputs event is not fired. Fusion will sometimes fire this event at other random times that are not tied to the edit of an input.

If you want to be notified when an input changes, you should use the input changed event instead.

Accessed From

AngleValueCommandInput.parentCommand, BoolValueCommandInput.parentCommand, BrowserCommandInput.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, SeparatorCommandInput.parentCommand, SliderCommandInput.parentCommand, StringValueCommandInput.parentCommand, TabCommandInput.parentCommand, TableCommandInput.parentCommand, TextBoxCommandInput.parentCommand, TriadCommandInput.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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


Command.activate Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the command is first activated or re-activated after being suspended.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_activate" is the event handler function.
futil.add_handler(command_var.activate, command_activate, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the activate event.
def command_activate(args: adsk.core.CommandEventArgs):
    # Code to react to the event.
    app.log('In command_activate event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyActivateHandler" is the name of the class that handles the event.
onActivate = MyActivateHandler()
command_var.activate.add(onActivate)
handlers.append(onActivate)

-------- Event handler class definition ---------
# Event handler for the activate event.
class MyActivateHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandEventArgs):
        # Code to react to the event.
        app.log('In MyActivateHandler event handler.')
--------- 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.beginStep Method

Parent Object: Command

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Begin a transacted step within the command's transaction. If the all of the command inputs are valid, this will trigger the execute event for the current step.

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
# Uses no optional arguments.
returnValue = command_var.beginStep()

# Uses optional arguments.
returnValue = command_var.beginStep(makeExistingStepNonUndoable)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

// Uses no optional arguments.
returnValue = command_var->beginStep();

// Uses optional arguments.
returnValue = command_var->beginStep(makeExistingStepNonUndoable);

Return Value

Type | Description
boolean | Returns true if beginning the step was successful.

Parameters

Name | Type | Description
makeExistingStepNonUndoable | boolean | If true the current step will not be undo-able. This is an optional argument whose default value is False.

Version

Introduced in version January 2021


Command.cancelButtonText Property

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets and sets the text displayed on the Cancel button. The value of this property is ignored if the isCancelButtonVisible property is false.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the command is deactivated. The command still exists and could still be activated again.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_deactivate" is the event handler function.
futil.add_handler(command_var.deactivate, command_deactivate, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the deactivate event.
def command_deactivate(args: adsk.core.CommandEventArgs):
    # Code to react to the event.
    app.log('In command_deactivate event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyDeactivateHandler" is the name of the class that handles the event.
onDeactivate = MyDeactivateHandler()
command_var.deactivate.add(onDeactivate)
handlers.append(onDeactivate)

-------- Event handler class definition ---------
# Event handler for the deactivate event.
class MyDeactivateHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandEventArgs):
        # Code to react to the event.
        app.log('In MyDeactivateHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the command is destroyed. The command is destroyed and can be cleaned up.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_destroy" is the event handler function.
futil.add_handler(command_var.destroy, command_destroy, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the destroy event.
def command_destroy(args: adsk.core.CommandEventArgs):
    # Code to react to the event.
    app.log('In command_destroy event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyDestroyHandler" is the name of the class that handles the event.
onDestroy = MyDestroyHandler()
command_var.destroy.add(onDestroy)
handlers.append(onDestroy)

-------- Event handler class definition ---------
# Event handler for the destroy event.
class MyDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandEventArgs):
        # Code to react to the event.
        app.log('In MyDestroyHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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 undo-able 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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.editingFeature Property

Parent Object: Command

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Sets the editing feature for this command. The timeline will be rolled to the editing feature on activate and will the current position will be restored on deactivate.

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.editingFeature

# Set the value of the property.
command_var.editingFeature = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
Ptr<Base> propertyValue = command_var->editingFeature();

// Set the value of the property, where value_var is a Base.
bool returnValue = command_var->editingFeature(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2021


Command.execute Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_execute" is the event handler function.
futil.add_handler(command_var.execute, command_execute, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the execute event.
def command_execute(args: adsk.core.CommandEventArgs):
    # Code to react to the event.
    app.log('In command_execute event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyExecuteHandler" is the name of the class that handles the event.
onExecute = MyExecuteHandler()
command_var.execute.add(onExecute)
handlers.append(onExecute)

-------- Event handler class definition ---------
# Event handler for the execute event.
class MyExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandEventArgs):
        # Code to react to the event.
        app.log('In MyExecuteHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the command has completed gathering the required input and now needs to perform a preview.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_executePreview" is the event handler function.
futil.add_handler(command_var.executePreview, command_executePreview, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the executePreview event.
def command_executePreview(args: adsk.core.CommandEventArgs):
    # Code to react to the event.
    app.log('In command_executePreview event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyExecutePreviewHandler" is the name of the class that handles the event.
onExecutePreview = MyExecutePreviewHandler()
command_var.executePreview.add(onExecutePreview)
handlers.append(onExecutePreview)

-------- Event handler class definition ---------
# Event handler for the executePreview event.
class MyExecutePreviewHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandEventArgs):
        # Code to react to the event.
        app.log('In MyExecutePreviewHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets the custom cursor information currently being used.

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.hasDistinctSelectionSets Property

Parent Object: Command

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Determines if this selection input shares a common selection set with the other selection inputs of this command or its own unique selection set. The default is False, which means each selection input will have its own selection set. This means that the items in this selection set are only shown as selected when this selection input is active. As a result, other selection inputs associated with this command can select those same entities.

If this is True, then all selection inputs share a selection set, which means that when entities are selected by any of the selection inputs of this command, they will remain selected regardless of which command input is active. This has the side effect that once an entity is selected, it cannot be selected again by another selection input.

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.hasDistinctSelectionSets

# Set the value of the property.
command_var.hasDistinctSelectionSets = 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->hasDistinctSelectionSets();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->hasDistinctSelectionSets(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2024


Command.helpFile Property

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets and sets the associated HTML help file for this command.

Remarks

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 property 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.

<html>
  <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.

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.incomingFromHTML Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This event is fired when the JavaScript associated with the HTML displayed in a BrowserCommandInput calls the adsk.fusionSendData function and when the JavaScript responds to the sendInfoToHTML call. The HTMLEventArgs provided by the event indicates which BrowserCommandInput triggered the event.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_incomingFromHTML" is the event handler function.
futil.add_handler(command_var.incomingFromHTML, command_incomingFromHTML, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the incomingFromHTML event.
def command_incomingFromHTML(args: adsk.core.HTMLEventArgs):
    # Code to react to the event.
    app.log('In command_incomingFromHTML event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyIncomingFromHTMLHandler" is the name of the class that handles the event.
onIncomingFromHTML = MyIncomingFromHTMLHandler()
command_var.incomingFromHTML.add(onIncomingFromHTML)
handlers.append(onIncomingFromHTML)

-------- Event handler class definition ---------
# Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.HTMLEventArgs):
        # Code to react to the event.
        app.log('In MyIncomingFromHTMLHandler event handler.')
--------- Required include files. ---------
#include <Core/UserInterface/Command.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. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<HTMLEvent> incomingFromHTMLEvent = command_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 July 2021


Command.inputChanged Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired whenever an input value is changed.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_inputChanged" is the event handler function.
futil.add_handler(command_var.inputChanged, command_inputChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the inputChanged event.
def command_inputChanged(args: adsk.core.InputChangedEventArgs):
    # Code to react to the event.
    app.log('In command_inputChanged event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyInputChangedHandler" is the name of the class that handles the event.
onInputChanged = MyInputChangedHandler()
command_var.inputChanged.add(onInputChanged)
handlers.append(onInputChanged)

-------- Event handler class definition ---------
# Event handler for the inputChanged event.
class MyInputChangedHandler(adsk.core.InputChangedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.InputChangedEventArgs):
        # Code to react to the event.
        app.log('In MyInputChangedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Specifies what the behavior will be when a command is preempted 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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 commands, 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets and Sets if this command is repeatable using the 'Repeat Last Command' option from the Fusion marking menu.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when a key on the keyboard is pressed down.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_keyDown" is the event handler function.
futil.add_handler(command_var.keyDown, command_keyDown, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the keyDown event.
def command_keyDown(args: adsk.core.KeyboardEventArgs):
    # Code to react to the event.
    app.log('In command_keyDown event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyKeyDownHandler" is the name of the class that handles the event.
onKeyDown = MyKeyDownHandler()
command_var.keyDown.add(onKeyDown)
handlers.append(onKeyDown)

-------- Event handler class definition ---------
# Event handler for the keyDown event.
class MyKeyDownHandler(adsk.core.KeyboardEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.KeyboardEventArgs):
        # Code to react to the event.
        app.log('In MyKeyDownHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when a key on the keyboard goes up.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_keyUp" is the event handler function.
futil.add_handler(command_var.keyUp, command_keyUp, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the keyUp event.
def command_keyUp(args: adsk.core.KeyboardEventArgs):
    # Code to react to the event.
    app.log('In command_keyUp event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyKeyUpHandler" is the name of the class that handles the event.
onKeyUp = MyKeyUpHandler()
command_var.keyUp.add(onKeyUp)
handlers.append(onKeyUp)

-------- Event handler class definition ---------
# Event handler for the keyUp event.
class MyKeyUpHandler(adsk.core.KeyboardEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.KeyboardEventArgs):
        # Code to react to the event.
        app.log('In MyKeyUpHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse is clicked, (a button is pressed and released).

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseClick" is the event handler function.
futil.add_handler(command_var.mouseClick, command_mouseClick, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseClick event.
def command_mouseClick(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseClick event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseClickHandler" is the name of the class that handles the event.
onMouseClick = MyMouseClickHandler()
command_var.mouseClick.add(onMouseClick)
handlers.append(onMouseClick)

-------- Event handler class definition ---------
# Event handler for the mouseClick event.
class MyMouseClickHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseClickHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse is double-clicked, (clicked twice within the time specified by a system setting.)

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseDoubleClick" is the event handler function.
futil.add_handler(command_var.mouseDoubleClick, command_mouseDoubleClick, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseDoubleClick event.
def command_mouseDoubleClick(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseDoubleClick event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseDoubleClickHandler" is the name of the class that handles the event.
onMouseDoubleClick = MyMouseDoubleClickHandler()
command_var.mouseDoubleClick.add(onMouseDoubleClick)
handlers.append(onMouseDoubleClick)

-------- Event handler class definition ---------
# Event handler for the mouseDoubleClick event.
class MyMouseDoubleClickHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseDoubleClickHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when a mouse button is pressed.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseDown" is the event handler function.
futil.add_handler(command_var.mouseDown, command_mouseDown, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseDown event.
def command_mouseDown(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseDown event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseDownHandler" is the name of the class that handles the event.
onMouseDown = MyMouseDownHandler()
command_var.mouseDown.add(onMouseDown)
handlers.append(onMouseDown)

-------- Event handler class definition ---------
# Event handler for the mouseDown event.
class MyMouseDownHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseDownHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse is in drag mode, (being moved while a button is pressed).

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseDrag" is the event handler function.
futil.add_handler(command_var.mouseDrag, command_mouseDrag, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseDrag event.
def command_mouseDrag(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseDrag event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseDragHandler" is the name of the class that handles the event.
onMouseDrag = MyMouseDragHandler()
command_var.mouseDrag.add(onMouseDrag)
handlers.append(onMouseDrag)

-------- Event handler class definition ---------
# Event handler for the mouseDrag event.
class MyMouseDragHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseDragHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when a mouse drag starts, (the mouse is pressed and moved).

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseDragBegin" is the event handler function.
futil.add_handler(command_var.mouseDragBegin, command_mouseDragBegin, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseDragBegin event.
def command_mouseDragBegin(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseDragBegin event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseDragBeginHandler" is the name of the class that handles the event.
onMouseDragBegin = MyMouseDragBeginHandler()
command_var.mouseDragBegin.add(onMouseDragBegin)
handlers.append(onMouseDragBegin)

-------- Event handler class definition ---------
# Event handler for the mouseDragBegin event.
class MyMouseDragBeginHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseDragBeginHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse button is released after a drag.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseDragEnd" is the event handler function.
futil.add_handler(command_var.mouseDragEnd, command_mouseDragEnd, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseDragEnd event.
def command_mouseDragEnd(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseDragEnd event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseDragEndHandler" is the name of the class that handles the event.
onMouseDragEnd = MyMouseDragEndHandler()
command_var.mouseDragEnd.add(onMouseDragEnd)
handlers.append(onMouseDragEnd)

-------- Event handler class definition ---------
# Event handler for the mouseDragEnd event.
class MyMouseDragEndHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseDragEndHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse is moved.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseMove" is the event handler function.
futil.add_handler(command_var.mouseMove, command_mouseMove, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseMove event.
def command_mouseMove(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseMove event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseMoveHandler" is the name of the class that handles the event.
onMouseMove = MyMouseMoveHandler()
command_var.mouseMove.add(onMouseMove)
handlers.append(onMouseMove)

-------- Event handler class definition ---------
# Event handler for the mouseMove event.
class MyMouseMoveHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseMoveHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when a mouse button is released.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseUp" is the event handler function.
futil.add_handler(command_var.mouseUp, command_mouseUp, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseUp event.
def command_mouseUp(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseUp event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseUpHandler" is the name of the class that handles the event.
onMouseUp = MyMouseUpHandler()
command_var.mouseUp.add(onMouseUp)
handlers.append(onMouseUp)

-------- Event handler class definition ---------
# Event handler for the mouseUp event.
class MyMouseUpHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseUpHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired when the mouse wheel is rotated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_mouseWheel" is the event handler function.
futil.add_handler(command_var.mouseWheel, command_mouseWheel, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the mouseWheel event.
def command_mouseWheel(args: adsk.core.MouseEventArgs):
    # Code to react to the event.
    app.log('In command_mouseWheel event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyMouseWheelHandler" is the name of the class that handles the event.
onMouseWheel = MyMouseWheelHandler()
command_var.mouseWheel.add(onMouseWheel)
handlers.append(onMouseWheel)

-------- Event handler class definition ---------
# Event handler for the mouseWheel event.
class MyMouseWheelHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MouseEventArgs):
        # Code to react to the event.
        app.log('In MyMouseWheelHandler event handler.')
--------- 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.navigatingURL Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This event is fired when a navigation event occurs on the page displayed within a BrowserCommandInput. This allows the add-in to determine how this navigation should be handled by the browser. The NavigationEventArgs provided by the event indicates which BrowserCommandInput triggered the event.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_navigatingURL" is the event handler function.
futil.add_handler(command_var.navigatingURL, command_navigatingURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the navigatingURL event.
def command_navigatingURL(args: adsk.core.NavigationEventArgs):
    # Code to react to the event.
    app.log('In command_navigatingURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyNavigatingURLHandler" is the name of the class that handles the event.
onNavigatingURL = MyNavigatingURLHandler()
command_var.navigatingURL.add(onNavigatingURL)
handlers.append(onNavigatingURL)

-------- Event handler class definition ---------
# Event handler for the navigatingURL event.
class MyNavigatingURLHandler(adsk.core.NavigationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.NavigationEventArgs):
        # Code to react to the event.
        app.log('In MyNavigatingURLHandler event handler.')
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/NavigationEvent.h>
#include <Core/UserInterface/NavigationEventHandler.h>
#include <Core/UserInterface/NavigationEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the navigatingURL event.
class MyNavigatingURLEventHandler : public adsk::core::NavigationEventHandler
{
public:
    void notify(const Ptr<NavigationEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyNavigatingURLEventHandler event handler.");
    }
} _navigatingURL;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<NavigationEvent> navigatingURLEvent = command_var->navigatingURL();
if (!navigatingURLEvent)
    return;

bool isOk = navigatingURLEvent->add(&_navigatingURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a NavigationEvent.

Version

Introduced in version July 2021


Command.objectType Property

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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".

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets the parent CommandDefinition object.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


Command.preSelect Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This event is used to be able to participate 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 referred to as the "preselect" 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 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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_preSelect" is the event handler function.
futil.add_handler(command_var.preSelect, command_preSelect, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the preSelect event.
def command_preSelect(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_preSelect event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyPreSelectHandler" is the name of the class that handles the event.
onPreSelect = MyPreSelectHandler()
command_var.preSelect.add(onPreSelect)
handlers.append(onPreSelect)

-------- Event handler class definition ---------
# Event handler for the preSelect event.
class MyPreSelectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MyPreSelectHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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 event, 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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_preSelectEnd" is the event handler function.
futil.add_handler(command_var.preSelectEnd, command_preSelectEnd, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the preSelectEnd event.
def command_preSelectEnd(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_preSelectEnd event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyPreSelectEndHandler" is the name of the class that handles the event.
onPreSelectEnd = MyPreSelectEndHandler()
command_var.preSelectEnd.add(onPreSelectEnd)
handlers.append(onPreSelectEnd)

-------- Event handler class definition ---------
# Event handler for the preSelectEnd event.
class MyPreSelectEndHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MyPreSelectEndHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_preSelectMouseMove" is the event handler function.
futil.add_handler(command_var.preSelectMouseMove, command_preSelectMouseMove, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the preSelectMouseMove event.
def command_preSelectMouseMove(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_preSelectMouseMove event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyPreSelectMouseMoveHandler" is the name of the class that handles the event.
onPreSelectMouseMove = MyPreSelectMouseMoveHandler()
command_var.preSelectMouseMove.add(onPreSelectMouseMove)
handlers.append(onPreSelectMouseMove)

-------- Event handler class definition ---------
# Event handler for the preSelectMouseMove event.
class MyPreSelectMouseMoveHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MyPreSelectMouseMoveHandler event handler.')
--------- 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.preSelectStart Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

As the mouse moves over entities in the graphics window, entities valid for selection are highlighted. Before an entity is highlighted, Fusion determines if it is a valid selectable entity using the selection filter defined on the SelectionCommandInput and the preSelect event of the command. The preSelectStart event fires when the mouse first moves over an entity valid for selection. You can obtain the entity and mouse position from the Selection object returned by the selection property of the SelectionEventArgs object provided through the event.

Some related events are the preSelectMouseMove event, which fires as the mouse moves across the entity, and the preSelectEnd event, which fires when the mouse moves off the entity.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_preSelectStart" is the event handler function.
futil.add_handler(command_var.preSelectStart, command_preSelectStart, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the preSelectStart event.
def command_preSelectStart(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_preSelectStart event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyPreSelectStartHandler" is the name of the class that handles the event.
onPreSelectStart = MyPreSelectStartHandler()
command_var.preSelectStart.add(onPreSelectStart)
handlers.append(onPreSelectStart)

-------- Event handler class definition ---------
# Event handler for the preSelectStart event.
class MyPreSelectStartHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MyPreSelectStartHandler event handler.')
--------- 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 preSelectStart event.
class MyPreSelectStartEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyPreSelectStartEventHandler event handler.");
    }
} _preSelectStart;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> preSelectStartEvent = command_var->preSelectStart();
if (!preSelectStartEvent)
    return;

bool isOk = preSelectStartEvent->add(&_preSelectStart);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version May 2022


Command.select Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This even fires when the user selects an entity. This is different from the preselect 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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_select" is the event handler function.
futil.add_handler(command_var.select, command_select, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the select event.
def command_select(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_select event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MySelectHandler" is the name of the class that handles the event.
onSelect = MySelectHandler()
command_var.select.add(onSelect)
handlers.append(onSelect)

-------- Event handler class definition ---------
# Event handler for the select event.
class MySelectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MySelectHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Provides a notification when the mouse passes over an entity allowing you to determine if the entity should be available for selection or not.

Remarks

This event has been retired. Equivalent functionality is provide by the preSelect event.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_selectionEvent" is the event handler function.
futil.add_handler(command_var.selectionEvent, command_selectionEvent, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the selectionEvent event.
def command_selectionEvent(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_selectionEvent event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MySelectionEventHandler" is the name of the class that handles the event.
onSelectionEvent = MySelectionEventHandler()
command_var.selectionEvent.add(onSelectionEvent)
handlers.append(onSelectionEvent)

-------- Event handler class definition ---------
# Event handler for the selectionEvent event.
class MySelectionEventHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MySelectionEventHandler event handler.')
--------- 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
Retired in version July 2022


Command.setCursor Method

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Specifies the cursor to display at the mouse.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Sets the initial size of the dialog when it is first displayed. If this is not set, Fusion will use a default size for the dialog.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

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.setDialogSize Method

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Sets the size of the dialog and overrides any size. This can be used when the command is created or anytime while the command is running. If the height is zero, the dialog will be sized to fit the command inputs currently displayed.

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.setDialogSize(width, height)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->setDialogSize(width, height);

Return Value

Type | Description
boolean | Returns true if 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. If zero, the dialog will be sized to fit the command inputs currently displayed.

Version

Introduced in version March 2024


Command.unselect Event

Parent Object: Command
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_unselect" is the event handler function.
futil.add_handler(command_var.unselect, command_unselect, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the unselect event.
def command_unselect(args: adsk.core.SelectionEventArgs):
    # Code to react to the event.
    app.log('In command_unselect event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyUnselectHandler" is the name of the class that handles the event.
onUnselect = MyUnselectHandler()
command_var.unselect.add(onUnselect)
handlers.append(onUnselect)

-------- Event handler class definition ---------
# Event handler for the unselect event.
class MyUnselectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.SelectionEventArgs):
        # Code to react to the event.
        app.log('In MyUnselectHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Command.h>

Description

Gets an event that is fired to allow you to check if the current state of the inputs are valid for execution.

The timing of this event is indeterminate and not always tied to the editing of an input. There are cases where this isn't fired when an input is edited. This happens when an input is able to validate its content on its own. For example, if you enter an invalid value for a ValueCommandInput, it can evaluate this on its own, and as a result, the validate inputs event is not fired. Fusion will sometimes fire this event at other random times that are not tied to the edit of an input.

If you want to be notified when an input changes, you should use the input changed event instead.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "command_validateInputs" is the event handler function.
futil.add_handler(command_var.validateInputs, command_validateInputs, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the validateInputs event.
def command_validateInputs(args: adsk.core.ValidateInputsEventArgs):
    # Code to react to the event.
    app.log('In command_validateInputs event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
# "MyValidateInputsHandler" is the name of the class that handles the event.
onValidateInputs = MyValidateInputsHandler()
command_var.validateInputs.add(onValidateInputs)
handlers.append(onValidateInputs)

-------- Event handler class definition ---------
# Event handler for the validateInputs event.
class MyValidateInputsHandler(adsk.core.ValidateInputsEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ValidateInputsEventArgs):
        # Code to react to the event.
        app.log('In MyValidateInputsHandler event handler.')
--------- 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.

Version

Introduced in version August 2014


CommandControl Object

Derived from: ToolbarControl Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Represents a button, check box, or radio control list in a panel, toolbar, or drop-down.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
promote | Promote the command to the parent panel and optionally position it relative to an already- promoted control.

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.

The promote method provides more options over how the control is promoted.
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.

The promote method provides more options over how the control is promoted.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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

Version

Introduced in version August 2014


CommandControl.classType Method

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

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.

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.

Version

Introduced in version August 2014


CommandControl.deleteMe Method

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Deletes the ToolbarControl

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

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.

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.

Version

Introduced in version August 2014


CommandControl.index Property

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

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.

Version

Introduced in version August 2014


CommandControl.isPromoted Property

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

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.

The promote method provides more options over how the control is promoted.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandControl.isPromotedByDefault Property

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

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.

The promote method provides more options over how the control is promoted.

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.

Version

Introduced in version August 2014


CommandControl.isValid Property

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Gets or sets if this control is currently visible.

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.

Version

Introduced in version August 2014


CommandControl.objectType Property

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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.

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


CommandControl.promote Method

Parent Object: CommandControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandControl.h>

Description

Promote the command to the parent panel and optionally position it relative to an already- promoted control.

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.
# Uses no optional arguments.
returnValue = commandControl_var.promote()

# Uses optional arguments.
returnValue = commandControl_var.promote(byDefault, positionID, isBefore)
"commandControl_var" is a variable referencing a CommandControl object.

#include <Core/UserInterface/CommandControl.h>

// Uses no optional arguments.
returnValue = commandControl_var->promote();

// Uses optional arguments.
returnValue = commandControl_var->promote(byDefault, positionID, isBefore);

Return Value

Type | Description
boolean | True if this control was successfully promoted or was already promoted. False if promotion failed, which may happen if the control is not in a panel.

Parameters

Name | Type | Description
byDefault | boolean | If true, then the control will be promoted in the panel by default if the UI is reset. If false, then the promotion is cleared on reset. This is an optional argument whose default value is False.
positionID | string | If provided, then when this control is promoted, it will be positioned in the panel relative to the already-promoted control with this ID. This is an optional argument whose default value is "".
isBefore | boolean | If a positionID is provided, then this specifies whether the promoted control is placed before or after the control referenced by the positionID parameter. This is an optional argument whose default value is True.

Version

Introduced in version May 2024


CommandCreatedEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

Class that needs to be implemented in order to respond to the CommandCreatedEvent event.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandCreatedEvent.add Method

Parent Object: CommandCreatedEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

Adds an event handler object to this event endpoint.

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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandCreatedEvent.classType Method

Parent Object: CommandCreatedEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

Provides data for the CommandCreated event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

Gets the newly created Command object that allows you to perform an action in response to the control being clicked.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventHandler.h>

Description

Class that contains the call back function that is called when the CommandCreated event is fired.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandCreatedEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"commandCreatedEventHandler_var" is a variable referencing a CommandCreatedEventHandler object.
returnValue = commandCreatedEventHandler_var.notify(eventArgs)
"commandCreatedEventHandler_var" is a variable referencing a CommandCreatedEventHandler object.

#include <Core/UserInterface/CommandCreatedEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
resourceFolder | This argument defines the resource folder that contains the images used for the command icon. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.
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 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.

The width of all tooltips is limited to 300 pixels. Word wrapping is enabled, so Fusion will automatically break the line and flow your text to the next line. However, if you include a long word that exceeds 300 pixels, it doesn't wrap and the right portion will be clipped. This is common when displaying paths or URL's. If a single word is longer than 300 pixels there are a couple of options to avoid the clipping.

The first option is to insert one or more zero width space characters within the word to define where the word should be broken. The UNICODE character '\u200b' defines a zero width space. This is not displayed is only used to designate a possible break point.

The second option is to shorten the word by removing a section. For example, if the word is a full path to a file and a portion of the path is common you can remove that portion and replace it with the ellipsis character to indicate there is some missing text. There is a single UNICODE character you can use the ellipsis. It is '\u2026'.

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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinition.classType Method

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "commandDefinition_var" is a variable referencing a CommandDefinition object.
# "commandDefinition_commandCreated" is the event handler function.
futil.add_handler(commandDefinition_var.commandCreated, commandDefinition_commandCreated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the commandCreated event.
def commandDefinition_commandCreated(args: adsk.core.CommandCreatedEventArgs):
    # Code to react to the event.
    app.log('In commandDefinition_commandCreated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "commandDefinition_var" is a variable referencing a CommandDefinition object.
# "MyCommandCreatedHandler" is the name of the class that handles the event.
onCommandCreated = MyCommandCreatedHandler()
commandDefinition_var.commandCreated.add(onCommandCreated)
handlers.append(onCommandCreated)

-------- Event handler class definition ---------
# Event handler for the commandCreated event.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.CommandCreatedEventArgs):
        # Code to react to the event.
        app.log('In MyCommandCreatedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

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.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


CommandDefinition.deleteMe Method

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Deletes this command definition. This is only valid for API created command definitions and will fail if the isNative property is true.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Executes this command definition. This is the same as the user clicking a button that is associated with this command definition.

Remarks

The execute method is not supported within any of the Command related events because it results in starting a new command which has the side-effect of terminating the current command, which is your running command.

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 | This argument is ignored and exists for possible future use. 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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Version

Introduced in version August 2014


CommandDefinition.id Property

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Gets the unique id for this command definition. This is guaranteed to be unique with respect to all other command definitions.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinition.isNative Property

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Gets or sets the visible name of the command when seen in the user interface.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version June 2015


CommandDefinition.objectType Property

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

This argument defines the resource folder that contains the images used for the command icon. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinition.toolClipFilename Property

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

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.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinition.tooltip Property

Parent Object: CommandDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinition.h>

Description

Gets or sets the 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.

The width of all tooltips is limited to 300 pixels. Word wrapping is enabled, so Fusion will automatically break the line and flow your text to the next line. However, if you include a long word that exceeds 300 pixels, it doesn't wrap and the right portion will be clipped. This is common when displaying paths or URL's. If a single word is longer than 300 pixels there are a couple of options to avoid the clipping.

The first option is to insert one or more zero width space characters within the word to define where the word should be broken. The UNICODE character '\u200b' defines a zero width space. This is not displayed is only used to designate a possible break point.

The second option is to shorten the word by removing a section. For example, if the word is a full path to a file and a portion of the path is common you can remove that portion and replace it with the ellipsis character to indicate there is some missing text. There is a single UNICODE character you can use the ellipsis. It is '\u2026'.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinitions Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

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 for the native commands.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinitions.addButtonDefinition Method

Parent Object: CommandDefinitions
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Creates a new command definition that can be used to create a button control and handle the response when the button is clicked.

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.

The width of all tooltips is limited to 300 pixels. Word wrapping is enabled, so Fusion will automatically break the line and flow your text to the next line. However, if you include a long word that exceeds 300 pixels, it doesn't wrap and the right portion will be clipped. This is common when displaying paths or URL's. If a single word is longer than 300 pixels there are a couple of options to avoid the clipping.

The first option is to insert one or more zero width space characters within the word to define where the word should be broken. The UNICODE character '\u200b' defines a zero width space. This is not displayed is only used to designate a possible break point.

The second option is to shorten the word by removing a section. For example, if the word is a full path to a file and a portion of the path is common you can remove that portion and replace it with the ellipsis character to indicate there is some missing text. There is a single UNICODE character you can use the ellipsis. It is '\u2026'.
resourceFolder string This argument defines the resource folder that contains the images used for the icon. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

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.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


CommandDefinitions.addCheckBoxDefinition Method

Parent Object: CommandDefinitions
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

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.

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 the extended tooltip.

The width of all tooltips is limited to 300 pixels. Word wrapping is enabled, so Fusion will automatically break the line and flow your text to the next line. However, if you include a long word that exceeds 300 pixels, it doesn't wrap and the right portion will be clipped. This is common when displaying paths or URL's. If a single word is longer than 300 pixels there are a couple of options to avoid the clipping.

The first option is to insert one or more zero width space characters within the word to define where the word should be broken. The UNICODE character '\u200b' defines a zero width space. This is not displayed is only used to designate a possible break point.

The second option is to shorten the word by removing a section. For example, if the word is a full path to a file and a portion of the path is common you can remove that portion and replace it with the ellipsis character to indicate there is some missing text. There is a single UNICODE character you can use the ellipsis. It is '\u2026'.
isChecked | boolean | Indicates if the initial state of the check box.

Version

Introduced in version August 2014


CommandDefinitions.addListDefinition Method

Parent Object: CommandDefinitions
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

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.

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 | This argument defines the resource folder that contains the images used as the icon for items in the list. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization. This is an optional argument whose default value is "".

Version

Introduced in version August 2014


CommandDefinitions.classType Method

Parent Object: CommandDefinitions
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Gets the number of command definitions.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Returns the CommandDefinition at the specified index.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

Returns the CommandDefinition that has the specified ID.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Version

Introduced in version August 2014


CommandDefinitions.objectType Property

Parent Object: CommandDefinitions
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandDefinitions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

An event endpoint that supports the connection to client implemented CommandEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

Adds an event handler object to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

Provides a set of arguments from a firing CommandEvent to a CommandEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

Gets the Command object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventArgs.h>

Description

Gets the termination reason of the command. It's only valid on the destroy event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"commandEventHandler_var" is a variable referencing a CommandEventHandler object.
returnValue = commandEventHandler_var.notify(eventArgs)
"commandEventHandler_var" is a variable referencing a CommandEventHandler object.

#include <Core/UserInterface/CommandEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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, BrowserCommandInput.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, SeparatorCommandInput.parentCommandInput, SliderCommandInput.parentCommandInput, StringValueCommandInput.parentCommandInput, TabCommandInput.parentCommandInput, TableCommandInput.getInputAtPosition, TableCommandInput.parentCommandInput, TextBoxCommandInput.parentCommandInput, TriadCommandInput.parentCommandInput, ValueCommandInput.parentCommandInput

Derived Classes

AngleValueCommandInput, BoolValueCommandInput, BrowserCommandInput, ButtonRowCommandInput, DirectionCommandInput, DistanceValueCommandInput, DropDownCommandInput, FloatSpinnerCommandInput, GroupCommandInput, ImageCommandInput, IntegerSpinnerCommandInput, RadioButtonGroupCommandInput, SelectionCommandInput, SeparatorCommandInput, SliderCommandInput, StringValueCommandInput, TabCommandInput, TableCommandInput, TextBoxCommandInput, TriadCommandInput, 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: CommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.
returnValue = commandInput_var.deleteMe()
"commandInput_var" is a variable referencing a CommandInput object.

#include <Core/UserInterface/CommandInput.h>

returnValue = commandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


CommandInput.id Property

Parent Object: CommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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.
addBrowserCommandInput | Adds a new command input to the command that behaves as a browser.
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.
addSeparatorCommandInput | Adds a new Separator input to the command. A separator input is for visual purposes only and creates a line in the dialog providing a visual separation between the command inputs above and below where the separator is inserted.
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.
addTriadCommandInput Adds a new triad command input to the command. The input is initially invisible to allow you to define the desired behavior and then set the isVisible property to true when you're ready to display the triad.

The creation of a triad command input results in displaying many input fields in the command dialog. For example, there can be individual fields for the X, Y, and Z offset distances, the X, Y, and Z scales, the X, Y, and Z angles, etc. You control which fields are visible by setting properties on the returned TriadCommandInput. Even though each of these appears as an individual input in the command dialog, and they are all associated with the single TriadCommandInput object. It also results in graphics widgets being displayed to allow the user to define the values graphically.

When a new triad is created, it displays all inputs except those that control scaling. You can use the properties on the returned triad to define the inputs you want to display further.

To simplify your command dialog it can be useful put the TriadCommandInput within a GroupCommandInput so it's apparent to the user these items are related and they can be collapsed to reduce clutter in the dialog. This also allows you to label the set of displayed inputs by using the name of the GroupCommandInput.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AngleValueCommandInput.commandInputs, BoolValueCommandInput.commandInputs, BrowserCommandInput.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, SeparatorCommandInput.commandInputs, SliderCommandInput.commandInputs, StringValueCommandInput.commandInputs, TabCommandInput.children, TabCommandInput.commandInputs, TableCommandInput.commandInputs, TextBoxCommandInput.commandInputs, TriadCommandInput.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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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 icon for the input. This is optional if isCheckBox is true. If it's defined for a check box, the check box will display as a button using the icon and will have an up or down state. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization. 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.addBrowserCommandInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new command input to the command that behaves as a browser.

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addBrowserCommandInput(id, name, htmlFileURL, minimumHeight)

# Uses optional arguments.
returnValue = commandInputs_var.addBrowserCommandInput(id, name, htmlFileURL, minimumHeight, maximumHeight)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addBrowserCommandInput(id, name, htmlFileURL, minimumHeight);

// Uses optional arguments.
returnValue = commandInputs_var->addBrowserCommandInput(id, name, htmlFileURL, minimumHeight, maximumHeight);

Return Value

Type | Description
BrowserCommandInput | Returns the created BrowserCommandInput 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, the name will appear as a left justified label aligned with the other command input labels, and the left side of the input will be aligned with the other command inputs.
htmlFileURL | string | Specifies the URL to the HTML file that will be displayed in the tab. This can be a local file or on the web.
minimumHeight | integer | Defines the minimum height of the browser within the command dialog. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the dialog can't fit the browser at the minimum size a scroll bar will appear for the dialog to allow the user to scroll to access all the inputs in the dialog.
maximumHeight | integer | An optional parameter that specifies the maximum height of the browser within the command dialog. As the user resizes the dialog, the area taken up by the browser will shrink and grow to fit within the defined space. It will never shrink to be less than the minimum height or expand to be larger than the maximum height. If the content displayed within the browser does not fit within the current area, a scroll bar will appear to allow the user to scroll to see the entire browser content. The default value of zero sets no maximum height, so the browser will expand to the maximum extent available. This is an optional argument whose default value is 0.

Version

Introduced in version July 2021


CommandInputs.addButtonRowCommandInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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 icon to use for the input. This is an optional argument. The input is shown as a check box if the resource folder is not set. More information about icons can be found in the user manual topic User Interface Customization. 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new slider input to the command. The value type is double.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new slider input to the command. The value type is float.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new spinner input to the command. The value type is float.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new Image input to the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new slider input to the command. The value type is integer.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new slider input to the command. The value type is integer.

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 | integer[] | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new spinner input to the command. The value type is integer.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new Radio Button Group input to the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

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.

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.addSeparatorCommandInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new Separator input to the command. A separator input is for visual purposes only and creates a line in the dialog providing a visual separation between the command inputs above and below where the separator is inserted.

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addSeparatorCommandInput(id)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addSeparatorCommandInput(id);

Return Value

Type | Description
SeparatorCommandInput | Returns the created SeparatorCommandInput 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.

Version

Introduced in version May 2024


CommandInputs.addStringValueInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new string input to the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new Tab input to the command. Tab command inputs contain a set of command inputs and/or group command inputs

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. More information about icons can be found in the user manual topic User Interface Customization. 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new table command input to the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a text box input to the command.

Remarks

This method has been retired and replaced by the addSimpleTextBoxCommandInput and addFormattedTextBoxCommandInput methods. This method will continue to work as it did, but there were problems with the design that necessitated breaking it into two different types of text boxes. The simple text box cannot be formatted, but is editable by the user. The contents of a formatted text box can be defined using HTML but cannot be edited by the user.

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 | Specifies the formatted text to display in the input. 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 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://fusion.autodesk.com>Fusion</a>.". If you are using HTML formatting in your text, it's best to set the text box to be read-only. However, if you want to use the text box as a way to get input from the user, it's best to use simple text so not HTML formatting is assumed. To do this, use an empty string for this argument and then set the text using the text property after the input is created. When the text property is used any HTML formatting is ignored and the text is treated as basics text. This can be useful if you're using the text box to have the user enter HTML code so it's treated as a simple string.
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.addTriadCommandInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new triad command input to the command. The input is initially invisible to allow you to define the desired behavior and then set the isVisible property to true when you're ready to display the triad.

The creation of a triad command input results in displaying many input fields in the command dialog. For example, there can be individual fields for the X, Y, and Z offset distances, the X, Y, and Z scales, the X, Y, and Z angles, etc. You control which fields are visible by setting properties on the returned TriadCommandInput. Even though each of these appears as an individual input in the command dialog, and they are all associated with the single TriadCommandInput object. It also results in graphics widgets being displayed to allow the user to define the values graphically.

When a new triad is created, it displays all inputs except those that control scaling. You can use the properties on the returned triad to define the inputs you want to display further.

To simplify your command dialog it can be useful put the TriadCommandInput within a GroupCommandInput so it's apparent to the user these items are related and they can be collapsed to reduce clutter in the dialog. This also allows you to label the set of displayed inputs by using the name of the GroupCommandInput.

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addTriadCommandInput(id, transform)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addTriadCommandInput(id, transform);

Return Value

Type | Description
TriadCommandInput | Returns the created TriadCommandInput 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.
transform | Matrix3D | Defines the initial position and orientation of the manipulator.

Version

Introduced in version May 2022


CommandInputs.addValueInput Method

Parent Object: CommandInputs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Adds a new value input to the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Gets the parent Command object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Gets the number of inputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Returns the specified command input using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

Returns the command input that has the specified ID.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/CommandInputs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

Methods

Name | Description
allOccurrencesByComponent | Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.
boundingBox2 | Returns the bounding box of the specified entity types within the 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().
createBRepEdgeProfile | Creates a profile based on the outside open edges of a BRepFace.
createFlatPattern | Creates a flat pattern of the sheet metal folded body. The isSheetMetal property of the BRepBody object can be used to determine if a particular body can be flattened. Creating a flat pattern will fail if a flat pattern already exists in the component. You can determine if a flat pattern already exists by checking if the flatPattern property returns a FlatPattern object or null.
createOpenProfile | Creates an open profile based on the input curve(s).
createThumbnail | Creates a thumbnail for this component. This can be a root component to get a thumbnail that represents the associated file, or it can be any sub component to get a thumbnail of a subset of the complete assembly or individual parts.
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 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

Properties

Name | Description
activeSheetMetalRule | Gets and sets the active sheet metal rule. This can return null in the case where the component has never contained any sheet metal related data.
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 flattens the assembly structure, including joint origins, when manipulating an assembly.
allAssemblyConstraints | Preview Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, 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 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 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 flattens the assembly structure, including rigid groups, when manipulating an assembly.
allTangentRelationships | Returns all tangent relationships in this component and any sub components. The tangent relationships returned are all in the context of this component so any tangent relationships in sub components will be proxies. This is primarily useful when used from the root component because Fusion flattens the assembly structure, including tangent relationships, when manipulating an assembly.
asBuiltJoints | Returns the collection of as-built joints associated with this component.
assemblyConstraints | Preview Returns the collection of assembly constraints 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. The boundingBox2 method provides greater control over which types of entities you want included in the bounding box calculation.
bRepBodies | Returns the B-Rep bodies collection associated with this component.
canvases | Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.
componentColor | Gets and sets the color associated with a component. This color is only used when the "Display Component Colors" command is enabled. Enabling the display of component colors is done through the command or API using the Application.isComponentColorsDisplayed property. When this is on, all bodies in a component will display using the color assigned to the component. Fusion randomly assigns a color to a component when it is created. This property allows you to get and change the assigned default color. Setting this property to null results in a new color being randomly assigned by Fusion. This is the equivalent of the "Cycle Component Color" command available in the context menu of a 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.
dataComponent Preview Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.
decals | Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.
description | Gets and sets the description associated with this component.
entityToken Returns a token for the Component object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same component.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
features | Returns the collection that provides access to all of the features associated with this component.
flatPattern | Gets the existing flat pattern or returns null in the case where a flat pattern doesn't exist in this component.
id Returns the persistent ID of the component. This ID is created with the component and does not change. Because this ID does not change, different revisions of the same design or copies of the design asset/file will retain this ID. If components from different designs have the same ID, it indicates they are either different revisions or a copy of the design was made. Therefore, this ID will always be unique within a single design, but may not be unique in an assembly where externally referenced designs include different revisions or copies of a design.

The ID is also the same ID used by PIM (Product Information Model).
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.
isCanvasFolderLightBulbOn | Gets and sets if the light bulb of the canvas folder as seen in the browser is on or off. This controls the visibility of all the canvases in the 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).
isDecalFolderLightBulbOn | Gets and sets whether the light bulb of the decal folder, as seen in the browser, is on or off. This controls the visibility of all the decals in the component.
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.
isLibraryItem | Gets whether the component was created from a fasteners library item."
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.
mfgdmModelId | Preview Returns the MFGDM model ID for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
orientedMinimumBoundingBox | Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the component. All other geometry types are ignored.
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 calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.
preciseBoundingBox | Returns a bounding box that tightly fits around all B-Rep bodies in the component. All other geometry types are ignored.
propertyGroups | Returns the PropertyGroups object associated with this component.
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.
tangentRelationships | Returns the collection of tangent relationships associated with this component.
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

ArrangeFeature.parentComponent, AsBuiltJoint.parentComponent, AssemblyConstraint.parentComponent, BaseFeature.parentComponent, BossFeature.parentComponent, BoundaryFillFeature.parentComponent, BoxFeature.parentComponent, BRepBody.parentComponent, ChamferFeature.parentComponent, CircularPatternFeature.parentComponent, CoilFeature.parentComponent, CombineFeature.parentComponent, ComponentList.item, Components.item, Components.itemById, Components.itemByName, ConfigurationPlasticRuleColumn.component, ConfigurationSheetMetalRuleColumn.component, ConstructionAxes.component, ConstructionAxis.component, ConstructionPlane.component, ConstructionPlanes.component, ConstructionPoint.component, ConstructionPoints.component, CopyPasteBody.parentComponent, CustomFeature.parentComponent, CustomFeatureParameter.component, CutPasteBody.parentComponent, CylinderFeature.parentComponent, DeleteFaceFeature.parentComponent, Design.activeComponent, Design.rootComponent, DraftFeature.parentComponent, ExtendFeature.parentComponent, ExtrudeFeature.parentComponent, Feature.parentComponent, FilletFeature.parentComponent, FlangeFeature.parentComponent, FlatPattern.parentComponent, FlatPatternProduct.activeComponent, FlatPatternProduct.rootComponent, FormFeature.parentComponent, HoleFeature.parentComponent, Joint.parentComponent, JointOrigin.parentComponent, LoftFeature.parentComponent, MeshBody.parentComponent, MeshCombineFaceGroupsFeature.parentComponent, MeshCombineFeature.parentComponent, MeshConvertFeature.parentComponent, MeshFeature.parentComponent, MeshGenerateFaceGroupsFeature.parentComponent, MeshReduceFeature.parentComponent, MeshRemeshFeature.parentComponent, MeshRepairFeature.parentComponent, MeshReverseNormalFeature.parentComponent, MeshSeparateFeature.parentComponent, MeshShellFeature.parentComponent, MeshSmoothFeature.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, RefoldFeature.parentComponent, RemoveFeature.parentComponent, ReplaceFaceFeature.parentComponent, ReverseNormalFeature.parentComponent, RevolveFeature.parentComponent, RibFeature.parentComponent, RigidGroup.parentComponent, RipFeature.parentComponent, RuledSurfaceFeature.parentComponent, RuleFilletFeature.parentComponent, ScaleFeature.parentComponent, ShellFeature.parentComponent, SilhouetteSplitFeature.parentComponent, Sketch.parentComponent, SphereFeature.parentComponent, SplitBodyFeature.parentComponent, SplitFaceFeature.parentComponent, StitchFeature.parentComponent, SurfaceDeleteFaceFeature.parentComponent, SweepFeature.parentComponent, TangentRelationship.parentComponent, TessellateFeature.parentComponent, ThickenFeature.parentComponent, ThreadFeature.parentComponent, TorusFeature.parentComponent, TrimFeature.parentComponent, UnfoldFeature.parentComponent, UnstitchFeature.parentComponent, UntrimFeature.parentComponent, VolumetricCustomFeature.parentComponent, VolumetricModel.parentComponent, VolumetricModelToMeshFeature.parentComponent, WebFeature.parentComponent, WorkingModel.activeComponent, WorkingModel.rootComponent, WorkingModel.sourceComponent

Derived Classes

FlatPatternComponent

Samples

Name | Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Library Item API Sample

Demonstrates how to examine library items using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Component.activeSheetMetalRule Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets the active sheet metal rule. This can return null in the case where the component has never contained any sheet metal related data.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.activeSheetMetalRule

# Set the value of the property.
component_var.activeSheetMetalRule = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<SheetMetalRule> propertyValue = component_var->activeSheetMetalRule();

// Set the value of the property, where value_var is a SheetMetalRule.
bool returnValue = component_var->activeSheetMetalRule(value_var);

Property Value

This is a read/write property whose value is a SheetMetalRule.

Version

Introduced in version November 2022


Component.allAsBuiltJoints Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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 flattens the assembly structure, including joint origins, when manipulating an assembly.

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.allAssemblyConstraints Property

Parent Object: Component

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, when manipulating an assembly.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allAssemblyConstraints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<AssemblyConstraint>> propertyValue = component_var->allAssemblyConstraints();

Property Value

This is a read only property whose value is an array of type AssemblyConstraint.

Version

Introduced in version July 2025


Component.allJointOrigins Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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 flattens the assembly structure, including as-built joints, when manipulating an assembly.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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 flattens the assembly structure, including joints, when manipulating an assembly.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.

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
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Component.allOccurrencesByComponent Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


Component.allRigidGroups Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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 flattens the assembly structure, including rigid groups, when manipulating an assembly.

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.allTangentRelationships Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns all tangent relationships in this component and any sub components. The tangent relationships returned are all in the context of this component so any tangent relationships in sub components will be proxies. This is primarily useful when used from the root component because Fusion flattens the assembly structure, including tangent relationships, when manipulating an assembly.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allTangentRelationships
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<TangentRelationship>> propertyValue = component_var->allTangentRelationships();

Property Value

This is a read only property whose value is an array of type TangentRelationship.

Version

Introduced in version May 2022


Component.asBuiltJoints Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of as-built joints associated with this component.

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.assemblyConstraints Property

Parent Object: Component

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of assembly constraints associated with this component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.assemblyConstraints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<AssemblyConstraints> propertyValue = component_var->assemblyConstraints();

Property Value

This is a read only property whose value is an AssemblyConstraints.

Version

Introduced in version July 2025


Component.attributes Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the bounding box of this component. This is always in world space of the component. The boundingBox2 method provides greater control over which types of entities you want included in the bounding box calculation.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version November 2015


Component.boundingBox2 Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the bounding box of the specified entity types within the component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.boundingBox2(entityTypes)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->boundingBox2(entityTypes);

Return Value

Type | Description
BoundingBox3D | Returns a BoundingBox3D object if the calculation was successful and null in the case where there is no valid geometry and the bounding box is empty.

Parameters

Name | Type | Description
entityTypes | BoundingBoxEntityTypes | Bitwise value that specifies the types of entities to include in the calculation of the bounding box.

Version

Introduced in version January 2024


Component.bRepBodies Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the B-Rep bodies collection associated with this component.

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
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


Component.canvases Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.canvases
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Canvases> propertyValue = component_var->canvases();

Property Value

This is a read only property whose value is a Canvases.

Version

Introduced in version July 2023


Component.classType Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.componentColor Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets the color associated with a component. This color is only used when the "Display Component Colors" command is enabled. Enabling the display of component colors is done through the command or API using the Application.isComponentColorsDisplayed property. When this is on, all bodies in a component will display using the color assigned to the component. Fusion randomly assigns a color to a component when it is created. This property allows you to get and change the assigned default color. Setting this property to null results in a new color being randomly assigned by Fusion. This is the equivalent of the "Cycle Component Color" command available in the context menu of a component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.componentColor

# Set the value of the property.
component_var.componentColor = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Color> propertyValue = component_var->componentColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = component_var->componentColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version May 2024


Component.constructionAxes Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Creates a profile based on the outside open edges of a BRepFace.

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 multiple edges or a BRepLoop is input. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


Component.createFlatPattern Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Creates a flat pattern of the sheet metal folded body. The isSheetMetal property of the BRepBody object can be used to determine if a particular body can be flattened. Creating a flat pattern will fail if a flat pattern already exists in the component. You can determine if a flat pattern already exists by checking if the flatPattern property returns a FlatPattern object or null.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.createFlatPattern(stationaryFace)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->createFlatPattern(stationaryFace);

Return Value

Type | Description
FlatPattern | Returns the newly created flat pattern.

Parameters

Name | Type | Description
stationaryFace | BRepFace | A planar face in the sheet metal body that is on the top or bottom of the part and not an edge face. This face will be positioned on the X-Y plane of the flat pattern and the rest of the model will be flattened relative to this face. The face must exist on a body that is owned by this component.

Version

Introduced in version October 2022


Component.createOpenProfile Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Creates an open profile based on the input curve(s).

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.createThumbnail Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Creates a thumbnail for this component. This can be a root component to get a thumbnail that represents the associated file, or it can be any sub component to get a thumbnail of a subset of the complete assembly or individual parts.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.createThumbnail()

# Uses optional arguments.
returnValue = component_var.createThumbnail(width, height, imageType)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->createThumbnail();

// Uses optional arguments.
returnValue = component_var->createThumbnail(width, height, imageType);

Return Value

Type | Description
DataObject | Returns a DataObject that you can use to save the thumbnail to a file or to access the binary data of the bitmap directly.

Parameters

Name | Type | Description
width | integer | Optional argument to define the width of the thumbnail in pixels. A default width of 256 pixels is used if no width is specified. This is an optional argument whose default value is 256.
height | integer | Optional argument to define the height of the thumbnail in pixels. A default height of 256 pixels is used if no height is specified. This is an optional argument whose default value is 256.
imageType | string | Optional argument to define the type of image data to create. The default of PNG is used if no type is specified. Valid types include "PNG", "JPG", "TIF", and "BMP". This is an optional argument whose default value is "PNG".

Version

Introduced in version November 2024


Component.customGraphicsGroups Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the customGraphicsGroups object in this component.

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.dataComponent Property

Parent Object: Component

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.dataComponent
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = component_var->dataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Version

Introduced in version May 2024


Component.decals Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.decals
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Decals> propertyValue = component_var->decals();

Property Value

This is a read only property whose value is a Decals.

Version

Introduced in version September 2024


Component.description Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets the description associated with this component.

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.entityToken Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns a token for the Component object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same component.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.entityToken
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Component.features Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection that provides access to all of the features associated with this component.

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
baseFeatures.add | Demonstrates the baseFeature.add method.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.
formFeatures.add | Demonstrates the formFeatures.add method. This creates a new empty form (T-Spline) feature, which you'll see in the timeline.
Loft Feature API Sample | Demonstrates creating a new loft feature.
moveFeatures.add | Demonstrates the moveFeatures.add method.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Finds all the entities of the specified type at the specified location.

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.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version December 2016


Component.findBRepUsingRay Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.

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.flatPattern Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets the existing flat pattern or returns null in the case where a flat pattern doesn't exist in this component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.flatPattern
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<FlatPattern> propertyValue = component_var->flatPattern();

Property Value

This is a read only property whose value is a FlatPattern.

Version

Introduced in version October 2022


Component.getPhysicalProperties Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component.

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);

Return Value

Type | Description
PhysicalProperties | Returns a PhysicalProperties object that can be used to get the various physical property related values.

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 CalculationAccuracy.LowCalculationAccuracy.

Samples

Name | Description
Get Physical Properties API Sample | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


Component.id Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the persistent ID of the component. This ID is created with the component and does not change. Because this ID does not change, different revisions of the same design or copies of the design asset/file will retain this ID. If components from different designs have the same ID, it indicates they are either different revisions or a copy of the design was made. Therefore, this ID will always be unique within a single design, but may not be unique in an assembly where externally referenced designs include different revisions or copies of a design.

The ID is also the same ID used by PIM (Product Information Model).

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.id
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


Component.isBodiesFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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.isCanvasFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets if the light bulb of the canvas folder as seen in the browser is on or off. This controls the visibility of all the canvases in the component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isCanvasFolderLightBulbOn

# Set the value of the property.
component_var.isCanvasFolderLightBulbOn = 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->isCanvasFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isCanvasFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


Component.isConstructionFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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).

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.isDecalFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets whether the light bulb of the decal folder, as seen in the browser, is on or off. This controls the visibility of all the decals in the component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isDecalFolderLightBulbOn

# Set the value of the property.
component_var.isDecalFolderLightBulbOn = 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->isDecalFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isDecalFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


Component.isJointsFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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.isLibraryItem Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets whether the component was created from a fasteners library item."

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isLibraryItem
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isLibraryItem();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


Component.isOriginFolderLightBulbOn Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of joint origins associated with this component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of joints associated with this component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Gets and sets the physical material assigned to this component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the mesh bodies collection associated with this component.

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.mfgdmModelId Property

Parent Object: Component

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the MFGDM model ID for this component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.mfgdmModelId
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->mfgdmModelId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


Component.modelParameters Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of model parameters in the Component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Component.objectType Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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.orientedMinimumBoundingBox Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the component. All other geometry types are ignored.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.orientedMinimumBoundingBox
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<OrientedBoundingBox3D> propertyValue = component_var->orientedMinimumBoundingBox();

Property Value

This is a read only property whose value is an OrientedBoundingBox3D.

Version

Introduced in version January 2024


Component.originConstructionPoint Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the origin construction point.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Component.parentDesign Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the parent product this component is owned by.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component. Property values will be calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


Component.preciseBoundingBox Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns a bounding box that tightly fits around all B-Rep bodies in the component. All other geometry types are ignored.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.preciseBoundingBox
"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->preciseBoundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version January 2024


Component.propertyGroups Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the PropertyGroups object associated with this component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.propertyGroups
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<PropertyGroups> propertyValue = component_var->propertyGroups();

Property Value

This is a read only property whose value is a PropertyGroups.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


Component.revisionId Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of rigid groups associated with this component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Performs a Save Copy As on this component. This saves the specified component as a new document in the specified location.

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 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the sketches collection associated with this component. This provides access to the existing sketches and supports the creation of new sketches.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
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.
Sketches.add | Demonstrates the Sketches.add method.
Sketches.addToBaseOrFormFeature | Demonstrates the Sketches.addToBaseOrFormFeature method.

Version

Introduced in version August 2014


Component.tangentRelationships Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the collection of tangent relationships associated with this component.

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.tangentRelationships
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<TangentRelationships> propertyValue = component_var->tangentRelationships();

Property Value

This is a read only property whose value is a TangentRelationships.

Version

Introduced in version May 2022


Component.transformOccurrences Method

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

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 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the X origin construction axis.

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
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the XY origin construction plane.

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
mirrorFeatures.add | Demonstrates the mirrorFeatures.add method by mirroring the selected body around the base X-Y construction plane.
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.
Sketches.add | Demonstrates the Sketches.add method.
Sketches.addToBaseOrFormFeature | Demonstrates the Sketches.addToBaseOrFormFeature method.

Version

Introduced in version August 2014


Component.xZConstructionPlane Property

Parent Object: Component
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the XZ origin construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the Y origin construction axis.

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
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the YZ origin construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Component.h>

Description

Returns the Z origin construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

Provides a list of components.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


ComponentList.classType Method

Parent Object: ComponentList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

Returns the number of components in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

Function that returns the specified component using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ComponentList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

The Components collection object provides access to existing components in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
itemById | Returns the Component that has the specified ID.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.allComponents, FlatPatternProduct.allComponents, WorkingModel.allComponents

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version August 2014


Components.classType Method

Parent Object: Components
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

The number of components in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

Function that returns the specified component using an index into the collection.

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.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version August 2014


Components.itemById Method

Parent Object: Components
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

Returns the Component that has the specified ID.

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.
returnValue = components_var.itemById(id)
"components_var" is a variable referencing a Components object.

#include <Fusion/Components/Components.h>

returnValue = components_var->itemById(id);

Return Value

Type | Description
Component | Returns the specified Component or null in the case where there isn't a Component with the specified ID in this Design.

Parameters

Name | Type | Description
id | string | The ID of the Component to get. This is the same id used by PIM (Product Information Model).

Version

Introduced in version December 2020


Components.itemByName Method

Parent Object: Components
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

Function that returns the specified component by name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Components.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

A concentric constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Returns the first curve.

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.entityToken Property

Parent Object: ConcentricConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.entityToken
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
string propertyValue = concentricConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ConcentricConstraint.entityTwo Property

Parent Object: ConcentricConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Returns the second curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ConcentricConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Gets and sets the center axis (along the length) of the cone that defines its normal direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Creates and returns an independent copy of this Cone object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Creates a transient cone object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Gets the data that defines the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Gets and sets the origin point (center) of the base of the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Gets and sets the radius of the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Sets the data that defines the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cone.h>

Description

Updates this surface by transforming it with a given input matrix.

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


ConfigurationAppearanceCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Represents a single cell within a ConfigurationAppearanceTable table that controls which appearance is assigned to a component or body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
appearance | Gets and sets the appearance associated with this cell. This property can return null indicating the appearance from the physical material assigned to the object is inherited. Setting the property to null will inherit the appearance from the physical material assigned to the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.

Accessed From

ConfigurationAppearanceColumn.getCell, ConfigurationAppearanceColumn.getCellByRowId, ConfigurationAppearanceColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationAppearanceCell.appearance Property

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Gets and sets the appearance associated with this cell. This property can return null indicating the appearance from the physical material assigned to the object is inherited. Setting the property to null will inherit the appearance from the physical material assigned to the object.

Syntax

  • Python
  • C++
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.

# Get the value of the property.
propertyValue = configurationAppearanceCell_var.appearance

# Set the value of the property.
configurationAppearanceCell_var.appearance = propertyValue
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.
#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = configurationAppearanceCell_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = configurationAppearanceCell_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version January 2024


ConfigurationAppearanceCell.classType Method

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationAppearanceCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

returnValue = adsk::fusion::ConfigurationAppearanceCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationAppearanceCell.isValid Property

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.

# Get the value of the property.
propertyValue = configurationAppearanceCell_var.isValid
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.
#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

// Get the value of the property.
boolean propertyValue = configurationAppearanceCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationAppearanceCell.objectType Property

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.

# Get the value of the property.
propertyValue = configurationAppearanceCell_var.objectType
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.
#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

// Get the value of the property.
string propertyValue = configurationAppearanceCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceCell.parentColumn Property

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.

# Get the value of the property.
propertyValue = configurationAppearanceCell_var.parentColumn
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.
#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

// Get the value of the property.
Ptr<ConfigurationAppearanceColumn> propertyValue = configurationAppearanceCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationAppearanceColumn.

Version

Introduced in version January 2024


ConfigurationAppearanceCell.parentRow Property

Parent Object: ConfigurationAppearanceCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.

# Get the value of the property.
propertyValue = configurationAppearanceCell_var.parentRow
"configurationAppearanceCell_var" is a variable referencing a ConfigurationAppearanceCell object.
#include <Fusion/Configurations/ConfigurationAppearanceCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationAppearanceCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Represents an appearance column in the appearance table. This defines the appearance to use for a specific component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
entity | Returns the Component or BRepBody being controlled by this column. This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentAppearanceTable | Returns the parent appearance table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationAppearanceCell.parentColumn, ConfigurationAppearanceColumns.add, ConfigurationAppearanceColumns.item, ConfigurationAppearanceColumns.itemById

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.classType Method

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationAppearanceColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

returnValue = adsk::fusion::ConfigurationAppearanceColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.deleteMe Method

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
returnValue = configurationAppearanceColumn_var.deleteMe()
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

returnValue = configurationAppearanceColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationAppearanceColumn.entity Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Returns the Component or BRepBody being controlled by this column. This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.entity
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationAppearanceColumn_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.getCell Method

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
returnValue = configurationAppearanceColumn_var.getCell(rowIndex)
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

returnValue = configurationAppearanceColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationAppearanceCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.getCellByRowId Method

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
returnValue = configurationAppearanceColumn_var.getCellByRowId(rowId)
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

returnValue = configurationAppearanceColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationAppearanceCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.getCellByRowName Method

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
returnValue = configurationAppearanceColumn_var.getCellByRowName(rowName)
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

returnValue = configurationAppearanceColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationAppearanceCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.id Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.id
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
string propertyValue = configurationAppearanceColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.index Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.index
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationAppearanceColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.isValid Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.isValid
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
boolean propertyValue = configurationAppearanceColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.objectType Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.objectType
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
string propertyValue = configurationAppearanceColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.parentAppearanceTable Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Returns the parent appearance table this column is in.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.parentAppearanceTable
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
Ptr<ConfigurationAppearanceTable> propertyValue = configurationAppearanceColumn_var->parentAppearanceTable();

Property Value

This is a read only property whose value is a ConfigurationAppearanceTable.

Version

Introduced in version January 2024


ConfigurationAppearanceColumn.rowCount Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.rowCount
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationAppearanceColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationAppearanceColumn.title Property

Parent Object: ConfigurationAppearanceColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.

# Get the value of the property.
propertyValue = configurationAppearanceColumn_var.title

# Set the value of the property.
configurationAppearanceColumn_var.title = propertyValue
"configurationAppearanceColumn_var" is a variable referencing a ConfigurationAppearanceColumn object.
#include <Fusion/Configurations/ConfigurationAppearanceColumn.h>

// Get the value of the property.
string propertyValue = configurationAppearanceColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationAppearanceColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

Provides access to the columns in an appearance table. This collection can be empty when no columns have been created. When the table is empty, it is not displayed in the user interface, and adding a column causes the table to be displayed.

Methods

Name | Description
add | Adds a new column to the appearance table. If you are adding the first column to the table and it is anything other than the root component, an additional column for the root component will automatically be created as the first column.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.
itemById | A method that returns the column with the specified ID.

Properties

Name | Description
count | Returns the number of columns in the table where the name column is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationAppearanceTable.columns

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.add Method

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

Adds a new column to the appearance table. If you are adding the first column to the table and it is anything other than the root component, an additional column for the root component will automatically be created as the first column.

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
returnValue = configurationAppearanceColumns_var.add(entity)
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

returnValue = configurationAppearanceColumns_var->add(entity);

Return Value

Type | Description
ConfigurationAppearanceColumn | Returns the newly created ConfigurationAppearanceColumn object or null if it fails.

Parameters

Name | Type | Description
entity | Base | The root component, occurrence, or body whose appearance will be controlled by this column.

Version

Introduced in version March 2024


ConfigurationAppearanceColumns.classType Method

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationAppearanceColumns.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

returnValue = adsk::fusion::ConfigurationAppearanceColumns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.count Property

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

Returns the number of columns in the table where the name column is not included.

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

# Get the value of the property.
propertyValue = configurationAppearanceColumns_var.count
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

// Get the value of the property.
uinteger propertyValue = configurationAppearanceColumns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.isValid Property

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

# Get the value of the property.
propertyValue = configurationAppearanceColumns_var.isValid
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

// Get the value of the property.
boolean propertyValue = configurationAppearanceColumns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.item Method

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
returnValue = configurationAppearanceColumns_var.item(index)
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

returnValue = configurationAppearanceColumns_var->item(index);

Return Value

Type | Description
ConfigurationAppearanceColumn | Returns the specified column or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the column to return, where the first column is index 0. The name column is not included.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.itemById Method

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

A method that returns the column with the specified ID.

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
returnValue = configurationAppearanceColumns_var.itemById(id)
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

returnValue = configurationAppearanceColumns_var->itemById(id);

Return Value

Type | Description
ConfigurationAppearanceColumn | Returns the specified column or null if a column with the specified ID does not exist.

Parameters

Name | Type | Description
id | string | The id of the column to return.

Version

Introduced in version January 2024


ConfigurationAppearanceColumns.objectType Property

Parent Object: ConfigurationAppearanceColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceColumns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.

# Get the value of the property.
propertyValue = configurationAppearanceColumns_var.objectType
"configurationAppearanceColumns_var" is a variable referencing a ConfigurationAppearanceColumns object.
#include <Fusion/Configurations/ConfigurationAppearanceColumns.h>

// Get the value of the property.
string propertyValue = configurationAppearanceColumns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Represents a configuration table that defines the appearances assigned to bodies and components.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 content of the appearance table, removes the reference from the top table, and hides it in the user interface.
getCell | Returns the cell at the specified row and column.

Properties

Name | Description
columns | Returns the collection that provides access to this table's columns and the ability to create new columns.
id | Returns the unique ID of this table.
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 table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTableColumn | Returns the column in the top table that references this appearance table.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationAppearanceColumn.parentAppearanceTable, ConfigurationTopTable.appearanceTable

Version

Introduced in version January 2024


ConfigurationAppearanceTable.classType Method

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationAppearanceTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

returnValue = adsk::fusion::ConfigurationAppearanceTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.clear Method

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Clears the content of the appearance table, removes the reference from the top table, and hides it in the user interface.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
returnValue = configurationAppearanceTable_var.clear()
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

returnValue = configurationAppearanceTable_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version March 2024


ConfigurationAppearanceTable.columns Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the collection that provides access to this table's columns and the ability to create new columns.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.columns
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
Ptr<ConfigurationAppearanceColumns> propertyValue = configurationAppearanceTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationAppearanceColumns.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.getCell Method

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
returnValue = configurationAppearanceTable_var.getCell(column, row)
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

returnValue = configurationAppearanceTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.id Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.id
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
string propertyValue = configurationAppearanceTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.isValid Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.isValid
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
boolean propertyValue = configurationAppearanceTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.name Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.name
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
string propertyValue = configurationAppearanceTable_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ConfigurationAppearanceTable.objectType Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.objectType
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
string propertyValue = configurationAppearanceTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationAppearanceTable.parentTableColumn Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the column in the top table that references this appearance table.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.parentTableColumn
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationAppearanceTable_var->parentTableColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version March 2024


ConfigurationAppearanceTable.rows Property

Parent Object: ConfigurationAppearanceTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationAppearanceTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.

# Get the value of the property.
propertyValue = configurationAppearanceTable_var.rows
"configurationAppearanceTable_var" is a variable referencing a ConfigurationAppearanceTable object.
#include <Fusion/Configurations/ConfigurationAppearanceTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationAppearanceTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationCell Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCell.h>

Description

Represents a single cell within a configuration table. This is the base class for the type-specific cell objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentRow | Returns the row this cell is in.

Accessed From

ConfigurationAppearanceTable.getCell, ConfigurationCustomThemeTable.getCell, ConfigurationFeatureAspectColumn.getCell, ConfigurationFeatureAspectColumn.getCellByRowId, ConfigurationFeatureAspectColumn.getCellByRowName, ConfigurationJointSnapColumn.getCell, ConfigurationJointSnapColumn.getCellByRowId, ConfigurationJointSnapColumn.getCellByRowName, ConfigurationMaterialTable.getCell, ConfigurationPlasticRuleTable.getCell, ConfigurationRow.getCellByColumnId, ConfigurationRow.getCellByColumnIndex, ConfigurationSheetMetalRuleTable.getCell, ConfigurationTable.getCell, ConfigurationTopTable.getCell

Derived Classes

ConfigurationAppearanceCell, ConfigurationFeatureAspectBooleanCell, ConfigurationFeatureAspectStringCell, ConfigurationInsertCell, ConfigurationJointSnapCell, ConfigurationMaterialCell, ConfigurationParameterCell, ConfigurationPlasticRuleCell, ConfigurationPropertyCell, ConfigurationSheetMetalRuleCell, ConfigurationSuppressCell, ConfigurationThemeCell, ConfigurationVisibilityCell

Version

Introduced in version January 2024


ConfigurationCell.classType Method

Parent Object: ConfigurationCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationCell.h>

returnValue = adsk::fusion::ConfigurationCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationCell.isValid Property

Parent Object: ConfigurationCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationCell_var" is a variable referencing a ConfigurationCell object.

# Get the value of the property.
propertyValue = configurationCell_var.isValid
"configurationCell_var" is a variable referencing a ConfigurationCell object.
#include <Fusion/Configurations/ConfigurationCell.h>

// Get the value of the property.
boolean propertyValue = configurationCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationCell.objectType Property

Parent Object: ConfigurationCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationCell_var" is a variable referencing a ConfigurationCell object.

# Get the value of the property.
propertyValue = configurationCell_var.objectType
"configurationCell_var" is a variable referencing a ConfigurationCell object.
#include <Fusion/Configurations/ConfigurationCell.h>

// Get the value of the property.
string propertyValue = configurationCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationCell.parentRow Property

Parent Object: ConfigurationCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationCell_var" is a variable referencing a ConfigurationCell object.

# Get the value of the property.
propertyValue = configurationCell_var.parentRow
"configurationCell_var" is a variable referencing a ConfigurationCell object.
#include <Fusion/Configurations/ConfigurationCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationColumn Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

Represents a column in a configuration table. This is the base class for the more specific column types. The "Name" column is not considered a standard column but is a value associated with each table row.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Properties

Name | Description
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.item, ConfigurationColumns.itemById, ConfigurationCustomThemeTable.moveColumns, ConfigurationTopTable.moveColumns

Derived Classes

ConfigurationAppearanceColumn, ConfigurationFeatureAspectColumn, ConfigurationInsertColumn, ConfigurationMaterialColumn, ConfigurationParameterColumn, ConfigurationPlasticRuleColumn, ConfigurationPropertyColumn, ConfigurationSheetMetalRuleColumn, ConfigurationSuppressColumn, ConfigurationThemeColumn, ConfigurationVisibilityColumn

Version

Introduced in version January 2024


ConfigurationColumn.classType Method

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationColumn.h>

returnValue = adsk::fusion::ConfigurationColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationColumn.deleteMe Method

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
returnValue = configurationColumn_var.deleteMe()
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

#include <Fusion/Configurations/ConfigurationColumn.h>

returnValue = configurationColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationColumn.id Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.id
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
string propertyValue = configurationColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationColumn.index Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.index
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationColumn.isValid Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.isValid
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
boolean propertyValue = configurationColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationColumn.objectType Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.objectType
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
string propertyValue = configurationColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationColumn.rowCount Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.rowCount
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationColumn.title Property

Parent Object: ConfigurationColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.

# Get the value of the property.
propertyValue = configurationColumn_var.title

# Set the value of the property.
configurationColumn_var.title = propertyValue
"configurationColumn_var" is a variable referencing a ConfigurationColumn object.
#include <Fusion/Configurations/ConfigurationColumn.h>

// Get the value of the property.
string propertyValue = configurationColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationColumns Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Returns a collection of the columns in the table. The Name column is not included in this list.

Methods

Name | Description
addClearanceTypeColumns | Creates the columns in the configuration table to control the clearance information associated with a clearance hole. Because configuring a clearance hole requires several pieces of related information, this method collects it all at once and creates all the corresponding feature aspect columns. The fit is also a setting that controls the hole clearance, but it's independent of the other settings and can be created independently using the addFeatureAspectColumn method.
addFeatureAspectColumn | Creates a new column to control an aspect of a feature that supports being configured.
addInsertColumn | Add a new column to control which configuration is used for an inserted configuration. If an insert column already exists for the occurrence, the existing column is returned. This is only valid for ConfigurationTopTable and ConfigurationCustomThemeTable objects and will fail for all other table types.
addParameterColumn | Adds a new parameter column to the configuration table. If a parameter column already exists for the parameter, the existing column is returned. This is only valid for TopConfigurationTable and ThemeConfigurationTable objects. It will fail for all other table types.
addPropertyColumn | Add a new column to control the property inside the component. The component is the owner of the property. This is only valid for TopConfigurationTable. It will fail for all other table types.
addSuppressColumn | Adds a new column to control the suppression of a feature. The term "feature" is used broadly and includes anything displayed in the timeline. If a suppression column already exists for the feature, the existing column is returned. This is only valid for TopConfigurationTable and ThemeConfigurationTable objects. It will fail for all other table types.
addThreadTypeColumns | Creates the columns in the configuration table to control the type of thread associated with a thread feature or a tapped hole. Because configuring a thread requires several pieces of information, this method collects it all at once and creates all the corresponding feature aspect columns.
addVisibilityColumn | Adds a new column to control the visibility of an entity. If a visibility column already exists for the entity, the existing column is returned. This is only valid for ConfigurationTopTable and ConfigurationCustomThemeTable objects and will fail for all other table types.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified column object using an index into the collection.
itemById | A method that returns the specified column object using the ID of the column.

Properties

Name | Description
count | Returns the number of columns in the table. The name column is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationCustomThemeTable.columns, ConfigurationTopTable.columns

Version

Introduced in version January 2024


ConfigurationColumns.addClearanceTypeColumns Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Creates the columns in the configuration table to control the clearance information associated with a clearance hole. Because configuring a clearance hole requires several pieces of related information, this method collects it all at once and creates all the corresponding feature aspect columns.

The fit is also a setting that controls the hole clearance, but it's independent of the other settings and can be created independently using the addFeatureAspectColumn method.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addClearanceTypeColumns(holeFeature, holeClearanceColumns)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addClearanceTypeColumns(holeFeature, holeClearanceColumns);

Return Value

Type | Description
ConfigurationFeatureAspectColumn[] | Returns an array of the columns created. They are in order of standard, fastener type, and size.

Parameters

Name | Type | Description
holeFeature | HoleFeature | The hole feature that defines a clearance hole whose clearance will be controlled by the configuration table.
holeClearanceColumns | ConfigurationClearanceHoleColumns | Enum value that indicates which columns should be created to control the clearance hole definition. You can fully define the clearance hole by specifying the standard, fastener type, and size. Or you can leave the standard controlled by the hole and only configure the fastener type, and size. Or you can leave the standard and fastener type controlled by the hole and only configure the size. As a result, this can create and return 3, 2, or 1 columns. The fit is also a setting that controls the hole clearance, but it's independent of the other settings and can be created independently using the addFeatureAspectColumn method.

Version

Introduced in version January 2025


ConfigurationColumns.addFeatureAspectColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Creates a new column to control an aspect of a feature that supports being configured.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addFeatureAspectColumn(feature, aspectType)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addFeatureAspectColumn(feature, aspectType);

Return Value

Type | Description
ConfigurationFeatureAspectColumn | Retruns the created ConfigurationFeatureAspectColumn or null in the case of failure.

Parameters

Name | Type | Description
feature | Base | The feature to be configured. The term "feature" is used broadly and includes ThreadFeature, HoleFeature that is tapped, Joint, and AsBuiltJoint objects. The existing column is returned if a feature aspect column already exists for the feature and aspect type.
aspectType | ConfigurationFeatureAspectTypes | The aspect type to create a column for. The type specified must be a valid type for the specified feature; otherwise, this will fail with an error.

Version

Introduced in version September 2024


ConfigurationColumns.addInsertColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Add a new column to control which configuration is used for an inserted configuration. If an insert column already exists for the occurrence, the existing column is returned.

This is only valid for ConfigurationTopTable and ConfigurationCustomThemeTable objects and will fail for all other table types.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addInsertColumn(occurrence)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addInsertColumn(occurrence);

Return Value

Type | Description
ConfigurationInsertColumn | Returns the new column or null in the case of failure.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that references a configuration.

Version

Introduced in version March 2024


ConfigurationColumns.addParameterColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Adds a new parameter column to the configuration table. If a parameter column already exists for the parameter, the existing column is returned.

This is only valid for TopConfigurationTable and ThemeConfigurationTable objects. It will fail for all other table types.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addParameterColumn(parameter)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addParameterColumn(parameter);

Return Value

Type | Description
ConfigurationParameterColumn | Returns the new column or null in the case of failure.

Parameters

Name | Type | Description
parameter | Parameter | The parameter to add to the table.

Version

Introduced in version March 2024


ConfigurationColumns.addPropertyColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Add a new column to control the property inside the component. The component is the owner of the property. This is only valid for TopConfigurationTable. It will fail for all other table types.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addPropertyColumn(property)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addPropertyColumn(property);

Return Value

Type | Description
ConfigurationPropertyColumn | Returns the new column or null in the case of failure.

Parameters

Name | Type | Description
property | Property | The property to add to the table.

Version

Introduced in version March 2024


ConfigurationColumns.addSuppressColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Adds a new column to control the suppression of a feature. The term "feature" is used broadly and includes anything displayed in the timeline. If a suppression column already exists for the feature, the existing column is returned.

This is only valid for TopConfigurationTable and ThemeConfigurationTable objects. It will fail for all other table types.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addSuppressColumn(feature)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addSuppressColumn(feature);

Return Value

Type | Description
ConfigurationSuppressColumn | Returns the new column or null in the case of failure.

Parameters

Name | Type | Description
feature | Base | The feature to add to the table. Any object that is displayed in the timeline can be used as input. For example, some valid objects are any modeling features, sketches, construction geometry, and joints.

Version

Introduced in version March 2024


ConfigurationColumns.addThreadTypeColumns Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Creates the columns in the configuration table to control the type of thread associated with a thread feature or a tapped hole. Because configuring a thread requires several pieces of information, this method collects it all at once and creates all the corresponding feature aspect columns.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addThreadTypeColumns(threadFeature, threadColumns)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addThreadTypeColumns(threadFeature, threadColumns);

Return Value

Type | Description
ConfigurationFeatureAspectColumn[] | Returns an array of the columns created. They are in order of type, size, designation, and class.

Parameters

Name | Type | Description
threadFeature | Feature | The thread or tapped hole feature whose thread will be controlled by the configuration table.
threadColumns | ConfigurationThreadColumns | Enum value that indicates which columns should be created to control the thread type. You can fully define the thread type by specifying the type, size, designation, and class. Or you can leave the thread type controlled by the feature and only configure the size, designation, and class. Or you can leave the thread type and size controlled by the feature and only configure the designation and class. Or you can leave the thread type, size, and designation controlled by the feature and only configure the class. As a result, this can create and return 4, 3, 2, or 1 columns.

Version

Introduced in version September 2024


ConfigurationColumns.addVisibilityColumn Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Adds a new column to control the visibility of an entity. If a visibility column already exists for the entity, the existing column is returned.

This is only valid for ConfigurationTopTable and ConfigurationCustomThemeTable objects and will fail for all other table types.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.addVisibilityColumn(entity)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->addVisibilityColumn(entity);

Return Value

Type | Description
ConfigurationVisibilityColumn | Returns the new column or null in the case of failure.

Parameters

Name | Type | Description
entity | Base | Returns the entity whose visibility will be controlled by this column.

Version

Introduced in version March 2024


ConfigurationColumns.classType Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationColumns.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = adsk::fusion::ConfigurationColumns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationColumns.count Property

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Returns the number of columns in the table. The name column is not included.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

# Get the value of the property.
propertyValue = configurationColumns_var.count
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
#include <Fusion/Configurations/ConfigurationColumns.h>

// Get the value of the property.
uinteger propertyValue = configurationColumns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationColumns.isValid Property

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

# Get the value of the property.
propertyValue = configurationColumns_var.isValid
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
#include <Fusion/Configurations/ConfigurationColumns.h>

// Get the value of the property.
boolean propertyValue = configurationColumns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationColumns.item Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

A method that returns the specified column object using an index into the collection.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.item(index)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->item(index);

Return Value

Type | Description
ConfigurationColumn | 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 2024


ConfigurationColumns.itemById Method

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

A method that returns the specified column object using the ID of the column.

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
returnValue = configurationColumns_var.itemById(id)
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

#include <Fusion/Configurations/ConfigurationColumns.h>

returnValue = configurationColumns_var->itemById(id);

Return Value

Type | Description
ConfigurationColumn | Returns the specified item or null if no column matches the provided ID.

Parameters

Name | Type | Description
id | string | The ID of the column within the collection to return.

Version

Introduced in version January 2024


ConfigurationColumns.objectType Property

Parent Object: ConfigurationColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationColumns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.

# Get the value of the property.
propertyValue = configurationColumns_var.objectType
"configurationColumns_var" is a variable referencing a ConfigurationColumns object.
#include <Fusion/Configurations/ConfigurationColumns.h>

// Get the value of the property.
string propertyValue = configurationColumns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

API object representing a custom theme configuration table associated with a top table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 custom theme table from the configuration.
getCell | Returns the cell at the specified row and column.
moveColumns | Moves the specified columns from one table to another.

Properties

Name | Description
columns | Returns the columns in this table.
id | Returns the unique ID of this table.
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 table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTableColumn | Returns the column in the top table that references this custom theme table.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationCustomThemeTables.add, ConfigurationCustomThemeTables.item

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.classType Method

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationCustomThemeTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

returnValue = adsk::fusion::ConfigurationCustomThemeTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.columns Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Returns the columns in this table.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.columns
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
Ptr<ConfigurationColumns> propertyValue = configurationCustomThemeTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationColumns.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.deleteMe Method

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Deletes this custom theme table from the configuration.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
returnValue = configurationCustomThemeTable_var.deleteMe(deleteColumns)
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

returnValue = configurationCustomThemeTable_var->deleteMe(deleteColumns);

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Parameters

Name | Type | Description
deleteColumns | boolean | If true, this deletes the columns in the custom theme table. If false, it moves them back to the top table.

Version

Introduced in version March 2024


ConfigurationCustomThemeTable.getCell Method

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
returnValue = configurationCustomThemeTable_var.getCell(column, row)
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

returnValue = configurationCustomThemeTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.id Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.id
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
string propertyValue = configurationCustomThemeTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.isValid Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.isValid
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
boolean propertyValue = configurationCustomThemeTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.moveColumns Method

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Moves the specified columns from one table to another.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
returnValue = configurationCustomThemeTable_var.moveColumns(columns, targetTable)
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

returnValue = configurationCustomThemeTable_var->moveColumns(columns, targetTable);

Return Value

Type | Description
ConfigurationColumn[] | Returns an array of the columns created due to the move.

Parameters

Name | Type | Description
columns | ConfigurationColumn[] | An array of the columns within this table that you want to move.
targetTable | ConfigurationTable | The table you want to move the columns to. The target must be either a top table or a custom theme table.

Version

Introduced in version March 2024


ConfigurationCustomThemeTable.name Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Gets and sets the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.name

# Set the value of the property.
configurationCustomThemeTable_var.name = propertyValue
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
string propertyValue = configurationCustomThemeTable_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationCustomThemeTable_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.objectType Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.objectType
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
string propertyValue = configurationCustomThemeTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.parentTableColumn Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Returns the column in the top table that references this custom theme table.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.parentTableColumn
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationCustomThemeTable_var->parentTableColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version January 2024


ConfigurationCustomThemeTable.rows Property

Parent Object: ConfigurationCustomThemeTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.

# Get the value of the property.
propertyValue = configurationCustomThemeTable_var.rows
"configurationCustomThemeTable_var" is a variable referencing a ConfigurationCustomThemeTable object.
#include <Fusion/Configurations/ConfigurationCustomThemeTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationCustomThemeTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationCustomThemeTables Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

Provides access to the custom theme tables associated with a configuration table and provides the functionality to create new custom theme tables.

Methods

Name | Description
add | Creates a new custom theme table using the specified columns.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified custom theme table using an index into the collection.

Properties

Name | Description
count | Returns the number of custom theme tables associated with the top table.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationTopTable.customThemeTables

Version

Introduced in version January 2024


ConfigurationCustomThemeTables.add Method

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

Creates a new custom theme table using the specified columns.

Syntax

  • Python
  • C++
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.
returnValue = configurationCustomThemeTables_var.add(columns)
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.

#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

returnValue = configurationCustomThemeTables_var->add(columns);

Return Value

Type | Description
ConfigurationCustomThemeTable | Returns the newly created ConfigurationCustomThemeTable or null if the creation fails.

Parameters

Name | Type | Description
columns | ConfigurationColumn[] | An array of ConfigurationColumn objects used to create a new custom theme table. The columns must exist within the top configuration table, and they cannot include any ConfigurationThemeColumn, ConfigurationPropertyColumn, ConfigurationAppearanceColumn, ConfigurationMaterialColumn, ConfigurationPlasticRuleColumn, or ConfigurationSheetMetalRuleColumn objects. The specified columns will be removed from the main table, and a new ConfigurationThemeColumn will be created in the top table to reference the newly created custom theme table.

Version

Introduced in version March 2024


ConfigurationCustomThemeTables.classType Method

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationCustomThemeTables.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

returnValue = adsk::fusion::ConfigurationCustomThemeTables::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationCustomThemeTables.count Property

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

Returns the number of custom theme tables associated with the top table.

Syntax

  • Python
  • C++
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.

# Get the value of the property.
propertyValue = configurationCustomThemeTables_var.count
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.
#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

// Get the value of the property.
uinteger propertyValue = configurationCustomThemeTables_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationCustomThemeTables.isValid Property

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.

# Get the value of the property.
propertyValue = configurationCustomThemeTables_var.isValid
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.
#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

// Get the value of the property.
boolean propertyValue = configurationCustomThemeTables_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationCustomThemeTables.item Method

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

A method that returns the specified custom theme table using an index into the collection.

Syntax

  • Python
  • C++
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.
returnValue = configurationCustomThemeTables_var.item(index)
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.

#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

returnValue = configurationCustomThemeTables_var->item(index);

Return Value

Type | Description
ConfigurationCustomThemeTable | 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 2024


ConfigurationCustomThemeTables.objectType Property

Parent Object: ConfigurationCustomThemeTables
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationCustomThemeTables.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.

# Get the value of the property.
propertyValue = configurationCustomThemeTables_var.objectType
"configurationCustomThemeTables_var" is a variable referencing a ConfigurationCustomThemeTables object.
#include <Fusion/Configurations/ConfigurationCustomThemeTables.h>

// Get the value of the property.
string propertyValue = configurationCustomThemeTables_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationFeatureAspectBooleanCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

This object represents a cell from a column that defines a configuration feature aspect with a Boolean value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
value | Gets and sets the value of the property associated with the parent column of this cell.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.classType Method

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationFeatureAspectBooleanCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

returnValue = adsk::fusion::ConfigurationFeatureAspectBooleanCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.isValid Property

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectBooleanCell_var.isValid
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

// Get the value of the property.
boolean propertyValue = configurationFeatureAspectBooleanCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.objectType Property

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectBooleanCell_var.objectType
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectBooleanCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.parentColumn Property

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectBooleanCell_var.parentColumn
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

// Get the value of the property.
Ptr<ConfigurationFeatureAspectColumn> propertyValue = configurationFeatureAspectBooleanCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationFeatureAspectColumn.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.parentRow Property

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectBooleanCell_var.parentRow
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationFeatureAspectBooleanCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version September 2024


ConfigurationFeatureAspectBooleanCell.value Property

Parent Object: ConfigurationFeatureAspectBooleanCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

Description

Gets and sets the value of the property associated with the parent column of this cell.

Syntax

  • Python
  • C++
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectBooleanCell_var.value

# Set the value of the property.
configurationFeatureAspectBooleanCell_var.value = propertyValue
"configurationFeatureAspectBooleanCell_var" is a variable referencing a ConfigurationFeatureAspectBooleanCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectBooleanCell.h>

// Get the value of the property.
boolean propertyValue = configurationFeatureAspectBooleanCell_var->value();

// Set the value of the property, where value_var is a boolean.
bool returnValue = configurationFeatureAspectBooleanCell_var->value(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Represents a feature aspect column in a configuration table. Feature aspects are properties of a feature that are unique to a particular type of feature. This includes various thread and joint settings.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned. The first row has an index of 0 and does not include the header row.
getCellByRowId | This method returns the cell in this column at the row identified by its ID. Depending on the type of data in the cells within the column, a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.
getCellByRowName | Gets the cell in this column at the row specified by its name. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Properties

Name | Description
aspectType | Gets the type of feature aspect this column is controlling.
feature Returns the feature being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | This property returns the parent table, either the top or custom theme table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addClearanceTypeColumns, ConfigurationColumns.addFeatureAspectColumn, ConfigurationColumns.addThreadTypeColumns, ConfigurationFeatureAspectBooleanCell.parentColumn, ConfigurationFeatureAspectStringCell.parentColumn

Derived Classes

ConfigurationJointSnapColumn

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.aspectType Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Gets the type of feature aspect this column is controlling.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.aspectType
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
ConfigurationFeatureAspectTypes propertyValue = configurationFeatureAspectColumn_var->aspectType();

Property Value

This is a read only property whose value is a ConfigurationFeatureAspectTypes.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.classType Method

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationFeatureAspectColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

returnValue = adsk::fusion::ConfigurationFeatureAspectColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.deleteMe Method

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
returnValue = configurationFeatureAspectColumn_var.deleteMe()
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

returnValue = configurationFeatureAspectColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.feature Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Returns the feature being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.feature
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationFeatureAspectColumn_var->feature();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.getCell Method

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Gets the cell in this column at the specified row. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
returnValue = configurationFeatureAspectColumn_var.getCell(rowIndex)
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

returnValue = configurationFeatureAspectColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.getCellByRowId Method

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

This method returns the cell in this column at the row identified by its ID. Depending on the type of data in the cells within the column, a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
returnValue = configurationFeatureAspectColumn_var.getCellByRowId(rowId)
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

returnValue = configurationFeatureAspectColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.getCellByRowName Method

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Gets the cell in this column at the row specified by its name. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
returnValue = configurationFeatureAspectColumn_var.getCellByRowName(rowName)
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

returnValue = configurationFeatureAspectColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.id Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.id
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.index Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.index
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationFeatureAspectColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.isValid Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.isValid
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
boolean propertyValue = configurationFeatureAspectColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.objectType Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.objectType
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.parentTable Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

This property returns the parent table, either the top or custom theme table this column is in.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.parentTable
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationFeatureAspectColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.rowCount Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.rowCount
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationFeatureAspectColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


ConfigurationFeatureAspectColumn.title Property

Parent Object: ConfigurationFeatureAspectColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.

# Get the value of the property.
propertyValue = configurationFeatureAspectColumn_var.title

# Set the value of the property.
configurationFeatureAspectColumn_var.title = propertyValue
"configurationFeatureAspectColumn_var" is a variable referencing a ConfigurationFeatureAspectColumn object.
#include <Fusion/Configurations/ConfigurationFeatureAspectColumn.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationFeatureAspectColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Represents a cell from a column that defines a configuration feature aspect that is a String value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
value | Gets and sets the value of the property associated with the parent column of this cell.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.classType Method

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationFeatureAspectStringCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

returnValue = adsk::fusion::ConfigurationFeatureAspectStringCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.isValid Property

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectStringCell_var.isValid
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

// Get the value of the property.
boolean propertyValue = configurationFeatureAspectStringCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.objectType Property

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectStringCell_var.objectType
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectStringCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.parentColumn Property

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectStringCell_var.parentColumn
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

// Get the value of the property.
Ptr<ConfigurationFeatureAspectColumn> propertyValue = configurationFeatureAspectStringCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationFeatureAspectColumn.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.parentRow Property

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectStringCell_var.parentRow
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationFeatureAspectStringCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version September 2024


ConfigurationFeatureAspectStringCell.value Property

Parent Object: ConfigurationFeatureAspectStringCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

Description

Gets and sets the value of the property associated with the parent column of this cell.

Syntax

  • Python
  • C++
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.

# Get the value of the property.
propertyValue = configurationFeatureAspectStringCell_var.value

# Set the value of the property.
configurationFeatureAspectStringCell_var.value = propertyValue
"configurationFeatureAspectStringCell_var" is a variable referencing a ConfigurationFeatureAspectStringCell object.
#include <Fusion/Configurations/ConfigurationFeatureAspectStringCell.h>

// Get the value of the property.
string propertyValue = configurationFeatureAspectStringCell_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationFeatureAspectStringCell_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


ConfigurationFuture Object

Derived from: Future Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFuture.h>

Description

Used to check the state of the asynchronous configuration operation

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
state | Returns the current state of the process associated with this future.

Accessed From

ConfigurationRow.generate

Version

Introduced in version January 2025


ConfigurationFuture.classType Method

Parent Object: ConfigurationFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationFuture.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationFuture.h>

returnValue = adsk::fusion::ConfigurationFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ConfigurationFuture.isValid Property

Parent Object: ConfigurationFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.

# Get the value of the property.
propertyValue = configurationFuture_var.isValid
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.
#include <Fusion/Configurations/ConfigurationFuture.h>

// Get the value of the property.
boolean propertyValue = configurationFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ConfigurationFuture.objectType Property

Parent Object: ConfigurationFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.

# Get the value of the property.
propertyValue = configurationFuture_var.objectType
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.
#include <Fusion/Configurations/ConfigurationFuture.h>

// Get the value of the property.
string propertyValue = configurationFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ConfigurationFuture.state Property

Parent Object: ConfigurationFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationFuture.h>

Description

Returns the current state of the process associated with this future.

Syntax

  • Python
  • C++
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.

# Get the value of the property.
propertyValue = configurationFuture_var.state
"configurationFuture_var" is a variable referencing a ConfigurationFuture object.
#include <Fusion/Configurations/ConfigurationFuture.h>

// Get the value of the property.
FutureStates propertyValue = configurationFuture_var->state();

Property Value

This is a read only property whose value is a FutureStates.

Version

Introduced in version January 2025


ConfigurationInsertCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Represents a single cell within a top or custom theme configuration table that controls which configuration is used for an inserted configured design. Use the parent column to get the feature being suppressed.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
row | Gets and sets which row of the configured design is used for this cell. When setting this property, the row must come from the configured design used by the occurrence associated with the parent column of this cell.

Accessed From

ConfigurationInsertColumn.getCell, ConfigurationInsertColumn.getCellByRowId, ConfigurationInsertColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationInsertCell.classType Method

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationInsertCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationInsertCell.h>

returnValue = adsk::fusion::ConfigurationInsertCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationInsertCell.isValid Property

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.

# Get the value of the property.
propertyValue = configurationInsertCell_var.isValid
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.
#include <Fusion/Configurations/ConfigurationInsertCell.h>

// Get the value of the property.
boolean propertyValue = configurationInsertCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationInsertCell.objectType Property

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.

# Get the value of the property.
propertyValue = configurationInsertCell_var.objectType
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.
#include <Fusion/Configurations/ConfigurationInsertCell.h>

// Get the value of the property.
string propertyValue = configurationInsertCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationInsertCell.parentColumn Property

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.

# Get the value of the property.
propertyValue = configurationInsertCell_var.parentColumn
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.
#include <Fusion/Configurations/ConfigurationInsertCell.h>

// Get the value of the property.
Ptr<ConfigurationInsertColumn> propertyValue = configurationInsertCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationInsertColumn.

Version

Introduced in version January 2024


ConfigurationInsertCell.parentRow Property

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.

# Get the value of the property.
propertyValue = configurationInsertCell_var.parentRow
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.
#include <Fusion/Configurations/ConfigurationInsertCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationInsertCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationInsertCell.row Property

Parent Object: ConfigurationInsertCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertCell.h>

Description

Gets and sets which row of the configured design is used for this cell. When setting this property, the row must come from the configured design used by the occurrence associated with the parent column of this cell.

Syntax

  • Python
  • C++
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.

# Get the value of the property.
propertyValue = configurationInsertCell_var.row

# Set the value of the property.
configurationInsertCell_var.row = propertyValue
"configurationInsertCell_var" is a variable referencing a ConfigurationInsertCell object.
#include <Fusion/Configurations/ConfigurationInsertCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationInsertCell_var->row();

// Set the value of the property, where value_var is a ConfigurationRow.
bool returnValue = configurationInsertCell_var->row(value_var);

Property Value

This is a read/write property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationInsertColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Represents a column where a configured design has been inserted in this design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrence Returns the occurrence that is associated with this configuration insertion.

This property returns null when the table being queried was obtained from a DataFile object.
parentTable | Returns the parent table, either top or custom theme table, this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addInsertColumn, ConfigurationInsertCell.parentColumn

Version

Introduced in version January 2024


ConfigurationInsertColumn.classType Method

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationInsertColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationInsertColumn.h>

returnValue = adsk::fusion::ConfigurationInsertColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationInsertColumn.deleteMe Method

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
returnValue = configurationInsertColumn_var.deleteMe()
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

#include <Fusion/Configurations/ConfigurationInsertColumn.h>

returnValue = configurationInsertColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationInsertColumn.getCell Method

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
returnValue = configurationInsertColumn_var.getCell(rowIndex)
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

#include <Fusion/Configurations/ConfigurationInsertColumn.h>

returnValue = configurationInsertColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationInsertCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationInsertColumn.getCellByRowId Method

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
returnValue = configurationInsertColumn_var.getCellByRowId(rowId)
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

#include <Fusion/Configurations/ConfigurationInsertColumn.h>

returnValue = configurationInsertColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationInsertCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationInsertColumn.getCellByRowName Method

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
returnValue = configurationInsertColumn_var.getCellByRowName(rowName)
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

#include <Fusion/Configurations/ConfigurationInsertColumn.h>

returnValue = configurationInsertColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationInsertCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationInsertColumn.id Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.id
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
string propertyValue = configurationInsertColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationInsertColumn.index Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.index
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationInsertColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationInsertColumn.isValid Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.isValid
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
boolean propertyValue = configurationInsertColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationInsertColumn.objectType Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.objectType
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
string propertyValue = configurationInsertColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationInsertColumn.occurrence Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Returns the occurrence that is associated with this configuration insertion.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.occurrence
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = configurationInsertColumn_var->occurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2024


ConfigurationInsertColumn.parentTable Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Returns the parent table, either top or custom theme table, this column is in.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.parentTable
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationInsertColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version March 2024


ConfigurationInsertColumn.rowCount Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.rowCount
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationInsertColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationInsertColumn.title Property

Parent Object: ConfigurationInsertColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationInsertColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.

# Get the value of the property.
propertyValue = configurationInsertColumn_var.title

# Set the value of the property.
configurationInsertColumn_var.title = propertyValue
"configurationInsertColumn_var" is a variable referencing a ConfigurationInsertColumn object.
#include <Fusion/Configurations/ConfigurationInsertColumn.h>

// Get the value of the property.
string propertyValue = configurationInsertColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationInsertColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationJointSnap Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

This object represents an individual joint snap that has been defined for a ConfigurationJointSnapColumn. Multiple joint snaps can be defined for a column and then one of those joint snaps is specified in each cell of the column.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 joint snap.

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.
jointGeometry | Gets and sets the JointGeometry object for this snap.
name | Gets and sets the name of the snap.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationJointSnapCell.snap, ConfigurationJointSnaps.add, ConfigurationJointSnaps.item, ConfigurationJointSnaps.itemByName

Version

Introduced in version September 2024


ConfigurationJointSnap.classType Method

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationJointSnap.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationJointSnap.h>

returnValue = adsk::fusion::ConfigurationJointSnap::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationJointSnap.deleteMe Method

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

Deletes this joint snap.

Syntax

  • Python
  • C++
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.
returnValue = configurationJointSnap_var.deleteMe()
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.

#include <Fusion/Configurations/ConfigurationJointSnap.h>

returnValue = configurationJointSnap_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2024


ConfigurationJointSnap.isValid Property

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.

# Get the value of the property.
propertyValue = configurationJointSnap_var.isValid
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.
#include <Fusion/Configurations/ConfigurationJointSnap.h>

// Get the value of the property.
boolean propertyValue = configurationJointSnap_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationJointSnap.jointGeometry Property

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

Gets and sets the JointGeometry object for this snap.

Syntax

  • Python
  • C++
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.

# Get the value of the property.
propertyValue = configurationJointSnap_var.jointGeometry

# Set the value of the property.
configurationJointSnap_var.jointGeometry = propertyValue
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.
#include <Fusion/Configurations/ConfigurationJointSnap.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationJointSnap_var->jointGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = configurationJointSnap_var->jointGeometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2024


ConfigurationJointSnap.name Property

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

Gets and sets the name of the snap.

Syntax

  • Python
  • C++
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.

# Get the value of the property.
propertyValue = configurationJointSnap_var.name

# Set the value of the property.
configurationJointSnap_var.name = propertyValue
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.
#include <Fusion/Configurations/ConfigurationJointSnap.h>

// Get the value of the property.
string propertyValue = configurationJointSnap_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationJointSnap_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnap.objectType Property

Parent Object: ConfigurationJointSnap
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnap.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.

# Get the value of the property.
propertyValue = configurationJointSnap_var.objectType
"configurationJointSnap_var" is a variable referencing a ConfigurationJointSnap object.
#include <Fusion/Configurations/ConfigurationJointSnap.h>

// Get the value of the property.
string propertyValue = configurationJointSnap_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnapCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

This object represents a joint snap that has been defined for a ConfigurationJointSnapColumn. Joint snaps are defined on the parent column, and the cell specifies which of the defined snaps will be used when the parent row of the cell is active.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
snap | Gets and sets which snap will be used when the row this cell is in is active. When setting this property, only snaps defined for the parent column of this cell can be used.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.classType Method

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationJointSnapCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

returnValue = adsk::fusion::ConfigurationJointSnapCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.isValid Property

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.

# Get the value of the property.
propertyValue = configurationJointSnapCell_var.isValid
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.
#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

// Get the value of the property.
boolean propertyValue = configurationJointSnapCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.objectType Property

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.

# Get the value of the property.
propertyValue = configurationJointSnapCell_var.objectType
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.
#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

// Get the value of the property.
string propertyValue = configurationJointSnapCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.parentColumn Property

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.

# Get the value of the property.
propertyValue = configurationJointSnapCell_var.parentColumn
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.
#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

// Get the value of the property.
Ptr<ConfigurationJointSnapColumn> propertyValue = configurationJointSnapCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationJointSnapColumn.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.parentRow Property

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.

# Get the value of the property.
propertyValue = configurationJointSnapCell_var.parentRow
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.
#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationJointSnapCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version September 2024


ConfigurationJointSnapCell.snap Property

Parent Object: ConfigurationJointSnapCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapCell.h>

Description

Gets and sets which snap will be used when the row this cell is in is active. When setting this property, only snaps defined for the parent column of this cell can be used.

Syntax

  • Python
  • C++
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.

# Get the value of the property.
propertyValue = configurationJointSnapCell_var.snap

# Set the value of the property.
configurationJointSnapCell_var.snap = propertyValue
"configurationJointSnapCell_var" is a variable referencing a ConfigurationJointSnapCell object.
#include <Fusion/Configurations/ConfigurationJointSnapCell.h>

// Get the value of the property.
Ptr<ConfigurationJointSnap> propertyValue = configurationJointSnapCell_var->snap();

// Set the value of the property, where value_var is a ConfigurationJointSnap.
bool returnValue = configurationJointSnapCell_var->snap(value_var);

Property Value

This is a read/write property whose value is a ConfigurationJointSnap.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn Object

Derived from: ConfigurationFeatureAspectColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

This object represents a column in the table that controls which joint snap to use for a particular joint. The columns contains a list of joint snaps that have been defined specifically for that column. One of the joint snaps is specified for each cell in the column. That joint snap will be used by the joint when the row that cell is in is active.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned. The first row has an index of 0 and does not include the header row.
getCellByRowId | This method returns the cell in this column at the row identified by its ID. Depending on the type of data in the cells within the column, a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.
getCellByRowName | Gets the cell in this column at the row specified by its name. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Properties

Name | Description
aspectType | Gets the type of feature aspect this column is controlling.
feature Returns the feature being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
joint Returns the joint or as-built joint being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | This property returns the parent table, either the top or custom theme table this column is in.
rowCount | Returns the number of rows in this column.
snaps | Provides access to any joint snaps that have been defined for this column. Using the returned collection you can define new joint snaps. Use the cell to specify which of the defined snaps is used for a specific row.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationJointSnapCell.parentColumn

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.aspectType Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Gets the type of feature aspect this column is controlling.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.aspectType
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
ConfigurationFeatureAspectTypes propertyValue = configurationJointSnapColumn_var->aspectType();

Property Value

This is a read only property whose value is a ConfigurationFeatureAspectTypes.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.classType Method

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationJointSnapColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

returnValue = adsk::fusion::ConfigurationJointSnapColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.deleteMe Method

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
returnValue = configurationJointSnapColumn_var.deleteMe()
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

returnValue = configurationJointSnapColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.feature Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Returns the feature being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.feature
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationJointSnapColumn_var->feature();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.getCell Method

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Gets the cell in this column at the specified row. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
returnValue = configurationJointSnapColumn_var.getCell(rowIndex)
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

returnValue = configurationJointSnapColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.getCellByRowId Method

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

This method returns the cell in this column at the row identified by its ID. Depending on the type of data in the cells within the column, a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
returnValue = configurationJointSnapColumn_var.getCellByRowId(rowId)
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

returnValue = configurationJointSnapColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.getCellByRowName Method

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Gets the cell in this column at the row specified by its name. Depending on the type of data in the cells within the column a ConfigurationFeatureAspectBooleanCell or ConfigurationFeatureAspectStringCell will be returned.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
returnValue = configurationJointSnapColumn_var.getCellByRowName(rowName)
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

returnValue = configurationJointSnapColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.id Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.id
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
string propertyValue = configurationJointSnapColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.index Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.index
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationJointSnapColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.isValid Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.isValid
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
boolean propertyValue = configurationJointSnapColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.joint Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Returns the joint or as-built joint being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.joint
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationJointSnapColumn_var->joint();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.objectType Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.objectType
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
string propertyValue = configurationJointSnapColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.parentTable Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

This property returns the parent table, either the top or custom theme table this column is in.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.parentTable
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationJointSnapColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.rowCount Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.rowCount
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationJointSnapColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.snaps Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

Provides access to any joint snaps that have been defined for this column. Using the returned collection you can define new joint snaps. Use the cell to specify which of the defined snaps is used for a specific row.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.snaps
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
Ptr<ConfigurationJointSnaps> propertyValue = configurationJointSnapColumn_var->snaps();

Property Value

This is a read only property whose value is a ConfigurationJointSnaps.

Version

Introduced in version September 2024


ConfigurationJointSnapColumn.title Property

Parent Object: ConfigurationJointSnapColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnapColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.

# Get the value of the property.
propertyValue = configurationJointSnapColumn_var.title

# Set the value of the property.
configurationJointSnapColumn_var.title = propertyValue
"configurationJointSnapColumn_var" is a variable referencing a ConfigurationJointSnapColumn object.
#include <Fusion/Configurations/ConfigurationJointSnapColumn.h>

// Get the value of the property.
string propertyValue = configurationJointSnapColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationJointSnapColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


ConfigurationJointSnaps Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

Collection object that provides access to all the joint snaps that have been defined for a ConfigurationJointSnapColumn. You can also use this collection to define new joint snaps that will then be available when specifying which snap to use in a cell.

Methods

Name | Description
add | Adds a new snap to the column. The snaps associated with the column can be used in the cells in the column.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified snap using an index into the collection.
itemByName | A method that returns the snap with the specified name.

Properties

Name | Description
count | Returns the number of snaps for the column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationJointSnapColumn.snaps

Version

Introduced in version September 2024


ConfigurationJointSnaps.add Method

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

Adds a new snap to the column. The snaps associated with the column can be used in the cells in the column.

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
returnValue = configurationJointSnaps_var.add(name, jointGeometry)
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

#include <Fusion/Configurations/ConfigurationJointSnaps.h>

returnValue = configurationJointSnaps_var->add(name, jointGeometry);

Return Value

Type | Description
ConfigurationJointSnap | Returns the newly created ConfigurationJointSnap.

Parameters

Name | Type | Description
name | string | The name of the new snap. The name must be unique with respect to the other snaps defined for this column. An empty string can be provided, which will cause Fusion to use a default naming scheme to create a name.
jointGeometry | Base | A JointGeometry object that defines how the snap is defined. When creating the JointGeometry object, it must be limited to geometry in the occurrence associated with the column.

Version

Introduced in version September 2024


ConfigurationJointSnaps.classType Method

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationJointSnaps.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationJointSnaps.h>

returnValue = adsk::fusion::ConfigurationJointSnaps::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


ConfigurationJointSnaps.count Property

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

Returns the number of snaps for the column.

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

# Get the value of the property.
propertyValue = configurationJointSnaps_var.count
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
#include <Fusion/Configurations/ConfigurationJointSnaps.h>

// Get the value of the property.
uinteger propertyValue = configurationJointSnaps_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


ConfigurationJointSnaps.isValid Property

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

# Get the value of the property.
propertyValue = configurationJointSnaps_var.isValid
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
#include <Fusion/Configurations/ConfigurationJointSnaps.h>

// Get the value of the property.
boolean propertyValue = configurationJointSnaps_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


ConfigurationJointSnaps.item Method

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

A method that returns the specified snap using an index into the collection.

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
returnValue = configurationJointSnaps_var.item(index)
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

#include <Fusion/Configurations/ConfigurationJointSnaps.h>

returnValue = configurationJointSnaps_var->item(index);

Return Value

Type | Description
ConfigurationJointSnap | Returns the specified snap or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the snap to return, where the first row is index 0.

Version

Introduced in version September 2024


ConfigurationJointSnaps.itemByName Method

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

A method that returns the snap with the specified name.

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
returnValue = configurationJointSnaps_var.itemByName(name)
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

#include <Fusion/Configurations/ConfigurationJointSnaps.h>

returnValue = configurationJointSnaps_var->itemByName(name);

Return Value

Type | Description
ConfigurationJointSnap | Returns the specified snap or null if a snap with the specified name does not exist.

Parameters

Name | Type | Description
name | string | The name of the snap to return.

Version

Introduced in version September 2024


ConfigurationJointSnaps.objectType Property

Parent Object: ConfigurationJointSnaps
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationJointSnaps.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.

# Get the value of the property.
propertyValue = configurationJointSnaps_var.objectType
"configurationJointSnaps_var" is a variable referencing a ConfigurationJointSnaps object.
#include <Fusion/Configurations/ConfigurationJointSnaps.h>

// Get the value of the property.
string propertyValue = configurationJointSnaps_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


ConfigurationMaterialCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Represents a single cell within a ConfigurationMaterialTable table that controls which material is assigned to a component or body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
material | Gets and sets the material associated with this cell. When setting this property, the material used must exist in the design.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.

Accessed From

ConfigurationMaterialColumn.getCell, ConfigurationMaterialColumn.getCellByRowId, ConfigurationMaterialColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationMaterialCell.classType Method

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationMaterialCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationMaterialCell.h>

returnValue = adsk::fusion::ConfigurationMaterialCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationMaterialCell.isValid Property

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.

# Get the value of the property.
propertyValue = configurationMaterialCell_var.isValid
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.
#include <Fusion/Configurations/ConfigurationMaterialCell.h>

// Get the value of the property.
boolean propertyValue = configurationMaterialCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationMaterialCell.material Property

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Gets and sets the material associated with this cell. When setting this property, the material used must exist in the design.

Syntax

  • Python
  • C++
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.

# Get the value of the property.
propertyValue = configurationMaterialCell_var.material

# Set the value of the property.
configurationMaterialCell_var.material = propertyValue
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.
#include <Fusion/Configurations/ConfigurationMaterialCell.h>

// Get the value of the property.
Ptr<Material> propertyValue = configurationMaterialCell_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = configurationMaterialCell_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version January 2024


ConfigurationMaterialCell.objectType Property

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.

# Get the value of the property.
propertyValue = configurationMaterialCell_var.objectType
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.
#include <Fusion/Configurations/ConfigurationMaterialCell.h>

// Get the value of the property.
string propertyValue = configurationMaterialCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialCell.parentColumn Property

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.

# Get the value of the property.
propertyValue = configurationMaterialCell_var.parentColumn
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.
#include <Fusion/Configurations/ConfigurationMaterialCell.h>

// Get the value of the property.
Ptr<ConfigurationMaterialColumn> propertyValue = configurationMaterialCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationMaterialColumn.

Version

Introduced in version January 2024


ConfigurationMaterialCell.parentRow Property

Parent Object: ConfigurationMaterialCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.

# Get the value of the property.
propertyValue = configurationMaterialCell_var.parentRow
"configurationMaterialCell_var" is a variable referencing a ConfigurationMaterialCell object.
#include <Fusion/Configurations/ConfigurationMaterialCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationMaterialCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationMaterialColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Represents a material column in the material table. This defines the material to use for a specific component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
entity | Returns the Component or BRepBody being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMaterialTable | Returns the parent material table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationMaterialCell.parentColumn, ConfigurationMaterialColumns.add, ConfigurationMaterialColumns.item, ConfigurationMaterialColumns.itemById

Version

Introduced in version January 2024


ConfigurationMaterialColumn.classType Method

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationMaterialColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

returnValue = adsk::fusion::ConfigurationMaterialColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.deleteMe Method

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
returnValue = configurationMaterialColumn_var.deleteMe()
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

returnValue = configurationMaterialColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationMaterialColumn.entity Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Returns the Component or BRepBody being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.entity
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationMaterialColumn_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.getCell Method

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
returnValue = configurationMaterialColumn_var.getCell(rowIndex)
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

returnValue = configurationMaterialColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationMaterialCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.getCellByRowId Method

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
returnValue = configurationMaterialColumn_var.getCellByRowId(rowId)
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

returnValue = configurationMaterialColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationMaterialCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.getCellByRowName Method

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
returnValue = configurationMaterialColumn_var.getCellByRowName(rowName)
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

returnValue = configurationMaterialColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationMaterialCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.id Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.id
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
string propertyValue = configurationMaterialColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.index Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.index
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationMaterialColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.isValid Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.isValid
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
boolean propertyValue = configurationMaterialColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.objectType Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.objectType
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
string propertyValue = configurationMaterialColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.parentMaterialTable Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Returns the parent material table this column is in.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.parentMaterialTable
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
Ptr<ConfigurationMaterialTable> propertyValue = configurationMaterialColumn_var->parentMaterialTable();

Property Value

This is a read only property whose value is a ConfigurationMaterialTable.

Version

Introduced in version January 2024


ConfigurationMaterialColumn.rowCount Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.rowCount
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationMaterialColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationMaterialColumn.title Property

Parent Object: ConfigurationMaterialColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.

# Get the value of the property.
propertyValue = configurationMaterialColumn_var.title

# Set the value of the property.
configurationMaterialColumn_var.title = propertyValue
"configurationMaterialColumn_var" is a variable referencing a ConfigurationMaterialColumn object.
#include <Fusion/Configurations/ConfigurationMaterialColumn.h>

// Get the value of the property.
string propertyValue = configurationMaterialColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationMaterialColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialColumns Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

Provides access to the columns in a material table. This collection can be empty when no columns have been created. When the table is empty, it is not displayed in the user interface, and adding a column causes the table to be displayed.

Methods

Name | Description
add | Adds a new column to the material table. If you are adding the first column to the table and it is anything other than the root component, an additional column for the root component will automatically be created as the first column.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.
itemById | A method that returns the column with the specified ID.

Properties

Name | Description
count | Returns the number of columns in the table where the name column is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationMaterialTable.columns

Version

Introduced in version January 2024


ConfigurationMaterialColumns.add Method

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

Adds a new column to the material table. If you are adding the first column to the table and it is anything other than the root component, an additional column for the root component will automatically be created as the first column.

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
returnValue = configurationMaterialColumns_var.add(entity)
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

returnValue = configurationMaterialColumns_var->add(entity);

Return Value

Type | Description
ConfigurationMaterialColumn | Returns the newly created ConfigurationMaterialColumn object or null if it fails.

Parameters

Name | Type | Description
entity | Base | The component or body whose material will be controlled by this column.

Version

Introduced in version March 2024


ConfigurationMaterialColumns.classType Method

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationMaterialColumns.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

returnValue = adsk::fusion::ConfigurationMaterialColumns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationMaterialColumns.count Property

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

Returns the number of columns in the table where the name column is not included.

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

# Get the value of the property.
propertyValue = configurationMaterialColumns_var.count
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

// Get the value of the property.
uinteger propertyValue = configurationMaterialColumns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationMaterialColumns.isValid Property

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

# Get the value of the property.
propertyValue = configurationMaterialColumns_var.isValid
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

// Get the value of the property.
boolean propertyValue = configurationMaterialColumns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationMaterialColumns.item Method

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
returnValue = configurationMaterialColumns_var.item(index)
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

returnValue = configurationMaterialColumns_var->item(index);

Return Value

Type | Description
ConfigurationMaterialColumn | Returns the specified column or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the column to return, where the first column is index 0. The name column is not included.

Version

Introduced in version January 2024


ConfigurationMaterialColumns.itemById Method

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

A method that returns the column with the specified ID.

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
returnValue = configurationMaterialColumns_var.itemById(id)
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

returnValue = configurationMaterialColumns_var->itemById(id);

Return Value

Type | Description
ConfigurationMaterialColumn | Returns the specified column or null if a column with the specified ID does not exist.

Parameters

Name | Type | Description
id | string | The id of the column to return.

Version

Introduced in version January 2024


ConfigurationMaterialColumns.objectType Property

Parent Object: ConfigurationMaterialColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialColumns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.

# Get the value of the property.
propertyValue = configurationMaterialColumns_var.objectType
"configurationMaterialColumns_var" is a variable referencing a ConfigurationMaterialColumns object.
#include <Fusion/Configurations/ConfigurationMaterialColumns.h>

// Get the value of the property.
string propertyValue = configurationMaterialColumns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Represents a configuration table that defines materials assigned to bodies and components.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 content of the material table, removes the reference from the top table, and hides it in the user interface.
getCell | Returns the cell at the specified row and column.

Properties

Name | Description
columns | Returns the collection that provides access to the columns in this table.
id | Returns the unique ID of this table.
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 table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTableColumn | Returns the column in the top table that references this material table.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationMaterialColumn.parentMaterialTable, ConfigurationTopTable.materialTable

Version

Introduced in version January 2024


ConfigurationMaterialTable.classType Method

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationMaterialTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationMaterialTable.h>

returnValue = adsk::fusion::ConfigurationMaterialTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationMaterialTable.clear Method

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Clears the content of the material table, removes the reference from the top table, and hides it in the user interface.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
returnValue = configurationMaterialTable_var.clear()
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

#include <Fusion/Configurations/ConfigurationMaterialTable.h>

returnValue = configurationMaterialTable_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version March 2024


ConfigurationMaterialTable.columns Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the collection that provides access to the columns in this table.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.columns
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
Ptr<ConfigurationMaterialColumns> propertyValue = configurationMaterialTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationMaterialColumns.

Version

Introduced in version January 2024


ConfigurationMaterialTable.getCell Method

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
returnValue = configurationMaterialTable_var.getCell(column, row)
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

#include <Fusion/Configurations/ConfigurationMaterialTable.h>

returnValue = configurationMaterialTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationMaterialTable.id Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.id
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
string propertyValue = configurationMaterialTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialTable.isValid Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.isValid
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
boolean propertyValue = configurationMaterialTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationMaterialTable.name Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.name
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
string propertyValue = configurationMaterialTable_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ConfigurationMaterialTable.objectType Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.objectType
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
string propertyValue = configurationMaterialTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationMaterialTable.parentTableColumn Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the column in the top table that references this material table.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.parentTableColumn
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationMaterialTable_var->parentTableColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version March 2024


ConfigurationMaterialTable.rows Property

Parent Object: ConfigurationMaterialTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationMaterialTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.

# Get the value of the property.
propertyValue = configurationMaterialTable_var.rows
"configurationMaterialTable_var" is a variable referencing a ConfigurationMaterialTable object.
#include <Fusion/Configurations/ConfigurationMaterialTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationMaterialTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationParameterCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Represents a single cell within a configuration table that controls the value of a parameter. Get the parent column to get the parameter being controlled.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
expression | Gets and sets the expression that defines the value of the associated parameter when the parent row is active. This property behaves as read-only when the table is obtained from a DataFile 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in. From the column, you can get the parameter object being controlled.
parentRow | Returns the row this cell is in.
value | Gets and sets the value of the parameter in database units. You can use the units property of the associated Parameter object, which you can get from the column, to determine the type of units this parameter is defined in. Setting this property will overwrite any existing expression. This property behaves as read-only when the table is obtained from a DataFile object.

Accessed From

ConfigurationParameterColumn.getCell, ConfigurationParameterColumn.getCellByRowId, ConfigurationParameterColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationParameterCell.classType Method

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationParameterCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationParameterCell.h>

returnValue = adsk::fusion::ConfigurationParameterCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationParameterCell.expression Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Gets and sets the expression that defines the value of the associated parameter when the parent row is active. This property behaves as read-only when the table is obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.expression

# Set the value of the property.
configurationParameterCell_var.expression = propertyValue
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
string propertyValue = configurationParameterCell_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationParameterCell_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationParameterCell.isValid Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.isValid
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
boolean propertyValue = configurationParameterCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationParameterCell.objectType Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.objectType
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
string propertyValue = configurationParameterCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationParameterCell.parentColumn Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Returns the column this cell is in. From the column, you can get the parameter object being controlled.

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.parentColumn
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
Ptr<ConfigurationParameterColumn> propertyValue = configurationParameterCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationParameterColumn.

Version

Introduced in version January 2024


ConfigurationParameterCell.parentRow Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.parentRow
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationParameterCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationParameterCell.value Property

Parent Object: ConfigurationParameterCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterCell.h>

Description

Gets and sets the value of the parameter in database units. You can use the units property of the associated Parameter object, which you can get from the column, to determine the type of units this parameter is defined in. Setting this property will overwrite any existing expression. This property behaves as read-only when the table is obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.

# Get the value of the property.
propertyValue = configurationParameterCell_var.value

# Set the value of the property.
configurationParameterCell_var.value = propertyValue
"configurationParameterCell_var" is a variable referencing a ConfigurationParameterCell object.
#include <Fusion/Configurations/ConfigurationParameterCell.h>

// Get the value of the property.
double propertyValue = configurationParameterCell_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = configurationParameterCell_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2024


ConfigurationParameterColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Represents a parameter column in a top or custom theme configuration table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameter Returns the parameter being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.
parentTable | Returns the parent table, either top or custom theme table, this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addParameterColumn, ConfigurationParameterCell.parentColumn

Version

Introduced in version January 2024


ConfigurationParameterColumn.classType Method

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationParameterColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationParameterColumn.h>

returnValue = adsk::fusion::ConfigurationParameterColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationParameterColumn.deleteMe Method

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
returnValue = configurationParameterColumn_var.deleteMe()
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

#include <Fusion/Configurations/ConfigurationParameterColumn.h>

returnValue = configurationParameterColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationParameterColumn.getCell Method

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
returnValue = configurationParameterColumn_var.getCell(rowIndex)
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

#include <Fusion/Configurations/ConfigurationParameterColumn.h>

returnValue = configurationParameterColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationParameterCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationParameterColumn.getCellByRowId Method

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
returnValue = configurationParameterColumn_var.getCellByRowId(rowId)
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

#include <Fusion/Configurations/ConfigurationParameterColumn.h>

returnValue = configurationParameterColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationParameterCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationParameterColumn.getCellByRowName Method

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
returnValue = configurationParameterColumn_var.getCellByRowName(rowName)
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

#include <Fusion/Configurations/ConfigurationParameterColumn.h>

returnValue = configurationParameterColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationParameterCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationParameterColumn.id Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.id
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
string propertyValue = configurationParameterColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationParameterColumn.index Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.index
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationParameterColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationParameterColumn.isValid Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.isValid
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
boolean propertyValue = configurationParameterColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationParameterColumn.objectType Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.objectType
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
string propertyValue = configurationParameterColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationParameterColumn.parameter Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Returns the parameter being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.parameter
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
Ptr<Parameter> propertyValue = configurationParameterColumn_var->parameter();

Property Value

This is a read only property whose value is a Parameter.

Version

Introduced in version January 2024


ConfigurationParameterColumn.parentTable Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Returns the parent table, either top or custom theme table, this column is in.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.parentTable
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationParameterColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version January 2024


ConfigurationParameterColumn.rowCount Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.rowCount
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationParameterColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationParameterColumn.title Property

Parent Object: ConfigurationParameterColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationParameterColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.

# Get the value of the property.
propertyValue = configurationParameterColumn_var.title

# Set the value of the property.
configurationParameterColumn_var.title = propertyValue
"configurationParameterColumn_var" is a variable referencing a ConfigurationParameterColumn object.
#include <Fusion/Configurations/ConfigurationParameterColumn.h>

// Get the value of the property.
string propertyValue = configurationParameterColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationParameterColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Represents a single cell within a configuration table that controls which sheet plastic rule is assigned to a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
plasticRule | Gets and sets the plastic rule defined for this cell.

Accessed From

ConfigurationPlasticRuleColumn.getCell, ConfigurationPlasticRuleColumn.getCellByRowId, ConfigurationPlasticRuleColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.classType Method

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPlasticRuleCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

returnValue = adsk::fusion::ConfigurationPlasticRuleCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.isValid Property

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.

# Get the value of the property.
propertyValue = configurationPlasticRuleCell_var.isValid
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.
#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

// Get the value of the property.
boolean propertyValue = configurationPlasticRuleCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.objectType Property

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.

# Get the value of the property.
propertyValue = configurationPlasticRuleCell_var.objectType
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.
#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.parentColumn Property

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.

# Get the value of the property.
propertyValue = configurationPlasticRuleCell_var.parentColumn
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.
#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

// Get the value of the property.
Ptr<ConfigurationPlasticRuleColumn> propertyValue = configurationPlasticRuleCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationPlasticRuleColumn.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.parentRow Property

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.

# Get the value of the property.
propertyValue = configurationPlasticRuleCell_var.parentRow
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.
#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationPlasticRuleCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationPlasticRuleCell.plasticRule Property

Parent Object: ConfigurationPlasticRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

Description

Gets and sets the plastic rule defined for this cell.

Syntax

  • Python
  • C++
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.

# Get the value of the property.
propertyValue = configurationPlasticRuleCell_var.plasticRule

# Set the value of the property.
configurationPlasticRuleCell_var.plasticRule = propertyValue
"configurationPlasticRuleCell_var" is a variable referencing a ConfigurationPlasticRuleCell object.
#include <Fusion/Configurations/ConfigurationPlasticRuleCell.h>

// Get the value of the property.
Ptr<PlasticRule> propertyValue = configurationPlasticRuleCell_var->plasticRule();

// Set the value of the property, where value_var is a PlasticRule.
bool returnValue = configurationPlasticRuleCell_var->plasticRule(value_var);

Property Value

This is a read/write property whose value is a PlasticRule.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Represents a plastic rule column in a configuration table. This defines the plastic rule to use for a specific component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
component | Returns the Component being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentPlasticRuleTable | Returns the parent plastic rule table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationPlasticRuleCell.parentColumn, ConfigurationPlasticRuleColumns.add, ConfigurationPlasticRuleColumns.item, ConfigurationPlasticRuleColumns.itemById

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.classType Method

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPlasticRuleColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

returnValue = adsk::fusion::ConfigurationPlasticRuleColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.component Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Returns the Component being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.component
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
Ptr<Component> propertyValue = configurationPlasticRuleColumn_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.deleteMe Method

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
returnValue = configurationPlasticRuleColumn_var.deleteMe()
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

returnValue = configurationPlasticRuleColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationPlasticRuleColumn.getCell Method

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
returnValue = configurationPlasticRuleColumn_var.getCell(rowIndex)
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

returnValue = configurationPlasticRuleColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationPlasticRuleCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.getCellByRowId Method

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
returnValue = configurationPlasticRuleColumn_var.getCellByRowId(rowId)
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

returnValue = configurationPlasticRuleColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationPlasticRuleCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.getCellByRowName Method

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
returnValue = configurationPlasticRuleColumn_var.getCellByRowName(rowName)
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

returnValue = configurationPlasticRuleColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationPlasticRuleCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.id Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.id
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.index Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.index
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationPlasticRuleColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.isValid Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.isValid
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
boolean propertyValue = configurationPlasticRuleColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.objectType Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.objectType
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.parentPlasticRuleTable Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Returns the parent plastic rule table this column is in.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.parentPlasticRuleTable
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
Ptr<ConfigurationPlasticRuleTable> propertyValue = configurationPlasticRuleColumn_var->parentPlasticRuleTable();

Property Value

This is a read only property whose value is a ConfigurationPlasticRuleTable.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumn.rowCount Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.rowCount
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationPlasticRuleColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationPlasticRuleColumn.title Property

Parent Object: ConfigurationPlasticRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumn_var.title

# Set the value of the property.
configurationPlasticRuleColumn_var.title = propertyValue
"configurationPlasticRuleColumn_var" is a variable referencing a ConfigurationPlasticRuleColumn object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationPlasticRuleColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

Provides access to the columns in a plastic rule table. This collection can be empty when no columns have been created. When the table is empty, it is not displayed in the user interface, and adding a column causes the table to be displayed.

Methods

Name | Description
add | Adds a new column to the plastic rule 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().
item | A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.
itemById | A method that returns the column with the specified ID.

Properties

Name | Description
count | Returns the number of columns in the table where the name column is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationPlasticRuleTable.columns

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.add Method

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

Adds a new column to the plastic rule table.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
returnValue = configurationPlasticRuleColumns_var.add(component)
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

returnValue = configurationPlasticRuleColumns_var->add(component);

Return Value

Type | Description
ConfigurationPlasticRuleColumn | Returns the newly created ConfigurationPlasticRuleColumn object or null if it fails.

Parameters

Name | Type | Description
component | Component | The component whose active plastic rule will be controlled by this column.

Version

Introduced in version March 2024


ConfigurationPlasticRuleColumns.classType Method

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPlasticRuleColumns.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

returnValue = adsk::fusion::ConfigurationPlasticRuleColumns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.count Property

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

Returns the number of columns in the table where the name column is not included.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumns_var.count
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

// Get the value of the property.
uinteger propertyValue = configurationPlasticRuleColumns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.isValid Property

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumns_var.isValid
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

// Get the value of the property.
boolean propertyValue = configurationPlasticRuleColumns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.item Method

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
returnValue = configurationPlasticRuleColumns_var.item(index)
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

returnValue = configurationPlasticRuleColumns_var->item(index);

Return Value

Type | Description
ConfigurationPlasticRuleColumn | Returns the specified column or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the column to return, where the first column is index 0. The name column is not included.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.itemById Method

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

A method that returns the column with the specified ID.

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
returnValue = configurationPlasticRuleColumns_var.itemById(id)
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

returnValue = configurationPlasticRuleColumns_var->itemById(id);

Return Value

Type | Description
ConfigurationPlasticRuleColumn | Returns the specified column or null if a column with the specified ID does not exist.

Parameters

Name | Type | Description
id | string | The id of the column to return.

Version

Introduced in version January 2024


ConfigurationPlasticRuleColumns.objectType Property

Parent Object: ConfigurationPlasticRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.

# Get the value of the property.
propertyValue = configurationPlasticRuleColumns_var.objectType
"configurationPlasticRuleColumns_var" is a variable referencing a ConfigurationPlasticRuleColumns object.
#include <Fusion/Configurations/ConfigurationPlasticRuleColumns.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleColumns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Represents a configuration table that defines different plastic rules.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 content of the plastic rule table, removes the reference from the top table, and hides it in the user interface.
getCell | Returns the cell at the specified row and column.

Properties

Name | Description
columns | Returns the collection that provides access to the columns in this table.
id | Returns the unique ID of this table.
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 table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTableColumn | Returns the column in the top table that references this plastic rule table.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationPlasticRuleColumn.parentPlasticRuleTable, ConfigurationTopTable.plasticRuleTable

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.classType Method

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPlasticRuleTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

returnValue = adsk::fusion::ConfigurationPlasticRuleTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.clear Method

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Clears the content of the plastic rule table, removes the reference from the top table, and hides it in the user interface.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
returnValue = configurationPlasticRuleTable_var.clear()
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

returnValue = configurationPlasticRuleTable_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version March 2024


ConfigurationPlasticRuleTable.columns Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the collection that provides access to the columns in this table.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.columns
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationPlasticRuleColumns> propertyValue = configurationPlasticRuleTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationPlasticRuleColumns.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.getCell Method

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
returnValue = configurationPlasticRuleTable_var.getCell(column, row)
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

returnValue = configurationPlasticRuleTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.id Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.id
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.isValid Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.isValid
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
boolean propertyValue = configurationPlasticRuleTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.name Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.name
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleTable_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ConfigurationPlasticRuleTable.objectType Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.objectType
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
string propertyValue = configurationPlasticRuleTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPlasticRuleTable.parentTableColumn Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the column in the top table that references this plastic rule table.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.parentTableColumn
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationPlasticRuleTable_var->parentTableColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version March 2024


ConfigurationPlasticRuleTable.rows Property

Parent Object: ConfigurationPlasticRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.

# Get the value of the property.
propertyValue = configurationPlasticRuleTable_var.rows
"configurationPlasticRuleTable_var" is a variable referencing a ConfigurationPlasticRuleTable object.
#include <Fusion/Configurations/ConfigurationPlasticRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationPlasticRuleTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationPropertyCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Represents an individual cell within a configuration table that defines the value of a property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
value | Gets and sets the value of the property associated with the parent column of this cell.

Accessed From

ConfigurationPropertyColumn.getCell, ConfigurationPropertyColumn.getCellByRowId, ConfigurationPropertyColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationPropertyCell.classType Method

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPropertyCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPropertyCell.h>

returnValue = adsk::fusion::ConfigurationPropertyCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPropertyCell.isValid Property

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.

# Get the value of the property.
propertyValue = configurationPropertyCell_var.isValid
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.
#include <Fusion/Configurations/ConfigurationPropertyCell.h>

// Get the value of the property.
boolean propertyValue = configurationPropertyCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPropertyCell.objectType Property

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.

# Get the value of the property.
propertyValue = configurationPropertyCell_var.objectType
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.
#include <Fusion/Configurations/ConfigurationPropertyCell.h>

// Get the value of the property.
string propertyValue = configurationPropertyCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPropertyCell.parentColumn Property

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.

# Get the value of the property.
propertyValue = configurationPropertyCell_var.parentColumn
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.
#include <Fusion/Configurations/ConfigurationPropertyCell.h>

// Get the value of the property.
Ptr<ConfigurationPropertyColumn> propertyValue = configurationPropertyCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationPropertyColumn.

Version

Introduced in version January 2024


ConfigurationPropertyCell.parentRow Property

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.

# Get the value of the property.
propertyValue = configurationPropertyCell_var.parentRow
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.
#include <Fusion/Configurations/ConfigurationPropertyCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationPropertyCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationPropertyCell.value Property

Parent Object: ConfigurationPropertyCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyCell.h>

Description

Gets and sets the value of the property associated with the parent column of this cell.

Syntax

  • Python
  • C++
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.

# Get the value of the property.
propertyValue = configurationPropertyCell_var.value

# Set the value of the property.
configurationPropertyCell_var.value = propertyValue
"configurationPropertyCell_var" is a variable referencing a ConfigurationPropertyCell object.
#include <Fusion/Configurations/ConfigurationPropertyCell.h>

// Get the value of the property.
string propertyValue = configurationPropertyCell_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationPropertyCell_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPropertyColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Represents a property column in a configuration table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentProperty | Returns the property whose value is controlled by this column.
parentTable | Returns the parent table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addPropertyColumn, ConfigurationPropertyCell.parentColumn

Version

Introduced in version January 2024


ConfigurationPropertyColumn.classType Method

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationPropertyColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

returnValue = adsk::fusion::ConfigurationPropertyColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.deleteMe Method

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
returnValue = configurationPropertyColumn_var.deleteMe()
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

returnValue = configurationPropertyColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationPropertyColumn.getCell Method

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
returnValue = configurationPropertyColumn_var.getCell(rowIndex)
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

returnValue = configurationPropertyColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationPropertyCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.getCellByRowId Method

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
returnValue = configurationPropertyColumn_var.getCellByRowId(rowId)
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

returnValue = configurationPropertyColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationPropertyCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.getCellByRowName Method

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
returnValue = configurationPropertyColumn_var.getCellByRowName(rowName)
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

returnValue = configurationPropertyColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationPropertyCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.id Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.id
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
string propertyValue = configurationPropertyColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.index Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.index
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationPropertyColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.isValid Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.isValid
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
boolean propertyValue = configurationPropertyColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.objectType Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.objectType
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
string propertyValue = configurationPropertyColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.parentProperty Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Returns the property whose value is controlled by this column.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.parentProperty
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
Ptr<Property> propertyValue = configurationPropertyColumn_var->parentProperty();

Property Value

This is a read only property whose value is a Property.

Version

Introduced in version January 2024


ConfigurationPropertyColumn.parentTable Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Returns the parent table this column is in.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.parentTable
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationPropertyColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version March 2024


ConfigurationPropertyColumn.rowCount Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.rowCount
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationPropertyColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationPropertyColumn.title Property

Parent Object: ConfigurationPropertyColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationPropertyColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.

# Get the value of the property.
propertyValue = configurationPropertyColumn_var.title

# Set the value of the property.
configurationPropertyColumn_var.title = propertyValue
"configurationPropertyColumn_var" is a variable referencing a ConfigurationPropertyColumn object.
#include <Fusion/Configurations/ConfigurationPropertyColumn.h>

// Get the value of the property.
string propertyValue = configurationPropertyColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationPropertyColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationRow Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Represents a row in a configuration table. The header row is not considered a standard row but is information associated with each column.

For a top table, each row represents a configuration, and for a theme table, each row represents a theme.

Methods

Name | Description
activate | Causes this row to become the active row in 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().
copy | Creates a new row by copying this row.
deleteMe | Deletes this row from the table. The first row of the top table cannot be deleted, and this method will fail.
generate | Causes this row to be generated.
getCellByColumnId | Gets the cell in this row at the column with the specified ID.
getCellByColumnIndex | Gets the cell in this row at the specified column index. The first column has an index of 0 and does not include the name column.

Properties

Name | Description
id | Gets the unique ID that identifies this row. The ID remains constant for this row as long as the row exists. This is different than the name, which the user can change.
index | The index position of this row within the table. The first row is at index 0 and does not include the header row.
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 row. Names must be unique with respect to other rows in this table. If you specify a name that exists, Fusion will append a counter to ensure uniqueness. For example, if "Small" is already used and you name another row "Small", you will end up with "Small (1)".
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | Returns the configuration table this row is a member of.

Accessed From

ConfigurationAppearanceCell.parentRow, ConfigurationCell.parentRow, ConfigurationFeatureAspectBooleanCell.parentRow, ConfigurationFeatureAspectStringCell.parentRow, ConfigurationInsertCell.parentRow, ConfigurationInsertCell.row, ConfigurationJointSnapCell.parentRow, ConfigurationMaterialCell.parentRow, ConfigurationParameterCell.parentRow, ConfigurationPlasticRuleCell.parentRow, ConfigurationPropertyCell.parentRow, ConfigurationRow.copy, ConfigurationRows.add, ConfigurationRows.item, ConfigurationRows.itemById, ConfigurationRows.itemByName, ConfigurationSheetMetalRuleCell.parentRow, ConfigurationSuppressCell.parentRow, ConfigurationThemeCell.parentRow, ConfigurationThemeCell.referencedTableRow, ConfigurationTopTable.activeRow, ConfigurationVisibilityCell.parentRow, Occurrence.configurationRow

Version

Introduced in version January 2024


ConfigurationRow.activate Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Causes this row to become the active row in the table.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.activate()
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version January 2024


ConfigurationRow.classType Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationRow.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = adsk::fusion::ConfigurationRow::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationRow.copy Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Creates a new row by copying this row.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.copy(name)
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->copy(name);

Return Value

Type | Description
ConfigurationRow | Returns the newly created row or null in the case of failure.

Parameters

Name | Type | Description
name | string | The name to use for the new row. An empty string indicates that Fusion should use the default naming scheme. Names must be unique with respect to other rows in this table. If you specify a name that exists, Fusion will append a counter to ensure uniqueness. For example, if "Small" is already used and you name another row "Small", you will end up with "Small (1)".

Version

Introduced in version March 2024


ConfigurationRow.deleteMe Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Deletes this row from the table. The first row of the top table cannot be deleted, and this method will fail.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.deleteMe()
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationRow.generate Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Causes this row to be generated.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.generate()
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->generate();

Return Value

Type | Description
ConfigurationFuture | Returns a future that can be used to determine when the generation is complete. Null is returned in the case where starting the generation fails.

Version

Introduced in version January 2025


ConfigurationRow.getCellByColumnId Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Gets the cell in this row at the column with the specified ID.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.getCellByColumnId(columnId)
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->getCellByColumnId(columnId);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful or null if a column with the specified ID does not exist.

Parameters

Name | Type | Description
columnId | string | The ID of the column the cell is in.

Version

Introduced in version January 2024


ConfigurationRow.getCellByColumnIndex Method

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Gets the cell in this row at the specified column index. The first column has an index of 0 and does not include the name column.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.
returnValue = configurationRow_var.getCellByColumnIndex(columnIndex)
"configurationRow_var" is a variable referencing a ConfigurationRow object.

#include <Fusion/Configurations/ConfigurationRow.h>

returnValue = configurationRow_var->getCellByColumnIndex(columnIndex);

Return Value

Type | Description
ConfigurationCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
columnIndex | uinteger | The index of the column to return the cell for. The first column has an index 0.

Version

Introduced in version January 2024


ConfigurationRow.id Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Gets the unique ID that identifies this row. The ID remains constant for this row as long as the row exists. This is different than the name, which the user can change.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.id
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
string propertyValue = configurationRow_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationRow.index Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

The index position of this row within the table. The first row is at index 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.index
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
uinteger propertyValue = configurationRow_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationRow.isValid Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.isValid
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
boolean propertyValue = configurationRow_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationRow.name Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Gets and sets the name of this row. Names must be unique with respect to other rows in this table. If you specify a name that exists, Fusion will append a counter to ensure uniqueness. For example, if "Small" is already used and you name another row "Small", you will end up with "Small (1)".

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.name

# Set the value of the property.
configurationRow_var.name = propertyValue
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
string propertyValue = configurationRow_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationRow_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationRow.objectType Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.objectType
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
string propertyValue = configurationRow_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationRow.parentTable Property

Parent Object: ConfigurationRow
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRow.h>

Description

Returns the configuration table this row is a member of.

Syntax

  • Python
  • C++
"configurationRow_var" is a variable referencing a ConfigurationRow object.

# Get the value of the property.
propertyValue = configurationRow_var.parentTable
"configurationRow_var" is a variable referencing a ConfigurationRow object.
#include <Fusion/Configurations/ConfigurationRow.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationRow_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version March 2024


ConfigurationRows Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

Returns a collection of the rows in the table. The header row is not included in this list.

Methods

Name | Description
add | Adds a new row to the table. For the top table, this creates a new configuration. For theme tables, this creates a new theme. The new row is added to the bottom of the table, and the cell values are copied from the row above it. You can also use the ConfigurationRow.copy method to create a new row by copying any existing row.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified row using an index into the collection. These are returned in the same order as in the table; the first row is the default row.
itemById | A method that returns the row with the specified ID.
itemByName | A method that returns the row with the specified name.

Properties

Name | Description
count | Returns the number of rows in the table where the header row is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationAppearanceTable.rows, ConfigurationCustomThemeTable.rows, ConfigurationMaterialTable.rows, ConfigurationPlasticRuleTable.rows, ConfigurationSheetMetalRuleTable.rows, ConfigurationTable.rows, ConfigurationTopTable.rows

Version

Introduced in version January 2024


ConfigurationRows.add Method

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

Adds a new row to the table. For the top table, this creates a new configuration. For theme tables, this creates a new theme. The new row is added to the bottom of the table, and the cell values are copied from the row above it. You can also use the ConfigurationRow.copy method to create a new row by copying any existing row.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.
returnValue = configurationRows_var.add(name)
"configurationRows_var" is a variable referencing a ConfigurationRows object.

#include <Fusion/Configurations/ConfigurationRows.h>

returnValue = configurationRows_var->add(name);

Return Value

Type | Description
ConfigurationRow | Returns the newly created row.

Parameters

Name | Type | Description
name | string | The name of the new row. An empty string can be provided, which will cause Fusion to use a default naming scheme to create a name.

Version

Introduced in version March 2024


ConfigurationRows.classType Method

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationRows.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationRows.h>

returnValue = adsk::fusion::ConfigurationRows::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationRows.count Property

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

Returns the number of rows in the table where the header row is not included.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.

# Get the value of the property.
propertyValue = configurationRows_var.count
"configurationRows_var" is a variable referencing a ConfigurationRows object.
#include <Fusion/Configurations/ConfigurationRows.h>

// Get the value of the property.
uinteger propertyValue = configurationRows_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationRows.isValid Property

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.

# Get the value of the property.
propertyValue = configurationRows_var.isValid
"configurationRows_var" is a variable referencing a ConfigurationRows object.
#include <Fusion/Configurations/ConfigurationRows.h>

// Get the value of the property.
boolean propertyValue = configurationRows_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationRows.item Method

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

A method that returns the specified row using an index into the collection. These are returned in the same order as in the table; the first row is the default row.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.
returnValue = configurationRows_var.item(index)
"configurationRows_var" is a variable referencing a ConfigurationRows object.

#include <Fusion/Configurations/ConfigurationRows.h>

returnValue = configurationRows_var->item(index);

Return Value

Type | Description
ConfigurationRow | Returns the specified row or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the row to return, where the first row is index 0. The headers do not count as a row.

Version

Introduced in version January 2024


ConfigurationRows.itemById Method

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

A method that returns the row with the specified ID.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.
returnValue = configurationRows_var.itemById(id)
"configurationRows_var" is a variable referencing a ConfigurationRows object.

#include <Fusion/Configurations/ConfigurationRows.h>

returnValue = configurationRows_var->itemById(id);

Return Value

Type | Description
ConfigurationRow | Returns the specified row or null if a row with the specified ID does not exist.

Parameters

Name | Type | Description
id | string | The id of the row to return.

Version

Introduced in version January 2024


ConfigurationRows.itemByName Method

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

A method that returns the row with the specified name.

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.
returnValue = configurationRows_var.itemByName(name)
"configurationRows_var" is a variable referencing a ConfigurationRows object.

#include <Fusion/Configurations/ConfigurationRows.h>

returnValue = configurationRows_var->itemByName(name);

Return Value

Type | Description
ConfigurationRow | Returns the specified row or null if the named row does not exist.

Parameters

Name | Type | Description
name | string | The name of the row to return.

Version

Introduced in version January 2024


ConfigurationRows.objectType Property

Parent Object: ConfigurationRows
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationRows.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationRows_var" is a variable referencing a ConfigurationRows object.

# Get the value of the property.
propertyValue = configurationRows_var.objectType
"configurationRows_var" is a variable referencing a ConfigurationRows object.
#include <Fusion/Configurations/ConfigurationRows.h>

// Get the value of the property.
string propertyValue = configurationRows_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Represents a single cell within a configuration table that controls which sheet metal rule is assigned to a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
sheetMetalRule | Gets and sets the sheet metal rule defined for this cell.

Accessed From

ConfigurationSheetMetalRuleColumn.getCell, ConfigurationSheetMetalRuleColumn.getCellByRowId, ConfigurationSheetMetalRuleColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.classType Method

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSheetMetalRuleCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

returnValue = adsk::fusion::ConfigurationSheetMetalRuleCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.isValid Property

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleCell_var.isValid
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

// Get the value of the property.
boolean propertyValue = configurationSheetMetalRuleCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.objectType Property

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleCell_var.objectType
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.parentColumn Property

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleCell_var.parentColumn
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

// Get the value of the property.
Ptr<ConfigurationSheetMetalRuleColumn> propertyValue = configurationSheetMetalRuleCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationSheetMetalRuleColumn.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.parentRow Property

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleCell_var.parentRow
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationSheetMetalRuleCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleCell.sheetMetalRule Property

Parent Object: ConfigurationSheetMetalRuleCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

Description

Gets and sets the sheet metal rule defined for this cell.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleCell_var.sheetMetalRule

# Set the value of the property.
configurationSheetMetalRuleCell_var.sheetMetalRule = propertyValue
"configurationSheetMetalRuleCell_var" is a variable referencing a ConfigurationSheetMetalRuleCell object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleCell.h>

// Get the value of the property.
Ptr<SheetMetalRule> propertyValue = configurationSheetMetalRuleCell_var->sheetMetalRule();

// Set the value of the property, where value_var is a SheetMetalRule.
bool returnValue = configurationSheetMetalRuleCell_var->sheetMetalRule(value_var);

Property Value

This is a read/write property whose value is a SheetMetalRule.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Represents a sheet metal rule column in a configuration table. This defines the sheet metal rule to use for a specific component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
component | Returns the Component being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.
componentName | Returns the name of the component associated with this column. This is useful when the table is obtained from a DataFile object, and the component object is unavailable.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSheetMetalRuleTable | Returns the parent sheet metal rule table this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationSheetMetalRuleCell.parentColumn, ConfigurationSheetMetalRuleColumns.add, ConfigurationSheetMetalRuleColumns.item, ConfigurationSheetMetalRuleColumns.itemById

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.classType Method

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSheetMetalRuleColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

returnValue = adsk::fusion::ConfigurationSheetMetalRuleColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.component Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Returns the Component being modified by this column. This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.component
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
Ptr<Component> propertyValue = configurationSheetMetalRuleColumn_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.componentName Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Returns the name of the component associated with this column. This is useful when the table is obtained from a DataFile object, and the component object is unavailable.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.componentName
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleColumn_var->componentName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.deleteMe Method

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
returnValue = configurationSheetMetalRuleColumn_var.deleteMe()
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

returnValue = configurationSheetMetalRuleColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleColumn.getCell Method

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
returnValue = configurationSheetMetalRuleColumn_var.getCell(rowIndex)
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

returnValue = configurationSheetMetalRuleColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationSheetMetalRuleCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.getCellByRowId Method

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
returnValue = configurationSheetMetalRuleColumn_var.getCellByRowId(rowId)
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

returnValue = configurationSheetMetalRuleColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationSheetMetalRuleCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.getCellByRowName Method

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
returnValue = configurationSheetMetalRuleColumn_var.getCellByRowName(rowName)
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

returnValue = configurationSheetMetalRuleColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationSheetMetalRuleCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.id Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.id
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.index Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.index
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationSheetMetalRuleColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.isValid Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.isValid
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
boolean propertyValue = configurationSheetMetalRuleColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.objectType Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.objectType
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.parentSheetMetalRuleTable Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Returns the parent sheet metal rule table this column is in.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.parentSheetMetalRuleTable
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
Ptr<ConfigurationSheetMetalRuleTable> propertyValue = configurationSheetMetalRuleColumn_var->parentSheetMetalRuleTable();

Property Value

This is a read only property whose value is a ConfigurationSheetMetalRuleTable.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumn.rowCount Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.rowCount
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationSheetMetalRuleColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleColumn.title Property

Parent Object: ConfigurationSheetMetalRuleColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumn_var.title

# Set the value of the property.
configurationSheetMetalRuleColumn_var.title = propertyValue
"configurationSheetMetalRuleColumn_var" is a variable referencing a ConfigurationSheetMetalRuleColumn object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumn.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationSheetMetalRuleColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

Provides access to the columns in a sheet metal rule table. This collection can be empty when no columns have been created. When the table is empty, it is not displayed in the user interface, and adding a column causes the table to be displayed.

Methods

Name | Description
add | Adds a new column to the sheet metal rule 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().
item | A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.
itemById | A method that returns the column with the specified ID.

Properties

Name | Description
count | Returns the number of columns in the table where the name column is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ConfigurationSheetMetalRuleTable.columns

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.add Method

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

Adds a new column to the sheet metal rule table.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
returnValue = configurationSheetMetalRuleColumns_var.add(component)
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

returnValue = configurationSheetMetalRuleColumns_var->add(component);

Return Value

Type | Description
ConfigurationSheetMetalRuleColumn | Returns the newly created ConfigurationPlasticRuleColumn object or null if it fails.

Parameters

Name | Type | Description
component | Component | The component whose active sheet metal rule will be controlled by this column.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleColumns.classType Method

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSheetMetalRuleColumns.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

returnValue = adsk::fusion::ConfigurationSheetMetalRuleColumns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.count Property

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

Returns the number of columns in the table where the name column is not included.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumns_var.count
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

// Get the value of the property.
uinteger propertyValue = configurationSheetMetalRuleColumns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.isValid Property

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumns_var.isValid
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

// Get the value of the property.
boolean propertyValue = configurationSheetMetalRuleColumns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.item Method

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

A method that returns the specified column using an index into the collection. These are returned in the same order as they appear in the table.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
returnValue = configurationSheetMetalRuleColumns_var.item(index)
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

returnValue = configurationSheetMetalRuleColumns_var->item(index);

Return Value

Type | Description
ConfigurationSheetMetalRuleColumn | Returns the specified column or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the column to return, where the first column is index 0. The name column is not included.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.itemById Method

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

A method that returns the column with the specified ID.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
returnValue = configurationSheetMetalRuleColumns_var.itemById(id)
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

returnValue = configurationSheetMetalRuleColumns_var->itemById(id);

Return Value

Type | Description
ConfigurationSheetMetalRuleColumn | Returns the specified column or null if a column with the specified ID does not exist.

Parameters

Name | Type | Description
id | string | The id of the column to return.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleColumns.objectType Property

Parent Object: ConfigurationSheetMetalRuleColumns
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleColumns_var.objectType
"configurationSheetMetalRuleColumns_var" is a variable referencing a ConfigurationSheetMetalRuleColumns object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleColumns.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleColumns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Represents a configuration table that defines different sheet metal rules.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 content of the sheet metal rule table, removes the reference from the top table, and hides it in the user interface.
getCell | Returns the cell at the specified row and column.

Properties

Name | Description
columns | Returns the collection that provides access to the columns in this table.
id | Returns the unique ID of this table.
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 table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTableColumn | Returns the column in the top table that references this sheet metal rule table.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationSheetMetalRuleColumn.parentSheetMetalRuleTable, ConfigurationTopTable.sheetMetalRuleTable

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.classType Method

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSheetMetalRuleTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

returnValue = adsk::fusion::ConfigurationSheetMetalRuleTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.clear Method

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Clears the content of the sheet metal rule table, removes the reference from the top table, and hides it in the user interface.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
returnValue = configurationSheetMetalRuleTable_var.clear()
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

returnValue = configurationSheetMetalRuleTable_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleTable.columns Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the collection that provides access to the columns in this table.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.columns
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationSheetMetalRuleColumns> propertyValue = configurationSheetMetalRuleTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationSheetMetalRuleColumns.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.getCell Method

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
returnValue = configurationSheetMetalRuleTable_var.getCell(column, row)
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

returnValue = configurationSheetMetalRuleTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.id Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.id
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.isValid Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.isValid
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
boolean propertyValue = configurationSheetMetalRuleTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.name Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.name
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleTable_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleTable.objectType Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.objectType
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
string propertyValue = configurationSheetMetalRuleTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSheetMetalRuleTable.parentTableColumn Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the column in the top table that references this sheet metal rule table.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.parentTableColumn
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationSheetMetalRuleTable_var->parentTableColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version March 2024


ConfigurationSheetMetalRuleTable.rows Property

Parent Object: ConfigurationSheetMetalRuleTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.

# Get the value of the property.
propertyValue = configurationSheetMetalRuleTable_var.rows
"configurationSheetMetalRuleTable_var" is a variable referencing a ConfigurationSheetMetalRuleTable object.
#include <Fusion/Configurations/ConfigurationSheetMetalRuleTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationSheetMetalRuleTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationSuppressCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Represents a single cell within a configuration table that controls if a feature is suppressed. Get the parent column to get the feature being suppressed.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isSuppressed | Specifies if the feature is suppressed or not. This property behaves as read-only when the table is obtained from a DataFile.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.

Accessed From

ConfigurationSuppressColumn.getCell, ConfigurationSuppressColumn.getCellByRowId, ConfigurationSuppressColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationSuppressCell.classType Method

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSuppressCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSuppressCell.h>

returnValue = adsk::fusion::ConfigurationSuppressCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSuppressCell.isSuppressed Property

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Specifies if the feature is suppressed or not. This property behaves as read-only when the table is obtained from a DataFile.

Syntax

  • Python
  • C++
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.

# Get the value of the property.
propertyValue = configurationSuppressCell_var.isSuppressed

# Set the value of the property.
configurationSuppressCell_var.isSuppressed = propertyValue
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.
#include <Fusion/Configurations/ConfigurationSuppressCell.h>

// Get the value of the property.
boolean propertyValue = configurationSuppressCell_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = configurationSuppressCell_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSuppressCell.isValid Property

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.

# Get the value of the property.
propertyValue = configurationSuppressCell_var.isValid
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.
#include <Fusion/Configurations/ConfigurationSuppressCell.h>

// Get the value of the property.
boolean propertyValue = configurationSuppressCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSuppressCell.objectType Property

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.

# Get the value of the property.
propertyValue = configurationSuppressCell_var.objectType
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.
#include <Fusion/Configurations/ConfigurationSuppressCell.h>

// Get the value of the property.
string propertyValue = configurationSuppressCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSuppressCell.parentColumn Property

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.

# Get the value of the property.
propertyValue = configurationSuppressCell_var.parentColumn
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.
#include <Fusion/Configurations/ConfigurationSuppressCell.h>

// Get the value of the property.
Ptr<ConfigurationSuppressColumn> propertyValue = configurationSuppressCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationSuppressColumn.

Version

Introduced in version January 2024


ConfigurationSuppressCell.parentRow Property

Parent Object: ConfigurationSuppressCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.

# Get the value of the property.
propertyValue = configurationSuppressCell_var.parentRow
"configurationSuppressCell_var" is a variable referencing a ConfigurationSuppressCell object.
#include <Fusion/Configurations/ConfigurationSuppressCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationSuppressCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationSuppressColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Represents a suppress column in a top or custom theme configuration table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
feature Returns the feature whose suppression state is being controlled by this column. The term "feature" is used broadly and includes anything displayed in the timeline.

This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | Returns the parent table, either top or custom theme table, this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addSuppressColumn, ConfigurationSuppressCell.parentColumn

Version

Introduced in version January 2024


ConfigurationSuppressColumn.classType Method

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationSuppressColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

returnValue = adsk::fusion::ConfigurationSuppressColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.deleteMe Method

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
returnValue = configurationSuppressColumn_var.deleteMe()
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

returnValue = configurationSuppressColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationSuppressColumn.feature Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Returns the feature whose suppression state is being controlled by this column. The term "feature" is used broadly and includes anything displayed in the timeline.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.feature
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationSuppressColumn_var->feature();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.getCell Method

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
returnValue = configurationSuppressColumn_var.getCell(rowIndex)
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

returnValue = configurationSuppressColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationSuppressCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.getCellByRowId Method

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
returnValue = configurationSuppressColumn_var.getCellByRowId(rowId)
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

returnValue = configurationSuppressColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationSuppressCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.getCellByRowName Method

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
returnValue = configurationSuppressColumn_var.getCellByRowName(rowName)
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

returnValue = configurationSuppressColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationSuppressCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.id Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.id
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
string propertyValue = configurationSuppressColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.index Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.index
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationSuppressColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.isValid Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.isValid
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
boolean propertyValue = configurationSuppressColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.objectType Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.objectType
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
string propertyValue = configurationSuppressColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.parentTable Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Returns the parent table, either top or custom theme table, this column is in.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.parentTable
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationSuppressColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version January 2024


ConfigurationSuppressColumn.rowCount Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.rowCount
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationSuppressColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationSuppressColumn.title Property

Parent Object: ConfigurationSuppressColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationSuppressColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.

# Get the value of the property.
propertyValue = configurationSuppressColumn_var.title

# Set the value of the property.
configurationSuppressColumn_var.title = propertyValue
"configurationSuppressColumn_var" is a variable referencing a ConfigurationSuppressColumn object.
#include <Fusion/Configurations/ConfigurationSuppressColumn.h>

// Get the value of the property.
string propertyValue = configurationSuppressColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationSuppressColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTable Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

The base class of all configuration tables.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCell | Returns the cell at the specified row and column.

Properties

Name | Description
id | Returns the unique ID of this table.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Accessed From

ConfigurationFeatureAspectColumn.parentTable, ConfigurationInsertColumn.parentTable, ConfigurationJointSnapColumn.parentTable, ConfigurationParameterColumn.parentTable, ConfigurationPropertyColumn.parentTable, ConfigurationRow.parentTable, ConfigurationSuppressColumn.parentTable, ConfigurationThemeColumn.parentTable, ConfigurationThemeColumn.referencedTable, ConfigurationVisibilityColumn.parentTable

Derived Classes

ConfigurationAppearanceTable, ConfigurationCustomThemeTable, ConfigurationMaterialTable, ConfigurationPlasticRuleTable, ConfigurationSheetMetalRuleTable, ConfigurationTopTable

Version

Introduced in version January 2024


ConfigurationTable.classType Method

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationTable.h>

returnValue = adsk::fusion::ConfigurationTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationTable.getCell Method

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationTable_var" is a variable referencing a ConfigurationTable object.
returnValue = configurationTable_var.getCell(column, row)
"configurationTable_var" is a variable referencing a ConfigurationTable object.

#include <Fusion/Configurations/ConfigurationTable.h>

returnValue = configurationTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationTable.id Property

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationTable_var" is a variable referencing a ConfigurationTable object.

# Get the value of the property.
propertyValue = configurationTable_var.id
"configurationTable_var" is a variable referencing a ConfigurationTable object.
#include <Fusion/Configurations/ConfigurationTable.h>

// Get the value of the property.
string propertyValue = configurationTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTable.isValid Property

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationTable_var" is a variable referencing a ConfigurationTable object.

# Get the value of the property.
propertyValue = configurationTable_var.isValid
"configurationTable_var" is a variable referencing a ConfigurationTable object.
#include <Fusion/Configurations/ConfigurationTable.h>

// Get the value of the property.
boolean propertyValue = configurationTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationTable.objectType Property

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationTable_var" is a variable referencing a ConfigurationTable object.

# Get the value of the property.
propertyValue = configurationTable_var.objectType
"configurationTable_var" is a variable referencing a ConfigurationTable object.
#include <Fusion/Configurations/ConfigurationTable.h>

// Get the value of the property.
string propertyValue = configurationTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTable.rows Property

Parent Object: ConfigurationTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationTable_var" is a variable referencing a ConfigurationTable object.

# Get the value of the property.
propertyValue = configurationTable_var.rows
"configurationTable_var" is a variable referencing a ConfigurationTable object.
#include <Fusion/Configurations/ConfigurationTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationThemeCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Represents an individual cell within a top configuration table that specifies which row in the custom theme table should be used.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.
referencedTableRow | Gets and sets the row to use from the referenced table.

Accessed From

ConfigurationThemeColumn.getCell, ConfigurationThemeColumn.getCellByRowId, ConfigurationThemeColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationThemeCell.classType Method

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationThemeCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationThemeCell.h>

returnValue = adsk::fusion::ConfigurationThemeCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationThemeCell.isValid Property

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.

# Get the value of the property.
propertyValue = configurationThemeCell_var.isValid
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.
#include <Fusion/Configurations/ConfigurationThemeCell.h>

// Get the value of the property.
boolean propertyValue = configurationThemeCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationThemeCell.objectType Property

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.

# Get the value of the property.
propertyValue = configurationThemeCell_var.objectType
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.
#include <Fusion/Configurations/ConfigurationThemeCell.h>

// Get the value of the property.
string propertyValue = configurationThemeCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationThemeCell.parentColumn Property

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.

# Get the value of the property.
propertyValue = configurationThemeCell_var.parentColumn
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.
#include <Fusion/Configurations/ConfigurationThemeCell.h>

// Get the value of the property.
Ptr<ConfigurationThemeColumn> propertyValue = configurationThemeCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationThemeColumn.

Version

Introduced in version January 2024


ConfigurationThemeCell.parentRow Property

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.

# Get the value of the property.
propertyValue = configurationThemeCell_var.parentRow
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.
#include <Fusion/Configurations/ConfigurationThemeCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationThemeCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationThemeCell.referencedTableRow Property

Parent Object: ConfigurationThemeCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeCell.h>

Description

Gets and sets the row to use from the referenced table.

Syntax

  • Python
  • C++
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.

# Get the value of the property.
propertyValue = configurationThemeCell_var.referencedTableRow

# Set the value of the property.
configurationThemeCell_var.referencedTableRow = propertyValue
"configurationThemeCell_var" is a variable referencing a ConfigurationThemeCell object.
#include <Fusion/Configurations/ConfigurationThemeCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationThemeCell_var->referencedTableRow();

// Set the value of the property, where value_var is a ConfigurationRow.
bool returnValue = configurationThemeCell_var->referencedTableRow(value_var);

Property Value

This is a read/write property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationThemeColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Represents a theme table column in a top configuration table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row index. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | Returns the parent table this column is in.
referencedTable | Returns the theme table that this column references.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationAppearanceTable.parentTableColumn, ConfigurationCustomThemeTable.parentTableColumn, ConfigurationMaterialTable.parentTableColumn, ConfigurationPlasticRuleTable.parentTableColumn, ConfigurationSheetMetalRuleTable.parentTableColumn, ConfigurationThemeCell.parentColumn

Version

Introduced in version January 2024


ConfigurationThemeColumn.classType Method

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationThemeColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationThemeColumn.h>

returnValue = adsk::fusion::ConfigurationThemeColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationThemeColumn.deleteMe Method

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
returnValue = configurationThemeColumn_var.deleteMe()
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

#include <Fusion/Configurations/ConfigurationThemeColumn.h>

returnValue = configurationThemeColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationThemeColumn.getCell Method

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Gets the cell in this column at the specified row index. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
returnValue = configurationThemeColumn_var.getCell(rowIndex)
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

#include <Fusion/Configurations/ConfigurationThemeColumn.h>

returnValue = configurationThemeColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationThemeCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationThemeColumn.getCellByRowId Method

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
returnValue = configurationThemeColumn_var.getCellByRowId(rowId)
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

#include <Fusion/Configurations/ConfigurationThemeColumn.h>

returnValue = configurationThemeColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationThemeCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationThemeColumn.getCellByRowName Method

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
returnValue = configurationThemeColumn_var.getCellByRowName(rowName)
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

#include <Fusion/Configurations/ConfigurationThemeColumn.h>

returnValue = configurationThemeColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationThemeCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationThemeColumn.id Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.id
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
string propertyValue = configurationThemeColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationThemeColumn.index Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.index
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationThemeColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationThemeColumn.isValid Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.isValid
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
boolean propertyValue = configurationThemeColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationThemeColumn.objectType Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.objectType
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
string propertyValue = configurationThemeColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationThemeColumn.parentTable Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Returns the parent table this column is in.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.parentTable
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationThemeColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version March 2024


ConfigurationThemeColumn.referencedTable Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Returns the theme table that this column references.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.referencedTable
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationThemeColumn_var->referencedTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version January 2024


ConfigurationThemeColumn.rowCount Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.rowCount
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationThemeColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationThemeColumn.title Property

Parent Object: ConfigurationThemeColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationThemeColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.

# Get the value of the property.
propertyValue = configurationThemeColumn_var.title

# Set the value of the property.
configurationThemeColumn_var.title = propertyValue
"configurationThemeColumn_var" is a variable referencing a ConfigurationThemeColumn object.
#include <Fusion/Configurations/ConfigurationThemeColumn.h>

// Get the value of the property.
string propertyValue = configurationThemeColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationThemeColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTopTable Object

Derived from: ConfigurationTable Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

API object representing the top configuration table associated with a configured design.

When obtained from the DataFile object of a configured design, the functionality is limited because it's not loaded in Fusion, and there is no access to the Fusion objects represented in the table. For example, any properties that return a Component or Parameter will return null because those objects aren't available.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCell | Returns the cell at the specified row and column.
moveColumns | Moves the specified columns from one table to another.

Properties

Name | Description
activeRow | Returns the row that is currently active. To set the active row, use the activate method on the ConfigurationRow object.
appearanceTable | Returns the appearance table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.
columns | Returns the columns defined for this table and provides the functionality to create new columns.
customThemeTables | Returns any custom theme tables associated with this top table.
id | Returns the unique ID of this table.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialTable | Returns the material table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.
name | Gets the name of the table as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
plasticRuleTable | Returns the plastic rule table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.
rows | Returns the rows (configurations) defined for this table and provides the functionality to create new rows.
sheetMetalRuleTable | Returns the sheet metal rule table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.

Accessed From

Design.configurationTopTable, Design.createConfiguredDesign, FlatPatternProduct.configurationTopTable, FlatPatternProduct.createConfiguredDesign, WorkingModel.configurationTopTable, WorkingModel.createConfiguredDesign

Version

Introduced in version January 2024


ConfigurationTopTable.activeRow Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the row that is currently active. To set the active row, use the activate method on the ConfigurationRow object.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.activeRow
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationTopTable_var->activeRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationTopTable.appearanceTable Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the appearance table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.appearanceTable
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationAppearanceTable> propertyValue = configurationTopTable_var->appearanceTable();

Property Value

This is a read only property whose value is a ConfigurationAppearanceTable.

Version

Introduced in version January 2024


ConfigurationTopTable.classType Method

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationTopTable.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationTopTable.h>

returnValue = adsk::fusion::ConfigurationTopTable::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationTopTable.columns Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the columns defined for this table and provides the functionality to create new columns.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.columns
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationColumns> propertyValue = configurationTopTable_var->columns();

Property Value

This is a read only property whose value is a ConfigurationColumns.

Version

Introduced in version January 2024


ConfigurationTopTable.customThemeTables Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns any custom theme tables associated with this top table.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.customThemeTables
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationCustomThemeTables> propertyValue = configurationTopTable_var->customThemeTables();

Property Value

This is a read only property whose value is a ConfigurationCustomThemeTables.

Version

Introduced in version January 2024


ConfigurationTopTable.getCell Method

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the cell at the specified row and column.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
returnValue = configurationTopTable_var.getCell(column, row)
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

#include <Fusion/Configurations/ConfigurationTopTable.h>

returnValue = configurationTopTable_var->getCell(column, row);

Parameters

Name | Type | Description
column | uinteger | The index of the column the cell is in. An index of 0 is the first column and does not include the name column.
row | uinteger | The index of the row the cell is in. An index of 0 is the first row and does not include the header row.

Version

Introduced in version January 2024


ConfigurationTopTable.id Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the unique ID of this table.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.id
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
string propertyValue = configurationTopTable_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTopTable.isValid Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.isValid
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
boolean propertyValue = configurationTopTable_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationTopTable.materialTable Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the material table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.materialTable
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationMaterialTable> propertyValue = configurationTopTable_var->materialTable();

Property Value

This is a read only property whose value is a ConfigurationMaterialTable.

Version

Introduced in version January 2024


ConfigurationTopTable.moveColumns Method

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Moves the specified columns from one table to another.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
returnValue = configurationTopTable_var.moveColumns(columns, targetTable)
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

#include <Fusion/Configurations/ConfigurationTopTable.h>

returnValue = configurationTopTable_var->moveColumns(columns, targetTable);

Return Value

Type | Description
ConfigurationColumn[] | Returns an array of the columns created due to the move.

Parameters

Name | Type | Description
columns | ConfigurationColumn[] | An array of the columns within the top table you want to move.
targetTable | ConfigurationCustomThemeTable | The table you want to move the columns to. The target must be a custom theme table.

Version

Introduced in version March 2024


ConfigurationTopTable.name Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Gets the name of the table as seen in the user interface.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.name
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
string propertyValue = configurationTopTable_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


ConfigurationTopTable.objectType Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.objectType
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
string propertyValue = configurationTopTable_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationTopTable.plasticRuleTable Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the plastic rule table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.plasticRuleTable
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationPlasticRuleTable> propertyValue = configurationTopTable_var->plasticRuleTable();

Property Value

This is a read only property whose value is a ConfigurationPlasticRuleTable.

Version

Introduced in version January 2024


ConfigurationTopTable.rows Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the rows (configurations) defined for this table and provides the functionality to create new rows.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.rows
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationRows> propertyValue = configurationTopTable_var->rows();

Property Value

This is a read only property whose value is a ConfigurationRows.

Version

Introduced in version January 2024


ConfigurationTopTable.sheetMetalRuleTable Property

Parent Object: ConfigurationTopTable
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationTopTable.h>

Description

Returns the sheet metal rule table associated with this top table. The returned table can be empty and not have any columns. In this case, the table is not displayed in the user interface. Use the returned table to add columns.

Syntax

  • Python
  • C++
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.

# Get the value of the property.
propertyValue = configurationTopTable_var.sheetMetalRuleTable
"configurationTopTable_var" is a variable referencing a ConfigurationTopTable object.
#include <Fusion/Configurations/ConfigurationTopTable.h>

// Get the value of the property.
Ptr<ConfigurationSheetMetalRuleTable> propertyValue = configurationTopTable_var->sheetMetalRuleTable();

Property Value

This is a read only property whose value is a ConfigurationSheetMetalRuleTable.

Version

Introduced in version January 2024


ConfigurationVisibilityCell Object

Derived from: ConfigurationCell Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Represents a single cell within a configuration table that controls whether an entity is visible. Get the parent column to get the entity.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isVisible | Specifies if the entity is visible or not. This property behaves as read-only when the table is obtained from a DataFile.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentColumn | Returns the column this cell is in.
parentRow | Returns the row this cell is in.

Accessed From

ConfigurationVisibilityColumn.getCell, ConfigurationVisibilityColumn.getCellByRowId, ConfigurationVisibilityColumn.getCellByRowName

Version

Introduced in version January 2024


ConfigurationVisibilityCell.classType Method

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationVisibilityCell.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

returnValue = adsk::fusion::ConfigurationVisibilityCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationVisibilityCell.isValid Property

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.

# Get the value of the property.
propertyValue = configurationVisibilityCell_var.isValid
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.
#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

// Get the value of the property.
boolean propertyValue = configurationVisibilityCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationVisibilityCell.isVisible Property

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Specifies if the entity is visible or not. This property behaves as read-only when the table is obtained from a DataFile.

Syntax

  • Python
  • C++
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.

# Get the value of the property.
propertyValue = configurationVisibilityCell_var.isVisible

# Set the value of the property.
configurationVisibilityCell_var.isVisible = propertyValue
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.
#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

// Get the value of the property.
boolean propertyValue = configurationVisibilityCell_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = configurationVisibilityCell_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationVisibilityCell.objectType Property

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.

# Get the value of the property.
propertyValue = configurationVisibilityCell_var.objectType
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.
#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

// Get the value of the property.
string propertyValue = configurationVisibilityCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationVisibilityCell.parentColumn Property

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Returns the column this cell is in.

Syntax

  • Python
  • C++
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.

# Get the value of the property.
propertyValue = configurationVisibilityCell_var.parentColumn
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.
#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

// Get the value of the property.
Ptr<ConfigurationVisibilityColumn> propertyValue = configurationVisibilityCell_var->parentColumn();

Property Value

This is a read only property whose value is a ConfigurationVisibilityColumn.

Version

Introduced in version January 2024


ConfigurationVisibilityCell.parentRow Property

Parent Object: ConfigurationVisibilityCell
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityCell.h>

Description

Returns the row this cell is in.

Syntax

  • Python
  • C++
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.

# Get the value of the property.
propertyValue = configurationVisibilityCell_var.parentRow
"configurationVisibilityCell_var" is a variable referencing a ConfigurationVisibilityCell object.
#include <Fusion/Configurations/ConfigurationVisibilityCell.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = configurationVisibilityCell_var->parentRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn Object

Derived from: ConfigurationColumn Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Represents a visibility column in a top or custom theme configuration table.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.
getCell | Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.
getCellByRowId | Gets the cell in this column at the row specified by its ID.
getCellByRowName | Gets the cell in this column at the row specified by its name.

Properties

Name | Description
entity Returns the entity whose visibility is being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.
id | The id of the column. This is constant and cannot be changed by the user.
index | The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentTable | Returns the parent table, either top or custom theme table, this column is in.
rowCount | Returns the number of rows in this column.
title The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Accessed From

ConfigurationColumns.addVisibilityColumn, ConfigurationVisibilityCell.parentColumn

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.classType Method

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConfigurationVisibilityColumn.classType()
This is a static method.

#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

returnValue = adsk::fusion::ConfigurationVisibilityColumn::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.deleteMe Method

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Deletes this column from the table. Property columns cannot be deleted. If the table was obtained from a DataFile, this method will fail.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
returnValue = configurationVisibilityColumn_var.deleteMe()
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

returnValue = configurationVisibilityColumn_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version March 2024


ConfigurationVisibilityColumn.entity Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Returns the entity whose visibility is being controlled by this column.

This property returns null when the table being queried was obtained from a DataFile object.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.entity
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
Ptr<Base> propertyValue = configurationVisibilityColumn_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.getCell Method

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Gets the cell in this column at the specified row. The first row has an index of 0 and does not include the header row.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
returnValue = configurationVisibilityColumn_var.getCell(rowIndex)
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

returnValue = configurationVisibilityColumn_var->getCell(rowIndex);

Return Value

Type | Description
ConfigurationVisibilityCell | Returns the specified cell if successful and null if an invalid index was specified.

Parameters

Name | Type | Description
rowIndex | uinteger | The index of the row to return the cell for. The first row has an index of 0.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.getCellByRowId Method

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Gets the cell in this column at the row specified by its ID.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
returnValue = configurationVisibilityColumn_var.getCellByRowId(rowId)
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

returnValue = configurationVisibilityColumn_var->getCellByRowId(rowId);

Return Value

Type | Description
ConfigurationVisibilityCell | Returns the specified cell if successful and null if the id is not found.

Parameters

Name | Type | Description
rowId | string | The ID of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.getCellByRowName Method

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Gets the cell in this column at the row specified by its name.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
returnValue = configurationVisibilityColumn_var.getCellByRowName(rowName)
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

returnValue = configurationVisibilityColumn_var->getCellByRowName(rowName);

Return Value

Type | Description
ConfigurationVisibilityCell | Returns the specified cell if successful and null if the name is not found.

Parameters

Name | Type | Description
rowName | string | The name of the row to return the cell for.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.id Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

The id of the column. This is constant and cannot be changed by the user.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.id
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
string propertyValue = configurationVisibilityColumn_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.index Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

The index position of this column within the table. The first column is at index 0 and does not include the "Name" column.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.index
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationVisibilityColumn_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.isValid Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.isValid
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
boolean propertyValue = configurationVisibilityColumn_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.objectType Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.objectType
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
string propertyValue = configurationVisibilityColumn_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.parentTable Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Returns the parent table, either top or custom theme table, this column is in.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.parentTable
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
Ptr<ConfigurationTable> propertyValue = configurationVisibilityColumn_var->parentTable();

Property Value

This is a read only property whose value is a ConfigurationTable.

Version

Introduced in version January 2024


ConfigurationVisibilityColumn.rowCount Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

Returns the number of rows in this column.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.rowCount
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
uinteger propertyValue = configurationVisibilityColumn_var->rowCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


ConfigurationVisibilityColumn.title Property

Parent Object: ConfigurationVisibilityColumn
Defined in namespace "adsk::fusion" and the header file is <Fusion/Configurations/ConfigurationVisibilityColumn.h>

Description

The title of this column. In a top table, this can only be edited for suppression, visibility, parameter, and theme table columns. It behaves as read-only for all other types. In a theme table, the title of all the columns can be modified except for the column that represents the root component for materials and appearances.

If the table was obtained from a DataFile, this property behaves as read-only for all the columns.

Syntax

  • Python
  • C++
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.

# Get the value of the property.
propertyValue = configurationVisibilityColumn_var.title

# Set the value of the property.
configurationVisibilityColumn_var.title = propertyValue
"configurationVisibilityColumn_var" is a variable referencing a ConfigurationVisibilityColumn object.
#include <Fusion/Configurations/ConfigurationVisibilityColumn.h>

// Get the value of the property.
string propertyValue = configurationVisibilityColumn_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = configurationVisibilityColumn_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


ConstantRadiusFilletEdgeSet Object

Derived from: FilletEdgeSet Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Provides access to the edges and the parameter associated with a constant radius fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 fillet edge set from the fillet. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.
edges Gets and sets an ObjectCollection containing the BRepEdge, BRepFace, and Feature that are filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | Gets and sets the Tangent chain for fillet. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
tangencyWeight | Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Accessed From

FilletEdgeSets.addConstantRadiusEdgeSet

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


ConstantRadiusFilletEdgeSet.classType Method

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.continuity Property

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.continuity

# Set the value of the property.
constantRadiusFilletEdgeSet_var.continuity = propertyValue
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = constantRadiusFilletEdgeSet_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = constantRadiusFilletEdgeSet_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2022


ConstantRadiusFilletEdgeSet.deleteMe Method

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Deletes the fillet edge set from the fillet.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
returnValue = constantRadiusFilletEdgeSet_var.deleteMe()
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

returnValue = constantRadiusFilletEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSet.edges Property

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Gets and sets an ObjectCollection containing the BRepEdge, BRepFace, and Feature that are filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


ConstantRadiusFilletEdgeSet.isTangentChain Property

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Gets and sets the Tangent chain for fillet. This enables tangent chain option for fillet.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.isTangentChain

# Set the value of the property.
constantRadiusFilletEdgeSet_var.isTangentChain = propertyValue
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = constantRadiusFilletEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = constantRadiusFilletEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


ConstantRadiusFilletEdgeSet.isValid Property

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


ConstantRadiusFilletEdgeSet.tangencyWeight Property

Parent Object: ConstantRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

Description

Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.tangencyWeight
"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->tangencyWeight();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput Object

Derived from: FilletEdgeSetInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Provides access to the edges and the parameter associated with a constant radius fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.
entities | Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radius | Gets and sets 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") or if no units are specified it is interpreted using the current default units for length.
tangencyWeight | Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Accessed From

FilletEdgeSetInputs.addConstantRadiusEdgeSet

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.classType Method

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstantRadiusFilletEdgeSetInput.classType()
This is a static method.

#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

returnValue = adsk::fusion::ConstantRadiusFilletEdgeSetInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.continuity Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.continuity

# Set the value of the property.
constantRadiusFilletEdgeSetInput_var.continuity = propertyValue
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = constantRadiusFilletEdgeSetInput_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = constantRadiusFilletEdgeSetInput_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.entities Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.entities

# Set the value of the property.
constantRadiusFilletEdgeSetInput_var.entities = propertyValue
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = constantRadiusFilletEdgeSetInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = constantRadiusFilletEdgeSetInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.isValid Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.isValid
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
boolean propertyValue = constantRadiusFilletEdgeSetInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.objectType Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.objectType
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
string propertyValue = constantRadiusFilletEdgeSetInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.radius Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Gets and sets 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") or if no units are specified it is interpreted using the current default units for length.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.radius

# Set the value of the property.
constantRadiusFilletEdgeSetInput_var.radius = propertyValue
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = constantRadiusFilletEdgeSetInput_var->radius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = constantRadiusFilletEdgeSetInput_var->radius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


ConstantRadiusFilletEdgeSetInput.tangencyWeight Property

Parent Object: ConstantRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

Description

Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSetInput_var.tangencyWeight

# Set the value of the property.
constantRadiusFilletEdgeSetInput_var.tangencyWeight = propertyValue
"constantRadiusFilletEdgeSetInput_var" is a variable referencing a ConstantRadiusFilletEdgeSetInput object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = constantRadiusFilletEdgeSetInput_var->tangencyWeight();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = constantRadiusFilletEdgeSetInput_var->tangencyWeight(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


ConstructionAxes Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Provides access to the construction axes within a component and provides methods to create new construction axes.

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 the direct modeling mode and will fail in the parametric modeling mode.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.constructionAxes, Component.constructionAxes, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

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 the direct modeling mode and will fail in the parametric modeling mode.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

The component that owns this collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

The number of construction axes in the collection.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


ConstructionAxes.createInput Method

Parent Object: ConstructionAxes
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Create a ConstructionAxisInput object that is in turn used to create a ConstructionAxis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Function that returns the specified construction axis using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

Returns the specified construction axis using the name of the construction axis as it is displayed in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxes.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

ConstructionAxis Object

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the ConstructionAxis object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction axis.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, FlatPatternComponent.xConstructionAxis, FlatPatternComponent.yConstructionAxis, FlatPatternComponent.zConstructionAxis

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version August 2014


ConstructionAxis.assemblyContext Property

Parent Object: ConstructionAxis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns the collection of attributes associated with this construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns the component this construction plane belongs to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version August 2014


ConstructionAxis.definition Property

Parent Object: ConstructionAxis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns the construction axis definition object which provides access to the information defining the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Deletes the construction axis.

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.entityToken Property

Parent Object: ConstructionAxis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns a token for the ConstructionAxis object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction axis.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.entityToken
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
string propertyValue = constructionAxis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ConstructionAxis.errorOrWarningMessage Property

Parent Object: ConstructionAxis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns the current health state of this construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Indicates if this construction axis can be deleted. Base construction axes can not be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Indicates if this construction axis is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Gets if the construction plane is visible. This property is affected by the AssemblyContext of the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

The name of the construction axis as it is shown in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxis.h>

Description

Returns the timeline object associated with this construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.axis Property

Parent Object: ConstructionAxisByLineDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

Description

Gets and sets the infinite line that defines the position and direction of the axis

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisByLineDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

The definition for a parametric construction axis created using the SetbyCircularFace method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.circularFace Property

Parent Object: ConstructionAxisCircularFaceDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

Gets and sets the cylinder, cone, or torus this work axis is parametrically dependent on.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisDefinition.h>

Description

A Base class to return the information (possibly parametric) used to define a ConstructionAxis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

The definition for a parametric construction axis created using the SetbyEdge method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.classType Method

Parent Object: ConstructionAxisEdgeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

Gets and sets the linear edge, construction line, or sketch line that defines the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the direct modeling mode. This is not valid when working in the parametric modeling mode 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 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 startEdit 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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 the direct modeling mode. This is not valid when working in the parametric modeling mode and will fail.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

Description

This input method is for creating an axis that is normal to a face at a specified point.

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 through.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

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 startEdit 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

The definition for a parametric construction axis created using the SetByNormalToFaceAtPoint method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Gets the face the axis is normal to

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Gets the point that positions the axis

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

Description

Redefines the input geometry of the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

The definition for a parametric construction axis created using the SetByPerpendicularAtPoint method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Returns the face the construction axis is perpendicular to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Returns the point (construction or sketch point) that positions the axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

Description

Redefines the input geometry of the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

The definition for a parametric construction axis created using the SetByTwoPlanes method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Gets the first planar face or construction plane

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Gets the second planar face or construction plane

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

Description

Redefines the input geometry of the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

The definition for a parametric construction axis created using the SetbyTwoPoints method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Returns the ConstructionAxis object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Gets the first point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Gets the second point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

Description

Redefines the input geometry of the construction axis.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

ConstructionPlane Object

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the ConstructionPlane object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction plane.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Arrange2DPlaneEnvelopeInput.plane, Arrange3DEnvelopeDefinition.plane, Arrange3DEnvelopeInput.plane, ArrangePlaneEnvelopeDefinition.plane, BaseFeature.constructionPlanes, Component.xYConstructionPlane, Component.xZConstructionPlane, Component.yZConstructionPlane, ConstructionPlane.createForAssemblyContext, ConstructionPlane.nativeObject, ConstructionPlaneAtAngleDefinition.parentConstructionPlane, ConstructionPlaneByPlaneDefinition.parentConstructionPlane, ConstructionPlaneDefinition.parentConstructionPlane, ConstructionPlaneDistanceOnPathDefinition.parentConstructionPlane, ConstructionPlaneMidplaneDefinition.parentConstructionPlane, ConstructionPlaneOffsetDefinition.parentConstructionPlane, ConstructionPlaneOffsetThroughPointDefinition.parentConstructionPlane, ConstructionPlanes.add, ConstructionPlanes.item, ConstructionPlanes.itemByName, ConstructionPlaneTangentAtPointDefinition.parentConstructionPlane, ConstructionPlaneTangentDefinition.parentConstructionPlane, ConstructionPlaneThreePointsDefinition.parentConstructionPlane, ConstructionPlaneTwoEdgesDefinition.parentConstructionPlane, FlatPatternComponent.xYConstructionPlane, FlatPatternComponent.xZConstructionPlane, FlatPatternComponent.yZConstructionPlane

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the collection of attributes associated with this construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the component this construction plane belongs to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the ConstructionPlaneDefinition object which provides access to the information defining this ConstructionPlane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Deletes the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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.entityToken Property

Parent Object: ConstructionPlane
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns a token for the ConstructionPlane object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction plane.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.entityToken
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
string propertyValue = constructionPlane_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ConstructionPlane.errorOrWarningMessage Property

Parent Object: ConstructionPlane
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns a plane that represents the position and orientation of the construction plane. This geometry is defined in the AssemblyContext of this ConstructionPlane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the current health state of this construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Indicates if this construction plane can be deleted. Base construction planes can not be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Indicates if this construction plane is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Indicates if the construction plane is visible. This property is affected by the AssemblyContext of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the name of the construction plane as it is shown in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

Description

Returns the timeline object associated with this construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlane.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

ConstructionPlaneAtAngleDefinition defines a ConstructionPlane by an angle around a linear entity.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Parameter object that controls the value of the angle. You can use properties of the returned Parameter object to modify 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

This property is only valid for construction planes that were created using the API. When an angle construction plane is created using the user interface the plane is not defined by the user and a plane is automatically inferred by Fusion. In this case, this property will return null.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.angle Property

Parent Object: ConstructionPlaneAtAngleDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Returns a Parameter object that controls the value of the angle. You can use properties of the returned Parameter object to modify the angle.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Gets the linear edge, construction line, or sketch line that defines the axis of rotation for the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.

This property is only valid for construction planes that were created using the API. When an angle construction plane is created using the user interface the plane is not defined by the user and a plane is automatically inferred by Fusion. In this case, this property will return null.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

Description

Redefines the input geometry of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPlane | Returns the ConstructionPlane object
plane | Gets and sets the position of the construction plane. Setting this property is only valid for a construction plane in a direct edit design or in a base feature. Construction planes in a parametric model are parametrically controlled and cannot be directly edited.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.classType Method

Parent Object: ConstructionPlaneByPlaneDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

Description

Gets and sets the position of the construction plane. Setting this property is only valid for a construction plane in a direct edit design or in a base feature. Construction planes in a parametric model are parametrically controlled and cannot be directly edited.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDefinition.h>

Description

A Base class to return the information, possibly parametric, used to define the ConstructionPlane.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPlane | Returns the ConstructionPlane object

Accessed From

ConstructionPlane.definition

Derived Classes

ConstructionPlaneAtAngleDefinition, ConstructionPlaneByPlaneDefinition, ConstructionPlaneDistanceOnPathDefinition, ConstructionPlaneMidplaneDefinition, ConstructionPlaneOffsetDefinition, ConstructionPlaneOffsetThroughPointDefinition, ConstructionPlaneTangentAtPointDefinition, ConstructionPlaneTangentDefinition, ConstructionPlaneThreePointsDefinition, ConstructionPlaneTwoEdgesDefinition

Version

Introduced in version August 2014


ConstructionPlaneDefinition.classType Method

Parent Object: ConstructionPlaneDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Gets the distance along the path.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Gets the sketch curve, edge, or a profile object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

Description

Redefines the input defining the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
setByOffsetThroughPoint | Defines a construction plane that is offset from a planar face or construction plane and whose offset distance is defined by a vertex, sketch point, or construction point where the plane passes through the point.
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 the direct modeling mode. This is not valid when working in the parametric modeling mode 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 startEdit 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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.setByOffsetThroughPoint Method

Parent Object: ConstructionPlaneInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

Description

Defines a construction plane that is offset from a planar face or construction plane and whose offset distance is defined by a vertex, sketch point, or construction point where the plane passes through the point.

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByOffsetThroughPoint(planarEntity, point)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByOffsetThroughPoint(planarEntity, point);

Return Value

Type | Description
boolean | Returns true if construction plane definition is successful.

Parameters

Name | Type | Description
planarEntity | Base | A planar BRepFace, ConstructionPlane, or Plane object that the new construction plane will be offset from. A Plane object is only valid in a direct-edit design or a base feature. In that case a non-parametric result is created.
point | Base | A BRepVertex, SketchPoint, ConstructionPoint, or Point3D that defines the offset distance. A Point3D is only valid in a direct-edit design. In that case a non-parametric result is created.

Version

Introduced in version January 2025


ConstructionPlaneInput.setByPlane Method

Parent Object: ConstructionPlaneInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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 the direct modeling mode. This is not valid when working in the parametric modeling mode and will fail.

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 construction plane definition is successful.

Parameters

Name | Type | Description
plane | Plane | A transient plane object

Version

Introduced in version August 2014


ConstructionPlaneInput.setByTangent Method

Parent Object: ConstructionPlaneInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneInput.h>

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 startEdit 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

ConstructionPlaneMidplaneDefinition defines a ConstructionPlane by...

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Gets the first planar face or construction plane that defines this ConstructionPlane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Gets the second planar face or construction plane that defines this ConstructionPlane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

Description

Redefines the input geometry of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

ConstructionPlaneOffsetDefinition defines a construction plane that is offset by a specified distance from a planar face or construction plane by a specified distance. A positive or negative value can control the direction of the offset.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset | Returns a Parameter object that controls the value of the offset. You can use properties of the returned Parameter object to modify 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Returns a Parameter object that controls the value of the offset. You can use properties of the returned Parameter object to modify the offset.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Gets the planar face or construction plane this construction plane is parametrically dependent on.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

Description

Redefines the input geometry of the construction plane.

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


ConstructionPlaneOffsetThroughPointDefinition Object

Derived from: ConstructionPlaneDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Defines a construction plane that is offset from a planar face or construction plane and whose offset distance is defined by a vertex, sketch point, or construction point where the plane passes through the point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPlane | Returns the ConstructionPlane object
planarEntity | Returns the planar face or construction plane this construction plane is parametrically dependent on.
point | Returns the point that controls the offset.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.classType Method

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneOffsetThroughPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneOffsetThroughPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.isValid Property

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetThroughPointDefinition_var.isValid
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneOffsetThroughPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.objectType Property

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetThroughPointDefinition_var.objectType
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneOffsetThroughPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Returns the ConstructionPlane object

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetThroughPointDefinition_var.parentConstructionPlane
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneOffsetThroughPointDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.planarEntity Property

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Returns the planar face or construction plane this construction plane is parametrically dependent on.

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetThroughPointDefinition_var.planarEntity
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneOffsetThroughPointDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.point Property

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Returns the point that controls the offset.

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetThroughPointDefinition_var.point
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneOffsetThroughPointDefinition_var->point();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2025


ConstructionPlaneOffsetThroughPointDefinition.redefine Method

Parent Object: ConstructionPlaneOffsetThroughPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

Description

Redefines the input geometry of the construction plane.

Syntax

  • Python
  • C++
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.
returnValue = constructionPlaneOffsetThroughPointDefinition_var.redefine(planarEntity, point)
"constructionPlaneOffsetThroughPointDefinition_var" is a variable referencing a ConstructionPlaneOffsetThroughPointDefinition object.

#include <Fusion/Construction/ConstructionPlaneOffsetThroughPointDefinition.h>

returnValue = constructionPlaneOffsetThroughPointDefinition_var->redefine(planarEntity, point);

Return Value

Type | Description
boolean | Returns true is the operation is successful

Parameters

Name | Type | Description
planarEntity | Base | A planar BRepFace or ConstructionPlane that the new construction plane will be offset from.
point | Base | A BRepVertex, SketchPoint, or ConstructionPoint that defines the offset distance.

Version

Introduced in version January 2025


ConstructionPlanes Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Provides access to the construction planes within a component and provides methods to create new construction planes.

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 the direct modeling model and will fail in the parametric modeling mode.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.constructionPlanes, Component.constructionPlanes, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

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 the direct modeling model and will fail in the parametric modeling mode.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Returns the component that owns this collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Returns the number of construction planes in the collection.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


ConstructionPlanes.createInput Method

Parent Object: ConstructionPlanes
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Create a ConstructionPlaneInput object that is in turn used to create a ConstructionPlane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Function that returns the specified construction plane using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

Returns the specified construction plane using the name of the construction plane as it is displayed in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlanes.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

ConstructionPlaneTangentAtPointDefinition defines a ConstructionPlane tangent to a face and aligned to a point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Gets the point (sketch point, vertex, construction point) used to align the plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Redefines the input geometry of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

Description

Gets the tangent face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

ConstructionPlaneTangentDefinition defines a ConstructionPlane tangent to a cylindrical or conical face at a point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Redefines the input geometry of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

Description

Gets the cylindrical or conical face that the construction plane is tangent to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

ConstructionPlaneThreePointDefinition defines a ConstructionPlane by 3 point entities (e.g. (sketch points, vertices or construction points) that form a triangle (i.e. no two points the same and they aren't collinear).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Gets the first construction point, sketch point or vertex.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Gets the third construction point, sketch point or vertex.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Gets the second construction point, sketch point or vertex.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

Description

Redefines the input geometry of the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

ConstructionPlaneTwoEdgesDefinition defines a ConstructionPlane by two co-planar linear entities like edges, sketch lines or construction axis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPlane | Returns the ConstructionPlane object

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.classType Method

Parent Object: ConstructionPlaneTwoEdgesDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Gets the first linear edge, construction line, or sketch line that defines the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Gets the second linear edge, construction line, or sketch line that defines the construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Returns the ConstructionPlane object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

Description

Redefines the input geometry of the construction plane.

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);

Return Value

Type | Description
boolean | Returns true if successful.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

ConstructionPoint Object

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the ConstructionPoint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction point.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, FlatPatternComponent.originConstructionPoint

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


ConstructionPoint.assemblyContext Property

Parent Object: ConstructionPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns the collection of attributes associated with this construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns the component this construction point belongs to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


ConstructionPoint.definition Property

Parent Object: ConstructionPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns the construction point definition object which provides access to the information defining the construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Deletes the construction point.

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.entityToken Property

Parent Object: ConstructionPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns a token for the ConstructionPoint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same construction point.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.entityToken
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
string propertyValue = constructionPoint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ConstructionPoint.errorOrWarningMessage Property

Parent Object: ConstructionPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns a Point3D object that represents the position of the construction point. The returned geometry is in the AssemblyContext of this ConstructionPoint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns the current health state of this construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Indicates if this construction point can be deleted. The base construction point cannot be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Indicates if the construction point is parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Gets if the construction point is visible. This property is affected by the AssemblyContext of the construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

The name of the construction point as it is displayed in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoint.h>

Description

Returns the timeline object associated with this construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

Description

The definition for a parametric construction point created using the SetbyCenter method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPoint | Returns the ConstructionPoint object

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.circularEntity Property

Parent Object: ConstructionPointCenterDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointCenterDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointDefinition.h>

Description

A Base class to return the information (possibly parametric) used to define a ConstructionPoint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

The definition for a parametric construction point created using the SetbyEdgePlane method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

A linear B-Rep edge, construction axis or sketch line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

A plane, planar B-Rep face or construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

Description

Redefines the input geometry of the construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the direct edit modeling mode. This is not valid when working in the parametric modeling mode 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 startEdit 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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 the direct edit modeling mode. This is not valid when working in the parametric modeling mode 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointInput.h>

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 startEdit 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointPointDefinition.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Provides access to the construction points within a component and provides methods to create new construction points.

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 the direct modeling mode and will fail in the parametric modeling mode.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.constructionPoints, Component.constructionPoints, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

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 the direct modeling mode and will fail in the parametric modeling mode.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

The component that owns this collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

The number of construction points in the collection.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


ConstructionPoints.createInput Method

Parent Object: ConstructionPoints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Create a ConstructionPointInput object that is in turn used to create a ConstructionPoint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Function that returns the specified construction point using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

Returns the specified construction point using the name of the construction point as it is displayed in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPoints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

The definition for a parametric construction point created using the SetbyThreePlanes method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

The first plane or planar face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

The third plane or planar face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

The second plane or planar face

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

Description

Redefines the input geometry of the construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

The definition for a parametric construction point created using the SetbyTwoEdges method

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentConstructionPoint | Returns the ConstructionPoint object

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.classType Method

Parent Object: ConstructionPointTwoEdgesDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Returns a B-Rep edge or sketch line

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Returns a B-Rep edge or sketch line

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Returns the ConstructionPoint object

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

Description

Redefines the input geometry of the construction point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Represents a contact set in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Deletes this contact set from the design.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Gets and sets if this contact set is currently suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Gets and sets the name of the contact set.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSet.h>

Description

Gets and sets the group of Occurrence and/or BRepBody objects that are part of this contact set.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Provides access to the existing contact sets in a design and supports creating new contact sets.

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 | Returns the specified contact set.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.contactSets, FlatPatternProduct.contactSets, WorkingModel.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Creates a new contact set for the provided occurrences and/or bodies.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Returns the number of contacts sets in the design.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Returns the specified contact set using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

Returns the specified contact set.

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);

Return Value

Type | Description
ContactSet | Returns the specified contact set or null there isn't a contact set with that name.

Parameters

Name | Type | Description
name | string | The name of the contact set to return.

Version

Introduced in version September 2016


ContactSets.objectType Property

Parent Object: ContactSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/ContactSets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CommandDefinition.controlDefinition

Derived Classes

ButtonControlDefinition, CheckBoxControlDefinition, ListControlDefinition

Version

Introduced in version August 2014


ControlDefinition.classType Method

Parent Object: ControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

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.

Version

Introduced in version August 2014


ControlDefinition.isValid Property

Parent Object: ControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

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.

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.

Version

Introduced in version August 2014


ControlDefinition.name Property

Parent Object: ControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

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.

Version

Introduced in version August 2014


ControlDefinition.objectType Property

Parent Object: ControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ControlDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ControllerConfigurationMachineElement Object

Derived from: MachineElement Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Machine element representing controller settings for kinematics.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
staticTypeId | Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Properties

Name | Description
axisConfigurations | Gets the collection of axis configuration objects.
elementId | Identifier for this element. Unique within an element type.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxBlockProcessingSpeed | Maximum block processing rate for the controller.
maxNormalSpeed | Global maximum non-rapid linear motion speed. Units are cm/s.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
typeId | Identifier for this type of machine element.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.axisConfigurations Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Gets the collection of axis configuration objects.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.axisConfigurations
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
Ptr<MachineAxisConfigurations> propertyValue = controllerConfigurationMachineElement_var->axisConfigurations();

Property Value

This is a read only property whose value is a MachineAxisConfigurations.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.classType Method

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ControllerConfigurationMachineElement.classType()
This is a static method.

#include <Cam/Machine/ControllerConfigurationMachineElement.h>

returnValue = adsk::cam::ControllerConfigurationMachineElement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.elementId Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.elementId
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
string propertyValue = controllerConfigurationMachineElement_var->elementId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.isValid Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.isValid
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
boolean propertyValue = controllerConfigurationMachineElement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.maxBlockProcessingSpeed Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Maximum block processing rate for the controller.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.maxBlockProcessingSpeed

# Set the value of the property.
controllerConfigurationMachineElement_var.maxBlockProcessingSpeed = propertyValue
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
uinteger propertyValue = controllerConfigurationMachineElement_var->maxBlockProcessingSpeed();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = controllerConfigurationMachineElement_var->maxBlockProcessingSpeed(value_var);

Property Value

This is a read/write property whose value is a uinteger.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.maxNormalSpeed Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Global maximum non-rapid linear motion speed. Units are cm/s.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.maxNormalSpeed

# Set the value of the property.
controllerConfigurationMachineElement_var.maxNormalSpeed = propertyValue
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
double propertyValue = controllerConfigurationMachineElement_var->maxNormalSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = controllerConfigurationMachineElement_var->maxNormalSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.objectType Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.objectType
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
string propertyValue = controllerConfigurationMachineElement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.staticTypeId Method

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ControllerConfigurationMachineElement.staticTypeId()
This is a static method.

#include <Cam/Machine/ControllerConfigurationMachineElement.h>

returnValue = adsk::cam::ControllerConfigurationMachineElement::staticTypeId();

Return Value

Type | Description
string | Returns identifier of this type.

Version

Introduced in version April 2023


ControllerConfigurationMachineElement.typeId Property

Parent Object: ControllerConfigurationMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/ControllerConfigurationMachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.

# Get the value of the property.
propertyValue = controllerConfigurationMachineElement_var.typeId
"controllerConfigurationMachineElement_var" is a variable referencing a ControllerConfigurationMachineElement object.
#include <Cam/Machine/ControllerConfigurationMachineElement.h>

// Get the value of the property.
string propertyValue = controllerConfigurationMachineElement_var->typeId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CopyDesignFileInput Object

CopyDesignFileInput Object Preview

Derived from: CopyFileInput Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Input object that defines the various settings that apply when copying a design file, including whether associated drawings and/or references external components are also copied.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isCopyDrawings | Gets and sets if any drawings associated with the design should also be copied.
isCopyReferencedExternalComponents | Gets and sets if any external reference components associated with the design should also be copied.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
targetFolder | Gets and sets the target DataFolder where the design will be copied to.

Accessed From

DataFile.createCopyDesignFileInput

Version

Introduced in version May 2024


CopyDesignFileInput.classType Method

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CopyDesignFileInput.classType()
This is a static method.

#include <Core/Dashboard/CopyDesignFileInput.h>

returnValue = adsk::core::CopyDesignFileInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


CopyDesignFileInput.isCopyDrawings Property

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

Gets and sets if any drawings associated with the design should also be copied.

Syntax

  • Python
  • C++
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.

# Get the value of the property.
propertyValue = copyDesignFileInput_var.isCopyDrawings

# Set the value of the property.
copyDesignFileInput_var.isCopyDrawings = propertyValue
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.
#include <Core/Dashboard/CopyDesignFileInput.h>

// Get the value of the property.
boolean propertyValue = copyDesignFileInput_var->isCopyDrawings();

// Set the value of the property, where value_var is a boolean.
bool returnValue = copyDesignFileInput_var->isCopyDrawings(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


CopyDesignFileInput.isCopyReferencedExternalComponents Property

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

Gets and sets if any external reference components associated with the design should also be copied.

Syntax

  • Python
  • C++
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.

# Get the value of the property.
propertyValue = copyDesignFileInput_var.isCopyReferencedExternalComponents

# Set the value of the property.
copyDesignFileInput_var.isCopyReferencedExternalComponents = propertyValue
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.
#include <Core/Dashboard/CopyDesignFileInput.h>

// Get the value of the property.
boolean propertyValue = copyDesignFileInput_var->isCopyReferencedExternalComponents();

// Set the value of the property, where value_var is a boolean.
bool returnValue = copyDesignFileInput_var->isCopyReferencedExternalComponents(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


CopyDesignFileInput.isValid Property

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.

# Get the value of the property.
propertyValue = copyDesignFileInput_var.isValid
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.
#include <Core/Dashboard/CopyDesignFileInput.h>

// Get the value of the property.
boolean propertyValue = copyDesignFileInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


CopyDesignFileInput.objectType Property

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.

# Get the value of the property.
propertyValue = copyDesignFileInput_var.objectType
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.
#include <Core/Dashboard/CopyDesignFileInput.h>

// Get the value of the property.
string propertyValue = copyDesignFileInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


CopyDesignFileInput.targetFolder Property

Parent Object: CopyDesignFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyDesignFileInput.h>

Description

Gets and sets the target DataFolder where the design will be copied to.

Syntax

  • Python
  • C++
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.

# Get the value of the property.
propertyValue = copyDesignFileInput_var.targetFolder
"copyDesignFileInput_var" is a variable referencing a CopyDesignFileInput object.
#include <Core/Dashboard/CopyDesignFileInput.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = copyDesignFileInput_var->targetFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version May 2024


CopyFileInput Object

CopyFileInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyFileInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The base class for any copy file input objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
targetFolder | Gets and sets the target DataFolder where the design will be copied to.

Accessed From

DataFile.createCopyFileInput, DesignDataFile.createCopyInput

Derived Classes

CopyDesignFileInput

Version

Introduced in version October 2023


CopyFileInput.classType Method

Parent Object: CopyFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyFileInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CopyFileInput.classType()
This is a static method.

#include <Core/Dashboard/CopyFileInput.h>

returnValue = adsk::core::CopyFileInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


CopyFileInput.isValid Property

Parent Object: CopyFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyFileInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"copyFileInput_var" is a variable referencing a CopyFileInput object.

# Get the value of the property.
propertyValue = copyFileInput_var.isValid
"copyFileInput_var" is a variable referencing a CopyFileInput object.
#include <Core/Dashboard/CopyFileInput.h>

// Get the value of the property.
boolean propertyValue = copyFileInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CopyFileInput.objectType Property

Parent Object: CopyFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyFileInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"copyFileInput_var" is a variable referencing a CopyFileInput object.

# Get the value of the property.
propertyValue = copyFileInput_var.objectType
"copyFileInput_var" is a variable referencing a CopyFileInput object.
#include <Core/Dashboard/CopyFileInput.h>

// Get the value of the property.
string propertyValue = copyFileInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CopyFileInput.targetFolder Property

Parent Object: CopyFileInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/CopyFileInput.h>

Description

Gets and sets the target DataFolder where the design will be copied to.

Syntax

  • Python
  • C++
"copyFileInput_var" is a variable referencing a CopyFileInput object.

# Get the value of the property.
propertyValue = copyFileInput_var.targetFolder
"copyFileInput_var" is a variable referencing a CopyFileInput object.
#include <Core/Dashboard/CopyFileInput.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = copyFileInput_var->targetFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version October 2023


CopyPasteBodies Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

Copies the specified body into the component that owns this CopyPasteBodies collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

The number of Copy/Paste Body features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

Function that returns the specified Copy/Paste Body feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

Function that returns the specified Copy/Paste Body feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBodies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Object that represents an existing Copy/Paste Body feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

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.entityToken Property

Parent Object: CopyPasteBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.entityToken
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
string propertyValue = copyPasteBody_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CopyPasteBody.errorOrWarningMessage Property

Parent Object: CopyPasteBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CopyPasteBody.h>

Description

Returns the timeline object associated with this feature.

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


CreateFromCAMTemplateInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Object that contains the settings used by createFromCAMTemplate.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an empty input object to be passed into createFromCAMTemplate

Properties

Name | Description
camTemplate | Gets and sets the template to be instantiated.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mode | Gets and sets the mode to be used for generation. Defaults to Skip Generation.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CreateFromCAMTemplateInput.create

Samples

Name Description
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.camTemplate Property

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Gets and sets the template to be instantiated.

Syntax

  • Python
  • C++
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.

# Get the value of the property.
propertyValue = createFromCAMTemplateInput_var.camTemplate

# Set the value of the property.
createFromCAMTemplateInput_var.camTemplate = propertyValue
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.
#include <Cam/CAM/CreateFromCAMTemplateInput.h>

// Get the value of the property.
Ptr<CAMTemplate> propertyValue = createFromCAMTemplateInput_var->camTemplate();

// Set the value of the property, where value_var is a CAMTemplate.
bool returnValue = createFromCAMTemplateInput_var->camTemplate(value_var);

Property Value

This is a read/write property whose value is a CAMTemplate.

Samples

Name Description
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.classType Method

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CreateFromCAMTemplateInput.classType()
This is a static method.

#include <Cam/CAM/CreateFromCAMTemplateInput.h>

returnValue = adsk::cam::CreateFromCAMTemplateInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.create Method

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Creates an empty input object to be passed into createFromCAMTemplate

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CreateFromCAMTemplateInput.create()
This is a static method.

#include <Cam/CAM/CreateFromCAMTemplateInput.h>

returnValue = adsk::cam::CreateFromCAMTemplateInput::create();

Return Value

Type | Description
CreateFromCAMTemplateInput | The newly created input object.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.isValid Property

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.

# Get the value of the property.
propertyValue = createFromCAMTemplateInput_var.isValid
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.
#include <Cam/CAM/CreateFromCAMTemplateInput.h>

// Get the value of the property.
boolean propertyValue = createFromCAMTemplateInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.mode Property

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

Gets and sets the mode to be used for generation. Defaults to Skip Generation.

Syntax

  • Python
  • C++
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.

# Get the value of the property.
propertyValue = createFromCAMTemplateInput_var.mode

# Set the value of the property.
createFromCAMTemplateInput_var.mode = propertyValue
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.
#include <Cam/CAM/CreateFromCAMTemplateInput.h>

// Get the value of the property.
AutomaticGenerationModes propertyValue = createFromCAMTemplateInput_var->mode();

// Set the value of the property, where value_var is an AutomaticGenerationModes.
bool returnValue = createFromCAMTemplateInput_var->mode(value_var);

Property Value

This is a read/write property whose value is an AutomaticGenerationModes.

Version

Introduced in version October 2023


CreateFromCAMTemplateInput.objectType Property

Parent Object: CreateFromCAMTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/CreateFromCAMTemplateInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.

# Get the value of the property.
propertyValue = createFromCAMTemplateInput_var.objectType
"createFromCAMTemplateInput_var" is a variable referencing a CreateFromCAMTemplateInput object.
#include <Cam/CAM/CreateFromCAMTemplateInput.h>

// Get the value of the property.
string propertyValue = createFromCAMTemplateInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


CurvatureCombAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

Provides access to any curvature comb analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified CurvatureCombAnalysis object using an index into the collection.
itemByName | A method that returns the specified CurvatureCombAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of CurvatureCombAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.curvatureCombAnalyses

Version

Introduced in version January 2023


CurvatureCombAnalyses.classType Method

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CurvatureCombAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/CurvatureCombAnalyses.h>

returnValue = adsk::fusion::CurvatureCombAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


CurvatureCombAnalyses.count Property

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

Returns the number of CurvatureCombAnalysis objects in the collection.

Syntax

  • Python
  • C++
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.

# Get the value of the property.
propertyValue = curvatureCombAnalyses_var.count
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.
#include <Fusion/Fusion/CurvatureCombAnalyses.h>

// Get the value of the property.
uinteger propertyValue = curvatureCombAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


CurvatureCombAnalyses.isValid Property

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.

# Get the value of the property.
propertyValue = curvatureCombAnalyses_var.isValid
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.
#include <Fusion/Fusion/CurvatureCombAnalyses.h>

// Get the value of the property.
boolean propertyValue = curvatureCombAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureCombAnalyses.item Method

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

A method that returns the specified CurvatureCombAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.
returnValue = curvatureCombAnalyses_var.item(index)
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.

#include <Fusion/Fusion/CurvatureCombAnalyses.h>

returnValue = curvatureCombAnalyses_var->item(index);

Return Value

Type | Description
CurvatureCombAnalysis | 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 2023


CurvatureCombAnalyses.itemByName Method

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

A method that returns the specified CurvatureCombAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.
returnValue = curvatureCombAnalyses_var.itemByName(name)
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.

#include <Fusion/Fusion/CurvatureCombAnalyses.h>

returnValue = curvatureCombAnalyses_var->itemByName(name);

Return Value

Type | Description
CurvatureCombAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the CurvatureCombAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


CurvatureCombAnalyses.objectType Property

Parent Object: CurvatureCombAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.

# Get the value of the property.
propertyValue = curvatureCombAnalyses_var.objectType
"curvatureCombAnalyses_var" is a variable referencing a CurvatureCombAnalyses object.
#include <Fusion/Fusion/CurvatureCombAnalyses.h>

// Get the value of the property.
string propertyValue = curvatureCombAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


CurvatureCombAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

Represents any existing Curvature Comb Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CurvatureCombAnalyses.item, CurvatureCombAnalyses.itemByName

Version

Introduced in version January 2023


CurvatureCombAnalysis.attributes Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.attributes
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = curvatureCombAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


CurvatureCombAnalysis.classType Method

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CurvatureCombAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/CurvatureCombAnalysis.h>

returnValue = adsk::fusion::CurvatureCombAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


CurvatureCombAnalysis.deleteMe Method

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
returnValue = curvatureCombAnalysis_var.deleteMe()
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

#include <Fusion/Fusion/CurvatureCombAnalysis.h>

returnValue = curvatureCombAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


CurvatureCombAnalysis.entityToken Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.entityToken
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureCombAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


CurvatureCombAnalysis.isLightBulbOn Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.isLightBulbOn

# Set the value of the property.
curvatureCombAnalysis_var.isLightBulbOn = propertyValue
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureCombAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = curvatureCombAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureCombAnalysis.isValid Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.isValid
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureCombAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureCombAnalysis.isVisible Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.isVisible
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureCombAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureCombAnalysis.name Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.name

# Set the value of the property.
curvatureCombAnalysis_var.name = propertyValue
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureCombAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = curvatureCombAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


CurvatureCombAnalysis.objectType Property

Parent Object: CurvatureCombAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureCombAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.

# Get the value of the property.
propertyValue = curvatureCombAnalysis_var.objectType
"curvatureCombAnalysis_var" is a variable referencing a CurvatureCombAnalysis object.
#include <Fusion/Fusion/CurvatureCombAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureCombAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


CurvatureMapAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

Provides access to any curvature map analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified CurvatureMapAnalysis object using an index into the collection.
itemByName | A method that returns the specified CurvatureMapAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of CurvatureMapAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.curvatureMapAnalyses

Version

Introduced in version January 2023


CurvatureMapAnalyses.classType Method

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CurvatureMapAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/CurvatureMapAnalyses.h>

returnValue = adsk::fusion::CurvatureMapAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


CurvatureMapAnalyses.count Property

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

Returns the number of CurvatureMapAnalysis objects in the collection.

Syntax

  • Python
  • C++
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.

# Get the value of the property.
propertyValue = curvatureMapAnalyses_var.count
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.
#include <Fusion/Fusion/CurvatureMapAnalyses.h>

// Get the value of the property.
uinteger propertyValue = curvatureMapAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


CurvatureMapAnalyses.isValid Property

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.

# Get the value of the property.
propertyValue = curvatureMapAnalyses_var.isValid
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.
#include <Fusion/Fusion/CurvatureMapAnalyses.h>

// Get the value of the property.
boolean propertyValue = curvatureMapAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureMapAnalyses.item Method

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

A method that returns the specified CurvatureMapAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.
returnValue = curvatureMapAnalyses_var.item(index)
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.

#include <Fusion/Fusion/CurvatureMapAnalyses.h>

returnValue = curvatureMapAnalyses_var->item(index);

Return Value

Type | Description
CurvatureMapAnalysis | 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 2023


CurvatureMapAnalyses.itemByName Method

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

A method that returns the specified CurvatureMapAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.
returnValue = curvatureMapAnalyses_var.itemByName(name)
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.

#include <Fusion/Fusion/CurvatureMapAnalyses.h>

returnValue = curvatureMapAnalyses_var->itemByName(name);

Return Value

Type | Description
CurvatureMapAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the CurvatureMapAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


CurvatureMapAnalyses.objectType Property

Parent Object: CurvatureMapAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.

# Get the value of the property.
propertyValue = curvatureMapAnalyses_var.objectType
"curvatureMapAnalyses_var" is a variable referencing a CurvatureMapAnalyses object.
#include <Fusion/Fusion/CurvatureMapAnalyses.h>

// Get the value of the property.
string propertyValue = curvatureMapAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


CurvatureMapAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

Represents any existing Curvature Map Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CurvatureMapAnalyses.item, CurvatureMapAnalyses.itemByName

Version

Introduced in version January 2023


CurvatureMapAnalysis.attributes Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.attributes
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = curvatureMapAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


CurvatureMapAnalysis.classType Method

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CurvatureMapAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/CurvatureMapAnalysis.h>

returnValue = adsk::fusion::CurvatureMapAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


CurvatureMapAnalysis.deleteMe Method

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
returnValue = curvatureMapAnalysis_var.deleteMe()
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

#include <Fusion/Fusion/CurvatureMapAnalysis.h>

returnValue = curvatureMapAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


CurvatureMapAnalysis.entityToken Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.entityToken
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureMapAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


CurvatureMapAnalysis.isLightBulbOn Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.isLightBulbOn

# Set the value of the property.
curvatureMapAnalysis_var.isLightBulbOn = propertyValue
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureMapAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = curvatureMapAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureMapAnalysis.isValid Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.isValid
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureMapAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureMapAnalysis.isVisible Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.isVisible
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
boolean propertyValue = curvatureMapAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


CurvatureMapAnalysis.name Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.name

# Set the value of the property.
curvatureMapAnalysis_var.name = propertyValue
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureMapAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = curvatureMapAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


CurvatureMapAnalysis.objectType Property

Parent Object: CurvatureMapAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/CurvatureMapAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.

# Get the value of the property.
propertyValue = curvatureMapAnalysis_var.objectType
"curvatureMapAnalysis_var" is a variable referencing a CurvatureMapAnalysis object.
#include <Fusion/Fusion/CurvatureMapAnalysis.h>

// Get the value of the property.
string propertyValue = curvatureMapAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


Curve2D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

The base class for all 2D transient geometry classes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepCoEdge.geometry

Derived Classes

Arc2D, Circle2D, Ellipse2D, EllipticalArc2D, Line2D, NurbsCurve2D, Polyline2D

Version

Introduced in version August 2014


Curve2D.classType Method

Parent Object: Curve2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

The base class for all 3D transient geometry classes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepEdge.geometry, BRepEdgeDefinition.modelSpaceCurve, BRepWireEdgeDefinition.modelSpaceCurve, Curve3DPath.item, CustomGraphicsCurve.curve, PathEntity.curve, ProfileCurve.geometry, SketchText.asCurves

Derived Classes

Arc3D, Circle3D, Ellipse3D, EllipticalArc3D, InfiniteLine3D, Line3D, NurbsCurve3D, Polyline3D

Version

Introduced in version August 2014


Curve3D.classType Method

Parent Object: Curve3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3D.h>

Description

Transforms this curve in 3D space.

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


Curve3DPath Object

Curve3DPath Object Preview

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents a collection of connected Curve3D objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Curve3D at the specified index from this collection of Curve3D objects.

Properties

Name | Description
count | Returns the number of Curve3D objects contained in this Curve3D 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedPocket.boundaries, RecognizedPocket.islands

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version September 2023


Curve3DPath.classType Method

Parent Object: Curve3DPath

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Curve3DPath.classType()
This is a static method.

#include <Core/Geometry/Curve3DPath.h>

returnValue = adsk::core::Curve3DPath::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


Curve3DPath.count Property

Parent Object: Curve3DPath

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Description

Returns the number of Curve3D objects contained in this Curve3D collection.

Syntax

  • Python
  • C++
"curve3DPath_var" is a variable referencing a Curve3DPath object.

# Get the value of the property.
propertyValue = curve3DPath_var.count
"curve3DPath_var" is a variable referencing a Curve3DPath object.
#include <Core/Geometry/Curve3DPath.h>

// Get the value of the property.
uinteger propertyValue = curve3DPath_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2023


Curve3DPath.isValid Property

Parent Object: Curve3DPath

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curve3DPath_var" is a variable referencing a Curve3DPath object.

# Get the value of the property.
propertyValue = curve3DPath_var.isValid
"curve3DPath_var" is a variable referencing a Curve3DPath object.
#include <Core/Geometry/Curve3DPath.h>

// Get the value of the property.
boolean propertyValue = curve3DPath_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


Curve3DPath.item Method

Parent Object: Curve3DPath

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Description

Returns the Curve3D at the specified index from this collection of Curve3D objects.

Syntax

  • Python
  • C++
"curve3DPath_var" is a variable referencing a Curve3DPath object.
returnValue = curve3DPath_var.item(index)
"curve3DPath_var" is a variable referencing a Curve3DPath object.

#include <Core/Geometry/Curve3DPath.h>

returnValue = curve3DPath_var->item(index);

Parameters

Name | Type | Description
index | uinteger | The index of the Curve3D within this Curve3D collection to return. The first Curve3D in this collection has an index of 0.

Version

Introduced in version September 2023


Curve3DPath.objectType Property

Parent Object: Curve3DPath

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Geometry/Curve3DPath.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curve3DPath_var" is a variable referencing a Curve3DPath object.

# Get the value of the property.
propertyValue = curve3DPath_var.objectType
"curve3DPath_var" is a variable referencing a Curve3DPath object.
#include <Core/Geometry/Curve3DPath.h>

// Get the value of the property.
string propertyValue = curve3DPath_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


CurveEvaluator2D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

2D curve evaluator that is obtained from a transient curve and allows you to perform various evaluations on the curve.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arc2D.evaluator, BRepCoEdge.evaluator, Circle2D.evaluator, Curve2D.evaluator, Ellipse2D.evaluator, EllipticalArc2D.evaluator, Line2D.evaluator, NurbsCurve2D.evaluator, Polyline2D.evaluator

Version

Introduced in version August 2014


CurveEvaluator2D.classType Method

Parent Object: CurveEvaluator2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the curvature value at a parameter position on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the curvature values at a number of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the end points of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the first derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the first derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the length of the curve between two parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the parametric range of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the point on the curve that corresponds to evaluating a parameter position on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the second derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the second derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the tangent to the curve at a parameter position on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the tangent to the curve at a number of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the third derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Get the third derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

3D curve evaluator that is obtained from a transient curve and allows you to perform various evaluations on the curve.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arc3D.evaluator, BRepEdge.evaluator, Circle3D.evaluator, Curve3D.evaluator, Ellipse3D.evaluator, EllipticalArc3D.evaluator, InfiniteLine3D.evaluator, Line3D.evaluator, NurbsCurve3D.evaluator, Polyline3D.evaluator, SketchConicCurve.evaluator, SketchControlPointSpline.evaluator, SketchFixedSpline.evaluator

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


CurveEvaluator3D.classType Method

Parent Object: CurveEvaluator3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the curvature value at a parameter position on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the curvature values at a number of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the end points of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the first derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the first derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the length of the curve between two parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the parametric range of the curve.

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


CurveEvaluator3D.getParametersAtPoints Method

Parent Object: CurveEvaluator3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the point on the curve that corresponds to evaluating a parameter position on the curve.

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


CurveEvaluator3D.getPointsAtParameters Method

Parent Object: CurveEvaluator3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the second derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the second derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the tangent to the curve at a parameter position on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the tangent to the curve at a number of parameter positions on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the third derivative of the curve at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Get the third derivatives of the curve at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/CurveEvaluator3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


CurveSelection Object

Derived from: GeometrySelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Base class of all curve based geometry selections.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.item

Derived Classes

ChainSelection, FaceContourSelection, PocketRecognitionSelection, PocketSelection, SilhouetteSelection, SketchSelection

Version

Introduced in version April 2023


CurveSelection.classType Method

Parent Object: CurveSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CurveSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/CurveSelection.h>

returnValue = adsk::cam::CurveSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CurveSelection.error Property

Parent Object: CurveSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.error
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
string propertyValue = curveSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


CurveSelection.hasError Property

Parent Object: CurveSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.hasError
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
boolean propertyValue = curveSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CurveSelection.hasWarning Property

Parent Object: CurveSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.hasWarning
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
boolean propertyValue = curveSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


CurveSelection.inputGeometry Property

Parent Object: CurveSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.inputGeometry

# Set the value of the property.
curveSelection_var.inputGeometry = propertyValue
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = curveSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = curveSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version April 2023


CurveSelection.isValid Property

Parent Object: CurveSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.isValid
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
boolean propertyValue = curveSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CurveSelection.objectType Property

Parent Object: CurveSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.objectType
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
string propertyValue = curveSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CurveSelection.value Property

Parent Object: CurveSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.value
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = curveSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


CurveSelection.warning Property

Parent Object: CurveSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"curveSelection_var" is a variable referencing a CurveSelection object.

# Get the value of the property.
propertyValue = curveSelection_var.warning
"curveSelection_var" is a variable referencing a CurveSelection object.
#include <Cam/GeometrySelections/CurveSelection.h>

// Get the value of the property.
string propertyValue = curveSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


CurveSelections Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Collection for all curve selections to be passed to a CadContours2DParameterValue object. This is a read-only container. It returns the curve selections associated with the parent parameter value object, but does not write to it. To apply changes done to the collection and the selections it contains, CadContours2DParameterValue.applyCurveSelections() needs to be called.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 entries.
createNewChainSelection | Creates a new chain selection and adds it to the end of the collection.
createNewFaceContourSelection | Creates a new face contour selection and adds it to the end of the collection.
createNewPocketRecognitionSelection | Preview Creates a new pocket recognition selection and adds it to the end of the collection.
createNewPocketSelection | Creates a new pocket selection and adds it to the end of the collection.
createNewSilhouetteSelection | Creates a new silhouette selection and adds it to the end of the collection.
createNewSketchSelection | Preview Creates a new sketch selection and adds it to the end of the collection.
item | Function that returns the specified curve selection object using an index into the collection.
remove | Function that removes the specified curve selection object using an index in the collection.
removeByObject | Function that removes the specified curve selection object from the collection.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CadContours2dParameterValue.getCurveSelections

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CurveSelections.classType Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CurveSelections.classType()
This is a static method.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = adsk::cam::CurveSelections::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


CurveSelections.clear Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Clears all entries.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.clear()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->clear();

Version

Introduced in version April 2023


CurveSelections.count Property

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.

# Get the value of the property.
propertyValue = curveSelections_var.count
"curveSelections_var" is a variable referencing a CurveSelections object.
#include <Cam/GeometrySelections/CurveSelections.h>

// Get the value of the property.
uinteger propertyValue = curveSelections_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


CurveSelections.createNewChainSelection Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new chain selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewChainSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewChainSelection();

Return Value

Type | Description
ChainSelection | Returns newly created ChainSelection.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


CurveSelections.createNewFaceContourSelection Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new face contour selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewFaceContourSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewFaceContourSelection();

Return Value

Type | Description
FaceContourSelection | Returns newly created FaceContourSelection.

Version

Introduced in version April 2023


CurveSelections.createNewPocketRecognitionSelection Method

Parent Object: CurveSelections

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new pocket recognition selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewPocketRecognitionSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewPocketRecognitionSelection();

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


CurveSelections.createNewPocketSelection Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new pocket selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewPocketSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewPocketSelection();

Return Value

Type | Description
PocketSelection | Returns newly created PocketSelection.

Version

Introduced in version April 2023


CurveSelections.createNewSilhouetteSelection Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new silhouette selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewSilhouetteSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewSilhouetteSelection();

Return Value

Type | Description
SilhouetteSelection | Returns newly created SilhouetteSelection.

Samples

Name | Description
Wood Routing Workflow Sample | This script demonstrates routing wood panels. When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


CurveSelections.createNewSketchSelection Method

Parent Object: CurveSelections

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Creates a new sketch selection and adds it to the end of the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.createNewSketchSelection()
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->createNewSketchSelection();

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


CurveSelections.isValid Property

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.

# Get the value of the property.
propertyValue = curveSelections_var.isValid
"curveSelections_var" is a variable referencing a CurveSelections object.
#include <Cam/GeometrySelections/CurveSelections.h>

// Get the value of the property.
boolean propertyValue = curveSelections_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


CurveSelections.item Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Function that returns the specified curve selection object using an index into the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.item(index)
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->item(index);

Return Value

Type | Description
CurveSelection | 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 2023


CurveSelections.objectType Property

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.

# Get the value of the property.
propertyValue = curveSelections_var.objectType
"curveSelections_var" is a variable referencing a CurveSelections object.
#include <Cam/GeometrySelections/CurveSelections.h>

// Get the value of the property.
string propertyValue = curveSelections_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


CurveSelections.remove Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Function that removes the specified curve selection object using an index in the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.remove(index)
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->remove(index);

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to remove. The first item in the collection has an index of 0.

Version

Introduced in version March 2024


CurveSelections.removeByObject Method

Parent Object: CurveSelections
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/CurveSelections.h>

Description

Function that removes the specified curve selection object from the collection.

Syntax

  • Python
  • C++
"curveSelections_var" is a variable referencing a CurveSelections object.
returnValue = curveSelections_var.removeByObject(selection)
"curveSelections_var" is a variable referencing a CurveSelections object.

#include <Cam/GeometrySelections/CurveSelections.h>

returnValue = curveSelections_var->removeByObject(selection);

Parameters

Name | Type | Description
selection | CurveSelection | The item within the collection to remove. Throws an exception if the curve selection is not part of the given selection.

Version

Introduced in version March 2024


CustomEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

Add a handler to be notified when the event occurs.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Version

Introduced in version January 2017


CustomEvent.classType Method

Parent Object: CustomEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

Returns the id that was assigned to this event when it was registered. Each custom event has it's own unique id.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

The ApplicationEventArgs provides information associated with an application event. Note that some properties are not available on every event

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

Information being passed to the add-in in the primary thread from the worker thread or other add-in.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Version

Introduced in version January 2017


CustomEventArgs.classType Method

Parent Object: CustomEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventHandler.h>

Description

The ApplicationEventHandler is a client implemented class that can be added as a handler to an ApplicationEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version January 2017


CustomEventHandler.notify Method

Parent Object: CustomEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/CustomEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"customEventHandler_var" is a variable referencing a CustomEventHandler object.
returnValue = customEventHandler_var.notify(eventArgs)
"customEventHandler_var" is a variable referencing a CustomEventHandler object.

#include <Core/Application/CustomEventHandler.h>

returnValue = 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


CustomFeature Object

CustomFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing CustomFeature feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
setStartAndEndFeatures | Sets the start and end features that will be grouped by the custom feature. The "features" in this case can be any object that is visible in the timeline, such as modeling features, sketches, and construction geometry. The input features and all features between them in the timeline will be grouped by the custom feature. The current start and end features can be determined by using the CustomFeature.features property and getting the first and last feature from the returned array.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
customNamedValues | Returns the set of custom named values associated with this custom feature. These are a set of named values that are saved with this feature that you can use to save any additional information that is useful for you in managing the custom feature. For example, you might have a setting like an option for different shapes that the user chooses when creating the feature that are not represented as a parameter. You can use this to save the chosen value so when the feature is computed or edited you can use the value originally chosen. During an edit, you might allow the user to edit this setting and you can update the saved custom value.
definition | Gets the CustomFeatureDefinition object associated with this custom feature. null/None is returned in the case where the definition does not exist, which is typically a result of the owning add-in not being loaded.
dependencies | Returns the collection of dependencies for this custom feature. You can use the collection to query, add, and remove dependencies.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
features | Returns the features combined by this custom feature. The start and end features and all of the features between them in the timeline are returned.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameters | Returns the list of parameters associated with this custom feature.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

CustomFeature.createForAssemblyContext, CustomFeature.nativeObject, CustomFeatureDependency.parentCustomFeature, CustomFeatureEventArgs.customFeature, CustomFeatureParameter.parentCustomFeature, CustomFeatures.add, CustomFeatures.item, CustomFeatures.itemByName

Version

Introduced in version January 2021


CustomFeature.assemblyContext Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.assemblyContext
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = customFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2021


CustomFeature.attributes Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.attributes
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = customFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2021


CustomFeature.baseFeature Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.baseFeature
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = customFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2021


CustomFeature.bodies Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.bodies
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = customFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2021


CustomFeature.classType Method

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeature.classType()
This is a static method.

#include <Fusion/Features/CustomFeature.h>

returnValue = adsk::fusion::CustomFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeature.createForAssemblyContext Method

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.
returnValue = customFeature_var.createForAssemblyContext(occurrence)
"customFeature_var" is a variable referencing a CustomFeature object.

#include <Fusion/Features/CustomFeature.h>

returnValue = customFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CustomFeature | 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 January 2021


CustomFeature.customNamedValues Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the set of custom named values associated with this custom feature. These are a set of named values that are saved with this feature that you can use to save any additional information that is useful for you in managing the custom feature. For example, you might have a setting like an option for different shapes that the user chooses when creating the feature that are not represented as a parameter. You can use this to save the chosen value so when the feature is computed or edited you can use the value originally chosen. During an edit, you might allow the user to edit this setting and you can update the saved custom value.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.customNamedValues
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<CustomNamedValues> propertyValue = customFeature_var->customNamedValues();

Property Value

This is a read only property whose value is a CustomNamedValues.

Version

Introduced in version July 2021


CustomFeature.definition Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Gets the CustomFeatureDefinition object associated with this custom feature. null/None is returned in the case where the definition does not exist, which is typically a result of the owning add-in not being loaded.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.definition
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<CustomFeatureDefinition> propertyValue = customFeature_var->definition();

Property Value

This is a read only property whose value is a CustomFeatureDefinition.

Version

Introduced in version January 2021


CustomFeature.deleteMe Method

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.
returnValue = customFeature_var.deleteMe()
"customFeature_var" is a variable referencing a CustomFeature object.

#include <Fusion/Features/CustomFeature.h>

returnValue = customFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2021


CustomFeature.dependencies Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the collection of dependencies for this custom feature. You can use the collection to query, add, and remove dependencies.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.dependencies
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<CustomFeatureDependencies> propertyValue = customFeature_var->dependencies();

Property Value

This is a read only property whose value is a CustomFeatureDependencies.

Version

Introduced in version January 2021


CustomFeature.dissolve Method

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.
returnValue = customFeature_var.dissolve()
"customFeature_var" is a variable referencing a CustomFeature object.

#include <Fusion/Features/CustomFeature.h>

returnValue = customFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2021


CustomFeature.entityToken Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.entityToken
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
string propertyValue = customFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeature.errorOrWarningMessage Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.errorOrWarningMessage
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
string propertyValue = customFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeature.faces Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.faces
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = customFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2021


CustomFeature.features Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the features combined by this custom feature. The start and end features and all of the features between them in the timeline are returned.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.features
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = customFeature_var->features();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version January 2021


CustomFeature.healthState Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.healthState
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = customFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2021


CustomFeature.isParametric Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.isParametric
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
boolean propertyValue = customFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeature.isSuppressed Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.isSuppressed

# Set the value of the property.
customFeature_var.isSuppressed = propertyValue
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
boolean propertyValue = customFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeature.isValid Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.isValid
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
boolean propertyValue = customFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeature.linkedFeatures Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.linkedFeatures
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = customFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2021


CustomFeature.name Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.name

# Set the value of the property.
customFeature_var.name = propertyValue
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
string propertyValue = customFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeature.nativeObject Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

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.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.nativeObject
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<CustomFeature> propertyValue = customFeature_var->nativeObject();

Property Value

This is a read only property whose value is a CustomFeature.

Version

Introduced in version January 2021


CustomFeature.objectType Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.objectType
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
string propertyValue = customFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeature.parameters Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the list of parameters associated with this custom feature.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.parameters
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<CustomFeatureParameters> propertyValue = customFeature_var->parameters();

Property Value

This is a read only property whose value is a CustomFeatureParameters.

Version

Introduced in version January 2021


CustomFeature.parentComponent Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.parentComponent
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = customFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2021


CustomFeature.setStartAndEndFeatures Method

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Sets the start and end features that will be grouped by the custom feature. The "features" in this case can be any object that is visible in the timeline, such as modeling features, sketches, and construction geometry. The input features and all features between them in the timeline will be grouped by the custom feature.

The current start and end features can be determined by using the CustomFeature.features property and getting the first and last feature from the returned array.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.
returnValue = customFeature_var.setStartAndEndFeatures(startFeature, endFeature)
"customFeature_var" is a variable referencing a CustomFeature object.

#include <Fusion/Features/CustomFeature.h>

returnValue = customFeature_var->setStartAndEndFeatures(startFeature, endFeature);

Return Value

Type | Description
boolean | Returns true if setting the start and end features was successful.

Parameters

Name | Type | Description
startFeature | Base | The first feature in the timeline to be grouped by the custom feature. The start and the end features can be null which will result in moving all of the features out of the custom feature. This is useful in cases where you need to modify the inputs to a feature contained within a custom feature. You can move the features out of the custom feature, move the timeline marker as needed to edit the features, and then use this method again to add them back into the custom feature.
endFeature | Base | The last feature in the timeline that will be grouped by the custom feature. This can be the same feature that is provided as the startFeature argument for the case where the custom feature contains a single feature.

Version

Introduced in version July 2021


CustomFeature.timelineObject Property

Parent Object: CustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"customFeature_var" is a variable referencing a CustomFeature object.

# Get the value of the property.
propertyValue = customFeature_var.timelineObject
"customFeature_var" is a variable referencing a CustomFeature object.
#include <Fusion/Features/CustomFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = customFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2021


CustomFeatureDefinition Object

CustomFeatureDefinition Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The CustomFeatureDefinition object defines a specific type of custom feature. It contains the settings that apply to all custom features of that type and is used when creating new custom features of that type. It also supports the events used to handle changes to custom features of that type.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A static function that creates a new CustomFeatureDefinition object. The creation of a CustomFeatureDefinition object is required to be able to create new custom features and for existing custom features to behave correctly. The CustomFeatureDefinition object defines all of the information that is common for all custom features of a particular type. For example, it defines the icon and the default name. The CustomFeatureDefinition object also supports the events that used to react to an existing feature being edited or re-computed. The custom feature definition should be created when your add-in is initially loaded to notify Fusion that the add-in that supports that custom feature type is available.

Properties

Name | Description
defaultName Gets and sets the default name of the feature. Fusion will use this name and append a number to each feature instance as it's created. For example, if this is "Dovetail" the first custom feature created will be named "Dovetail1" and the second will be "Dovetail2".

If you want to localize this name you can use the Application.Preferences.generalPreferences.userLanguage property to determine what language the user has chosen and use the corresponding name for that language.
editCommandId | Gets and sets which command will be invoked when the feature is edited. This is the id of the CommandDefinition object that you have created to do the edit of the feature.
iconFolder | Gets and sets the folder that contains the images that are used for the icon in the timeline for this custom feature. The folder should contain the image files named 16x16.png and 32x32.png which should be images that are 16 and 32 pixels square.
id | Gets the unique ID used for this type of custom 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Events

Name | Description
customFeatureCompute | The customFeatureCompute event fires when Fusion is computing the timeline and reaches the custom feature. The event is fired if any of the dependencies of the custom feature have changed. You can modify the results of your custom feature based on the dependencies.

Accessed From

CustomFeature.definition, CustomFeatureDefinition.create

Version

Introduced in version January 2021


CustomFeatureDefinition.classType Method

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureDefinition.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureDefinition.h>

returnValue = adsk::fusion::CustomFeatureDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureDefinition.create Method

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

A static function that creates a new CustomFeatureDefinition object. The creation of a CustomFeatureDefinition object is required to be able to create new custom features and for existing custom features to behave correctly. The CustomFeatureDefinition object defines all of the information that is common for all custom features of a particular type. For example, it defines the icon and the default name. The CustomFeatureDefinition object also supports the events that used to react to an existing feature being edited or re-computed.

The custom feature definition should be created when your add-in is initially loaded to notify Fusion that the add-in that supports that custom feature type is available.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureDefinition.create(id, defaultName, iconFolder)
This is a static method.

#include <Fusion/Features/CustomFeatureDefinition.h>

returnValue = adsk::fusion::CustomFeatureDefinition::create(id, defaultName, iconFolder);

Return Value

Type | Description
CustomFeatureDefinition | Returns the newly created CustomFeatureDefinition or null in the case of failure.

Parameters

Name | Type | Description
id | string | The unique ID for custom features of a particular type. Care must be taken to ensure that this is unique and you must be consistent in its use once you've chosen an ID. A good practice to help ensure unique naming is to use the name of your company in combination with the name of the feature, such as "CompanyName.FeatureName". For example, "WoodTools4U.Dovetail".
defaultName | string | The default name of the feature. Fusion will use this name and append a number to each feature instance as it's created. For example, if this is "Dovetail" the first custom feature created will be named "Dovetail1" and the second will be "Dovetail2". If you want to localize this name you can use the Application.Preferences.generalPreferences.userLanguage property to determine what language the user has chosen and use the corresponding name for that language.
iconFolder | string | The folder that contains the image files that will be used for the icon for this feature in the timeline. This can be a full path or a relative path where it will be relative to the add-in file. The folder should contain the image files named 16x16.png and 32x32.png which should be images that are 16 and 32 pixels square.

Version

Introduced in version January 2021


CustomFeatureDefinition.customFeatureCompute Event

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

The customFeatureCompute event fires when Fusion is computing the timeline and reaches the custom feature. The event is fired if any of the dependencies of the custom feature have changed. You can modify the results of your custom feature based on the dependencies.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
# "customFeatureDefinition_customFeatureCompute" is the event handler function.
futil.add_handler(customFeatureDefinition_var.customFeatureCompute, customFeatureDefinition_customFeatureCompute, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the customFeatureCompute event.
def customFeatureDefinition_customFeatureCompute(args: adsk.fusion.CustomFeatureEventArgs):
    # Code to react to the event.
    app.log('In customFeatureDefinition_customFeatureCompute event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
# "MyCustomFeatureComputeHandler" is the name of the class that handles the event.
onCustomFeatureCompute = MyCustomFeatureComputeHandler()
customFeatureDefinition_var.customFeatureCompute.add(onCustomFeatureCompute)
handlers.append(onCustomFeatureCompute)

-------- Event handler class definition ---------
# Event handler for the customFeatureCompute event.
class MyCustomFeatureComputeHandler(adsk.fusion.CustomFeatureEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.fusion.CustomFeatureEventArgs):
        # Code to react to the event.
        app.log('In MyCustomFeatureComputeHandler event handler.')
--------- Required include files. ---------
#include <Fusion/Features/CustomFeatureDefinition.h>
#include <Fusion/Features/CustomFeatureEvent.h>
#include <Fusion/Features/CustomFeatureEventHandler.h>
#include <Fusion/Features/CustomFeatureEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the customFeatureCompute event.
class MyCustomFeatureComputeEventHandler : public adsk::fusion::CustomFeatureEventHandler
{
public:
    void notify(const Ptr<CustomFeatureEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyCustomFeatureComputeEventHandler event handler.");
    }
} _customFeatureCompute;

--------- Connect the handler to the event. ---------
// "customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
// Connect the handler function to the event.
Ptr<CustomFeatureEvent> customFeatureComputeEvent = customFeatureDefinition_var->customFeatureCompute();
if (!customFeatureComputeEvent)
    return;

bool isOk = customFeatureComputeEvent->add(&_customFeatureCompute);
if (!isOk)
    return;

Property Value

This is an event property that returns a CustomFeatureEvent.

Version

Introduced in version January 2021


CustomFeatureDefinition.defaultName Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Gets and sets the default name of the feature. Fusion will use this name and append a number to each feature instance as it's created. For example, if this is "Dovetail" the first custom feature created will be named "Dovetail1" and the second will be "Dovetail2".

If you want to localize this name you can use the Application.Preferences.generalPreferences.userLanguage property to determine what language the user has chosen and use the corresponding name for that language.

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.defaultName

# Set the value of the property.
customFeatureDefinition_var.defaultName = propertyValue
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
string propertyValue = customFeatureDefinition_var->defaultName();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureDefinition_var->defaultName(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDefinition.editCommandId Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Gets and sets which command will be invoked when the feature is edited. This is the id of the CommandDefinition object that you have created to do the edit of the feature.

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.editCommandId

# Set the value of the property.
customFeatureDefinition_var.editCommandId = propertyValue
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
string propertyValue = customFeatureDefinition_var->editCommandId();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureDefinition_var->editCommandId(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDefinition.iconFolder Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Gets and sets the folder that contains the images that are used for the icon in the timeline for this custom feature. The folder should contain the image files named 16x16.png and 32x32.png which should be images that are 16 and 32 pixels square.

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.iconFolder

# Set the value of the property.
customFeatureDefinition_var.iconFolder = propertyValue
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
string propertyValue = customFeatureDefinition_var->iconFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureDefinition_var->iconFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDefinition.id Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Gets the unique ID used for this type of custom feature.

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.id
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
string propertyValue = customFeatureDefinition_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDefinition.isValid Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.isValid
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
boolean propertyValue = customFeatureDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureDefinition.objectType Property

Parent Object: CustomFeatureDefinition

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.

# Get the value of the property.
propertyValue = customFeatureDefinition_var.objectType
"customFeatureDefinition_var" is a variable referencing a CustomFeatureDefinition object.
#include <Fusion/Features/CustomFeatureDefinition.h>

// Get the value of the property.
string propertyValue = customFeatureDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDependencies Object

CustomFeatureDependencies Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A collection of dependencies associated with a particular custom feature. These are the entities that the custom feature is dependent on. If these entities are modified, it will cause the custom feature to recompute so it can be up to date. These dependencies are saved with the custom feature and can be accessed at a later time, typically during the compute, to access and use the entities.

Methods

Name | Description
add | Adds an entity or parameter that this feature is dependent on. This is used by Fusion to know when to recompute this feature and to control the behavior of the feature's node in the timeline.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteAll | Deletes all of the current dependencies. This method is for convenience and is equivalent to iterating through the collection and deleting them one at a time.
item | Function that returns the specified custom dependency using an index into the collection.
itemById | Function that returns the specified custom dependency given its ID.

Properties

Name | Description
count | The number of CustomFeatureParameter 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomFeature.dependencies

Version

Introduced in version January 2021


CustomFeatureDependencies.add Method

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Adds an entity or parameter that this feature is dependent on. This is used by Fusion to know when to recompute this feature and to control the behavior of the feature's node in the timeline.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
returnValue = customFeatureDependencies_var.add(id, entity)
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

#include <Fusion/Features/CustomFeatureDependencies.h>

returnValue = customFeatureDependencies_var->add(id, entity);

Return Value

Type | Description
CustomFeatureDependency | Returns the created CustomFeatureDependency object and asserts if it failed.

Parameters

Name | Type | Description
id | string | An ID for this dependency. This is used to allow you to identify which dependency is which in the future. The ID must be unique with respect to the other dependencies of this custom feature.
entity | Base | The entity or parameter you want to add as a dependency. This can be a BRepBody, BRepFace, BrepEdge, BRepVertex, a sketch, any sketch entities, a profile, any construction geometry, or any parameter.

Version

Introduced in version January 2021


CustomFeatureDependencies.classType Method

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureDependencies.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureDependencies.h>

returnValue = adsk::fusion::CustomFeatureDependencies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureDependencies.count Property

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

The number of CustomFeatureParameter objects in the collection.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

# Get the value of the property.
propertyValue = customFeatureDependencies_var.count
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
#include <Fusion/Features/CustomFeatureDependencies.h>

// Get the value of the property.
uinteger propertyValue = customFeatureDependencies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2021


CustomFeatureDependencies.deleteAll Method

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Deletes all of the current dependencies. This method is for convenience and is equivalent to iterating through the collection and deleting them one at a time.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
returnValue = customFeatureDependencies_var.deleteAll()
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

#include <Fusion/Features/CustomFeatureDependencies.h>

returnValue = customFeatureDependencies_var->deleteAll();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2021


CustomFeatureDependencies.isValid Property

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

# Get the value of the property.
propertyValue = customFeatureDependencies_var.isValid
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
#include <Fusion/Features/CustomFeatureDependencies.h>

// Get the value of the property.
boolean propertyValue = customFeatureDependencies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureDependencies.item Method

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Function that returns the specified custom dependency using an index into the collection.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
returnValue = customFeatureDependencies_var.item(index)
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

#include <Fusion/Features/CustomFeatureDependencies.h>

returnValue = customFeatureDependencies_var->item(index);

Return Value

Type | Description
CustomFeatureDependency | 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 2021


CustomFeatureDependencies.itemById Method

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

Function that returns the specified custom dependency given its ID.

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
returnValue = customFeatureDependencies_var.itemById(id)
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

#include <Fusion/Features/CustomFeatureDependencies.h>

returnValue = customFeatureDependencies_var->itemById(id);

Return Value

Type | Description
CustomFeatureDependency | Returns the specified item or null if the specified ID was not found.

Parameters

Name | Type | Description
id | string | The ID of the dependency, which was assigned when the dependency was defined.

Version

Introduced in version January 2021


CustomFeatureDependencies.objectType Property

Parent Object: CustomFeatureDependencies

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependencies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.

# Get the value of the property.
propertyValue = customFeatureDependencies_var.objectType
"customFeatureDependencies_var" is a variable referencing a CustomFeatureDependencies object.
#include <Fusion/Features/CustomFeatureDependencies.h>

// Get the value of the property.
string propertyValue = customFeatureDependencies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDependency Object

CustomFeatureDependency Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A custom feature dependency defines a dependency the custom feature has on an entity outside the custom feature. For example, a feature might be dependent on a face or a point and if those entities are modified the custom feature needs to recompute to be up to date.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 dependency from the custom feature.

Properties

Name | Description
entity | Gets and sets the entity associated with this dependency.
id | Returns the ID of this custom feature dependency.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCustomFeature | Returns the custom feature this dependency is associated with.

Accessed From

CustomFeatureDependencies.add, CustomFeatureDependencies.item, CustomFeatureDependencies.itemById

Version

Introduced in version January 2021


CustomFeatureDependency.classType Method

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureDependency.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureDependency.h>

returnValue = adsk::fusion::CustomFeatureDependency::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureDependency.deleteMe Method

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Deletes this dependency from the custom feature.

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
returnValue = customFeatureDependency_var.deleteMe()
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

#include <Fusion/Features/CustomFeatureDependency.h>

returnValue = customFeatureDependency_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2021


CustomFeatureDependency.entity Property

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Gets and sets the entity associated with this dependency.

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

# Get the value of the property.
propertyValue = customFeatureDependency_var.entity

# Set the value of the property.
customFeatureDependency_var.entity = propertyValue
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
#include <Fusion/Features/CustomFeatureDependency.h>

// Get the value of the property.
Ptr<Base> propertyValue = customFeatureDependency_var->entity();

// Set the value of the property, where value_var is a Base.
bool returnValue = customFeatureDependency_var->entity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2021


CustomFeatureDependency.id Property

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Returns the ID of this custom feature dependency.

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

# Get the value of the property.
propertyValue = customFeatureDependency_var.id
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
#include <Fusion/Features/CustomFeatureDependency.h>

// Get the value of the property.
string propertyValue = customFeatureDependency_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDependency.isValid Property

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

# Get the value of the property.
propertyValue = customFeatureDependency_var.isValid
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
#include <Fusion/Features/CustomFeatureDependency.h>

// Get the value of the property.
boolean propertyValue = customFeatureDependency_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureDependency.objectType Property

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

# Get the value of the property.
propertyValue = customFeatureDependency_var.objectType
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
#include <Fusion/Features/CustomFeatureDependency.h>

// Get the value of the property.
string propertyValue = customFeatureDependency_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureDependency.parentCustomFeature Property

Parent Object: CustomFeatureDependency

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureDependency.h>

Description

Returns the custom feature this dependency is associated with.

Syntax

  • Python
  • C++
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.

# Get the value of the property.
propertyValue = customFeatureDependency_var.parentCustomFeature
"customFeatureDependency_var" is a variable referencing a CustomFeatureDependency object.
#include <Fusion/Features/CustomFeatureDependency.h>

// Get the value of the property.
Ptr<CustomFeature> propertyValue = customFeatureDependency_var->parentCustomFeature();

Property Value

This is a read only property whose value is a CustomFeature.

Version

Introduced in version January 2021


CustomFeatureEvent Object

CustomFeatureEvent Object Preview

Derived from: Event Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A CustomFeature event is an event associated with handling changes to a custom feature.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CustomFeatureDefinition.customFeatureCompute

Version

Introduced in version January 2021


CustomFeatureEvent.add Method

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

Add a handler to be notified when the file event occurs.

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
returnValue = customFeatureEvent_var.add(handler)
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

#include <Fusion/Features/CustomFeatureEvent.h>

returnValue = customFeatureEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | CustomFeatureEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version January 2021


CustomFeatureEvent.classType Method

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureEvent.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureEvent.h>

returnValue = adsk::fusion::CustomFeatureEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureEvent.isValid Property

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

# Get the value of the property.
propertyValue = customFeatureEvent_var.isValid
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
#include <Fusion/Features/CustomFeatureEvent.h>

// Get the value of the property.
boolean propertyValue = customFeatureEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureEvent.name Property

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

# Get the value of the property.
propertyValue = customFeatureEvent_var.name
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
#include <Fusion/Features/CustomFeatureEvent.h>

// Get the value of the property.
string propertyValue = customFeatureEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureEvent.objectType Property

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

# Get the value of the property.
propertyValue = customFeatureEvent_var.objectType
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
#include <Fusion/Features/CustomFeatureEvent.h>

// Get the value of the property.
string propertyValue = customFeatureEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureEvent.remove Method

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
returnValue = customFeatureEvent_var.remove(handler)
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

#include <Fusion/Features/CustomFeatureEvent.h>

returnValue = customFeatureEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | CustomFeatureEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2021


CustomFeatureEvent.sender Property

Parent Object: CustomFeatureEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.

# Get the value of the property.
propertyValue = customFeatureEvent_var.sender
"customFeatureEvent_var" is a variable referencing a CustomFeatureEvent object.
#include <Fusion/Features/CustomFeatureEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = customFeatureEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2021


CustomFeatureEventArgs Object

CustomFeatureEventArgs Object Preview

Derived from: EventArgs Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The CustomFeatureEventArgs provides information associated with a custom feature event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
computeStatus | Provides access to the Status object associated with this compute. If the compute is successful you shouldn't do anything with this property. If the compute is not fully successful, you can use this returned Status object to define any errors or warnings that occurred during the compute. These warnings and errors will be shown to the user in the Alerts dialog.
customFeature | Provides access to the custom feature that is being recomputed.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version January 2021


CustomFeatureEventArgs.classType Method

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureEventArgs.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureEventArgs.h>

returnValue = adsk::fusion::CustomFeatureEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureEventArgs.computeStatus Property

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

Provides access to the Status object associated with this compute. If the compute is successful you shouldn't do anything with this property. If the compute is not fully successful, you can use this returned Status object to define any errors or warnings that occurred during the compute. These warnings and errors will be shown to the user in the Alerts dialog.

Syntax

  • Python
  • C++
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.

# Get the value of the property.
propertyValue = customFeatureEventArgs_var.computeStatus
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.
#include <Fusion/Features/CustomFeatureEventArgs.h>

// Get the value of the property.
Ptr<Status> propertyValue = customFeatureEventArgs_var->computeStatus();

Property Value

This is a read only property whose value is a Status.

Version

Introduced in version July 2021


CustomFeatureEventArgs.customFeature Property

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

Provides access to the custom feature that is being recomputed.

Syntax

  • Python
  • C++
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.

# Get the value of the property.
propertyValue = customFeatureEventArgs_var.customFeature
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.
#include <Fusion/Features/CustomFeatureEventArgs.h>

// Get the value of the property.
Ptr<CustomFeature> propertyValue = customFeatureEventArgs_var->customFeature();

Property Value

This is a read only property whose value is a CustomFeature.

Version

Introduced in version January 2021


CustomFeatureEventArgs.firingEvent Property

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.

# Get the value of the property.
propertyValue = customFeatureEventArgs_var.firingEvent
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.
#include <Fusion/Features/CustomFeatureEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = customFeatureEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2021


CustomFeatureEventArgs.isValid Property

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.

# Get the value of the property.
propertyValue = customFeatureEventArgs_var.isValid
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.
#include <Fusion/Features/CustomFeatureEventArgs.h>

// Get the value of the property.
boolean propertyValue = customFeatureEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureEventArgs.objectType Property

Parent Object: CustomFeatureEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.

# Get the value of the property.
propertyValue = customFeatureEventArgs_var.objectType
"customFeatureEventArgs_var" is a variable referencing a CustomFeatureEventArgs object.
#include <Fusion/Features/CustomFeatureEventArgs.h>

// Get the value of the property.
string propertyValue = customFeatureEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureEventHandler Object

CustomFeatureEventHandler Object Preview

Derived from: EventHandler Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventHandler.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The CustomFeatureEventHandler is a client implemented class that can be added as a handler to a CustomFeatureEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version January 2021


CustomFeatureEventHandler.notify Method

Parent Object: CustomFeatureEventHandler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"customFeatureEventHandler_var" is a variable referencing a CustomFeatureEventHandler object.
returnValue = customFeatureEventHandler_var.notify(eventArgs)
"customFeatureEventHandler_var" is a variable referencing a CustomFeatureEventHandler object.

#include <Fusion/Features/CustomFeatureEventHandler.h>

returnValue = customFeatureEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | CustomFeatureEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2021


CustomFeatureInput Object

CustomFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a Ruled Surface feature.

Methods

Name | Description
addCustomParameter | Defines the information needed to create a new custom parameter that will be associated with this feature. A custom parameter appears as a model parameter and will be listed as a child of the custom feature in the parameter dialog. The custom feature will automatically have a dependency on this parameter.
addDependency | Adds an entity or parameter this feature is dependent on. This is used by Fusion to know when to recompute this feature and to control the behavior of the feature's node in the timeline.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setStartAndEndFeatures | Sets the start and end features that the custom feature will group. A "feature" in this case is an object that is visible in the timeline, such as modeling features, sketches, and construction geometry. The custom feature will group the input start and end features and all features between them in the timeline. You can determine the current start and end features using the features property and use the first and last features returned. If the custom feature contains a single feature, you can use the same feature for both the start and end feature arguments. You can also use null for both arguments to remove all features from a custom feature. The custom feature still exists but will be empty, and the features will be displayed individually within the timeline.

Properties

Name | Description
features | Returns the features that are grouped by this custom feature. The start and end features and all of the features between them in the timeline are returned. This includes all entities represented in the timeline including modeling features, construction geometry, sketches, etc.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomFeatures.createInput

Version

Introduced in version January 2021


CustomFeatureInput.addCustomParameter Method

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Defines the information needed to create a new custom parameter that will be associated with this feature. A custom parameter appears as a model parameter and will be listed as a child of the custom feature in the parameter dialog. The custom feature will automatically have a dependency on this parameter.

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
# Uses no optional arguments.
returnValue = customFeatureInput_var.addCustomParameter(id, label, value, units)

# Uses optional arguments.
returnValue = customFeatureInput_var.addCustomParameter(id, label, value, units, isVisible)
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

#include <Fusion/Features/CustomFeatureInput.h>

// Uses no optional arguments.
returnValue = customFeatureInput_var->addCustomParameter(id, label, value, units);

// Uses optional arguments.
returnValue = customFeatureInput_var->addCustomParameter(id, label, value, units, isVisible);

Return Value

Type | Description
boolean | Returns true if the definition of the model parameter was successfully added.

Parameters

Name | Type | Description
id | string | An id for this parameter. This is used to allow you to identify the parameter in the future. This must be unique with respect to all other parameters associated with this custom feature. It's needed because the label does not need to be unique and the Fusion auto-generated name can be edited by the user.
label | string | The label for this parameter as seen in the parameters dialog. This identifies to the user the purpose of this parameter. For example, when you create an extrusion with a specific distance, there are two parameters displayed in the parameters dialog with the labels "AlongDistance" and "TaperAngle". This does not have to be unique because in the case of a fillet feature there can be multiple parameters all labeled "Radius".
value ValueInput ValueInput object that specifies the value of the parameter. 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 the "units" argument is any valid length unit, the value will be interpreted as 5 centimeters since centimeters is the internal unit for lengths. If the "units" argument is a valid angle unit 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 if there are units as part of the string it must evaluate to the same unit type as that specified by the "units" argument and if no units are 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 it is compatible. If the ValueInput was created with the string "5", any unit type can be used and the result will be 5 of that unit.

When using a ValueInput created using a string, it's the same as creating a parameter 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.
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 (unitless) you can specify either an empty string.
isVisible boolean Optional argument that specifies if the parameter will be visible in the parameters dialog or not. By default the parameter will be visible.

This can be useful in cases where the feature can be edited to be in different states where a parameter is only valid in a certain state. You can change the visibility based on the current state of the feature and if that parameter should be available for edit. This implies that you create all the parameters that might be needed and then change their visibility based on the current state of the feature. The parameters that are not visible will not be returned by the ModelParameters collection and are only available through the custom feature they're associated with.

This is an optional argument whose default value is True.

Version

Introduced in version January 2021


CustomFeatureInput.addDependency Method

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Adds an entity or parameter this feature is dependent on. This is used by Fusion to know when to recompute this feature and to control the behavior of the feature's node in the timeline.

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
returnValue = customFeatureInput_var.addDependency(id, entity)
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

#include <Fusion/Features/CustomFeatureInput.h>

returnValue = customFeatureInput_var->addDependency(id, entity);

Return Value

Type | Description
boolean | Returns true if the dependency was successfully added.

Parameters

Name | Type | Description
id | string | An ID for this dependency. This is used to allow you to identify which dependency is which in the future. The ID must be unique with respect to the other dependencies of this custom feature.
entity | Base | The entity or parameter you want to add as a dependency. This can be a BRepBody, BRepFace, BrepEdge, BRepVertex, a sketch, any sketch entities, a profile, any construction geometry, or any parameter.

Version

Introduced in version January 2021


CustomFeatureInput.classType Method

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureInput.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureInput.h>

returnValue = adsk::fusion::CustomFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureInput.features Property

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Returns the features that are grouped by this custom feature. The start and end features and all of the features between them in the timeline are returned. This includes all entities represented in the timeline including modeling features, construction geometry, sketches, etc.

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

# Get the value of the property.
propertyValue = customFeatureInput_var.features
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
#include <Fusion/Features/CustomFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = customFeatureInput_var->features();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version January 2021


CustomFeatureInput.isValid Property

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

# Get the value of the property.
propertyValue = customFeatureInput_var.isValid
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
#include <Fusion/Features/CustomFeatureInput.h>

// Get the value of the property.
boolean propertyValue = customFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureInput.objectType Property

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

# Get the value of the property.
propertyValue = customFeatureInput_var.objectType
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
#include <Fusion/Features/CustomFeatureInput.h>

// Get the value of the property.
string propertyValue = customFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureInput.setStartAndEndFeatures Method

Parent Object: CustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureInput.h>

Description

Sets the start and end features that the custom feature will group. A "feature" in this case is an object that is visible in the timeline, such as modeling features, sketches, and construction geometry. The custom feature will group the input start and end features and all features between them in the timeline.

You can determine the current start and end features using the features property and use the first and last features returned. If the custom feature contains a single feature, you can use the same feature for both the start and end feature arguments. You can also use null for both arguments to remove all features from a custom feature. The custom feature still exists but will be empty, and the features will be displayed individually within the timeline.

Syntax

  • Python
  • C++
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.
returnValue = customFeatureInput_var.setStartAndEndFeatures(startFeature, endFeature)
"customFeatureInput_var" is a variable referencing a CustomFeatureInput object.

#include <Fusion/Features/CustomFeatureInput.h>

returnValue = customFeatureInput_var->setStartAndEndFeatures(startFeature, endFeature);

Return Value

Type | Description
boolean | Returns true if setting the start and end features was successful.

Parameters

Name | Type | Description
startFeature | Base | The first feature in the timeline that the custom feature will group.
endFeature | Base | The last feature in the timeline that the custom feature will group. When creating a custom feature that contains a single feature, this can be the same feature as the startFeature argument.

Version

Introduced in version August 2021


CustomFeatureParameter Object

CustomFeatureParameter Object Preview

Derived from: ModelParameter Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A custom parameter is a parameter that was created as the result of a custom feature being created. It is associated with the custom feature and it's lifetime is the same as the custom feature that owns it.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 ModelParameter. As a general rule, model parameters cannot be deleted because features depend on them. However, there are uncommon workflows where a parameter no longer has any dependents and is not automatically deleted. You can use the isDeletable property to see if the parameter is in this state and can successfully be deleted.

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.
dependencyParameters | Returns a list of parameters that this parameter is dependent on.
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
entityToken Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
expression Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".
id | Returns the ID of this custom feature parameter.
isDeletable | Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.
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.
isVisible Gets and sets if this parameter is visible in the parameters dialog. By default, all new parameters are visible.

This can be useful in cases where the feature can be edited to be in different states where a parameter is only valid in a certain state. You can change the visibility based on the current state of the feature and if that parameter should be available for edit. This implies that you create all the parameters that might be needed and then change their visibility based on the current state of the feature. The parameters that are not visible will not be returned by the ModelParameters collection and are only available through the custom feature they're associated with.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCustomFeature | Returns the custom feature this parameter is associated with.
role | This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a work plane 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 of the parameter

Accessed From

CustomFeatureParameters.item, CustomFeatureParameters.itemById

Version

Introduced in version January 2021


CustomFeatureParameter.attributes Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.attributes
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = customFeatureParameter_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2021


CustomFeatureParameter.classType Method

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureParameter.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureParameter.h>

returnValue = adsk::fusion::CustomFeatureParameter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureParameter.comment Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

The comment associated with this parameter

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.comment

# Set the value of the property.
customFeatureParameter_var.comment = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->comment();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureParameter_var->comment(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.component Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the Component containing the ModelParameter.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.component
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<Component> propertyValue = customFeatureParameter_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2021


CustomFeatureParameter.createdBy Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the object that created this parameter. For example, a feature, a sketch dimension, or a construction plane.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.createdBy
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<Base> propertyValue = customFeatureParameter_var->createdBy();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2021


CustomFeatureParameter.deleteMe Method

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Deletes this ModelParameter. As a general rule, model parameters cannot be deleted because features depend on them. However, there are uncommon workflows where a parameter no longer has any dependents and is not automatically deleted. You can use the isDeletable property to see if the parameter is in this state and can successfully be deleted.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
returnValue = customFeatureParameter_var.deleteMe()
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

#include <Fusion/Features/CustomFeatureParameter.h>

returnValue = customFeatureParameter_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2025


CustomFeatureParameter.dependencyParameters Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns a list of parameters that this parameter is dependent on.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.dependencyParameters
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = customFeatureParameter_var->dependencyParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version May 2022


CustomFeatureParameter.dependentParameters Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.dependentParameters
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = customFeatureParameter_var->dependentParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version January 2021


CustomFeatureParameter.entityToken Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.entityToken
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.expression Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.expression

# Set the value of the property.
customFeatureParameter_var.expression = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureParameter_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.id Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the ID of this custom feature parameter.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.id
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.isDeletable Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.isDeletable
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
boolean propertyValue = customFeatureParameter_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureParameter.isFavorite Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.isFavorite

# Set the value of the property.
customFeatureParameter_var.isFavorite = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
boolean propertyValue = customFeatureParameter_var->isFavorite();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customFeatureParameter_var->isFavorite(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureParameter.isValid Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.isValid
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
boolean propertyValue = customFeatureParameter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureParameter.isVisible Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Gets and sets if this parameter is visible in the parameters dialog. By default, all new parameters are visible.

This can be useful in cases where the feature can be edited to be in different states where a parameter is only valid in a certain state. You can change the visibility based on the current state of the feature and if that parameter should be available for edit. This implies that you create all the parameters that might be needed and then change their visibility based on the current state of the feature. The parameters that are not visible will not be returned by the ModelParameters collection and are only available through the custom feature they're associated with.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.isVisible

# Set the value of the property.
customFeatureParameter_var.isVisible = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
boolean propertyValue = customFeatureParameter_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customFeatureParameter_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureParameter.modelParameters Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the Collection containing the ModelParameter.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.modelParameters
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<ModelParameters> propertyValue = customFeatureParameter_var->modelParameters();

Property Value

This is a read only property whose value is a ModelParameters.

Version

Introduced in version January 2021


CustomFeatureParameter.name Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

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.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.name

# Set the value of the property.
customFeatureParameter_var.name = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customFeatureParameter_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.objectType Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.objectType
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.parentCustomFeature Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Returns the custom feature this parameter is associated with.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.parentCustomFeature
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
Ptr<CustomFeature> propertyValue = customFeatureParameter_var->parentCustomFeature();

Property Value

This is a read only property whose value is a CustomFeature.

Version

Introduced in version January 2021


CustomFeatureParameter.role Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a work plane it could be "Offset".

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.role
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->role();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.unit Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.unit
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
string propertyValue = customFeatureParameter_var->unit();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatureParameter.value Property

Parent Object: CustomFeatureParameter

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameter.h>

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value of the parameter

Syntax

  • Python
  • C++
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.

# Get the value of the property.
propertyValue = customFeatureParameter_var.value

# Set the value of the property.
customFeatureParameter_var.value = propertyValue
"customFeatureParameter_var" is a variable referencing a CustomFeatureParameter object.
#include <Fusion/Features/CustomFeatureParameter.h>

// Get the value of the property.
double propertyValue = customFeatureParameter_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = customFeatureParameter_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2021


CustomFeatureParameters Object

CustomFeatureParameters Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A collection of custom parameters associated with a particular custom feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 custom parameter feature using an index into the collection.
itemById | Function that returns the specified CustomParameter object given its ID.

Properties

Name | Description
count | The number of CustomFeatureParameter 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomFeature.parameters

Version

Introduced in version January 2021


CustomFeatureParameters.classType Method

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatureParameters.classType()
This is a static method.

#include <Fusion/Features/CustomFeatureParameters.h>

returnValue = adsk::fusion::CustomFeatureParameters::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatureParameters.count Property

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

The number of CustomFeatureParameter objects in the collection.

Syntax

  • Python
  • C++
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.

# Get the value of the property.
propertyValue = customFeatureParameters_var.count
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.
#include <Fusion/Features/CustomFeatureParameters.h>

// Get the value of the property.
uinteger propertyValue = customFeatureParameters_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2021


CustomFeatureParameters.isValid Property

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.

# Get the value of the property.
propertyValue = customFeatureParameters_var.isValid
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.
#include <Fusion/Features/CustomFeatureParameters.h>

// Get the value of the property.
boolean propertyValue = customFeatureParameters_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatureParameters.item Method

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

Function that returns the specified custom parameter feature using an index into the collection.

Syntax

  • Python
  • C++
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.
returnValue = customFeatureParameters_var.item(index)
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.

#include <Fusion/Features/CustomFeatureParameters.h>

returnValue = customFeatureParameters_var->item(index);

Return Value

Type | Description
CustomFeatureParameter | 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 2021


CustomFeatureParameters.itemById Method

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

Function that returns the specified CustomParameter object given its ID.

Syntax

  • Python
  • C++
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.
returnValue = customFeatureParameters_var.itemById(id)
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.

#include <Fusion/Features/CustomFeatureParameters.h>

returnValue = customFeatureParameters_var->itemById(id);

Return Value

Type | Description
CustomFeatureParameter | Returns the specified item or null if the specified ID was not found.

Parameters

Name | Type | Description
id | string | The ID of the custom parameter, which was assigned when the parameter was defined and the custom feature was created.

Version

Introduced in version January 2021


CustomFeatureParameters.objectType Property

Parent Object: CustomFeatureParameters

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatureParameters.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.

# Get the value of the property.
propertyValue = customFeatureParameters_var.objectType
"customFeatureParameters_var" is a variable referencing a CustomFeatureParameters object.
#include <Fusion/Features/CustomFeatureParameters.h>

// Get the value of the property.
string propertyValue = customFeatureParameters_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomFeatures Object

CustomFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing custom features in a component and supports the ability to create new custom features.

Methods

Name | Description
add | Creates a new custom 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 new input object that you use to define a custom feature. Creating an input object doesn't create the feature but provides a way to gather all of the input needed to create a custom feature. To create the custom feature, the fully defined input object is passed to the add method.
item | Function that returns the specified ruled surface feature using an index into the collection.
itemByName | Function that returns the specified CustomFeature feature using the name of the feature.

Properties

Name | Description
count | The number of CustomFeature 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.customFeatures

Version

Introduced in version January 2021


CustomFeatures.add Method

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Creates a new custom feature.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.
returnValue = customFeatures_var.add(input)
"customFeatures_var" is a variable referencing a CustomFeatures object.

#include <Fusion/Features/CustomFeatures.h>

returnValue = customFeatures_var->add(input);

Return Value

Type | Description
CustomFeature | Returns the newly created CustomFeature.

Parameters

Name | Type | Description
input | CustomFeatureInput | The CustomFeatureInput object that defines the information needed to create a custom feature.

Version

Introduced in version January 2021


CustomFeatures.classType Method

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomFeatures.classType()
This is a static method.

#include <Fusion/Features/CustomFeatures.h>

returnValue = adsk::fusion::CustomFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


CustomFeatures.count Property

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

The number of CustomFeature objects in the collection.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.

# Get the value of the property.
propertyValue = customFeatures_var.count
"customFeatures_var" is a variable referencing a CustomFeatures object.
#include <Fusion/Features/CustomFeatures.h>

// Get the value of the property.
uinteger propertyValue = customFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2021


CustomFeatures.createInput Method

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Creates a new input object that you use to define a custom feature. Creating an input object doesn't create the feature but provides a way to gather all of the input needed to create a custom feature. To create the custom feature, the fully defined input object is passed to the add method.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.
returnValue = customFeatures_var.createInput(definition)
"customFeatures_var" is a variable referencing a CustomFeatures object.

#include <Fusion/Features/CustomFeatures.h>

returnValue = customFeatures_var->createInput(definition);

Return Value

Type | Description
CustomFeatureInput | Returns the newly created CustomFeatureInput object or null in the case of invalid input.

Parameters

Name | Type | Description
definition | CustomFeatureDefinition | The CustomFeatureDefinition for the type of custom feature being created.

Version

Introduced in version January 2021


CustomFeatures.isValid Property

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.

# Get the value of the property.
propertyValue = customFeatures_var.isValid
"customFeatures_var" is a variable referencing a CustomFeatures object.
#include <Fusion/Features/CustomFeatures.h>

// Get the value of the property.
boolean propertyValue = customFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


CustomFeatures.item Method

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Function that returns the specified ruled surface feature using an index into the collection.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.
returnValue = customFeatures_var.item(index)
"customFeatures_var" is a variable referencing a CustomFeatures object.

#include <Fusion/Features/CustomFeatures.h>

returnValue = customFeatures_var->item(index);

Return Value

Type | Description
CustomFeature | 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 2021


CustomFeatures.itemByName Method

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

Function that returns the specified CustomFeature feature using the name of the feature.

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.
returnValue = customFeatures_var.itemByName(name)
"customFeatures_var" is a variable referencing a CustomFeatures object.

#include <Fusion/Features/CustomFeatures.h>

returnValue = customFeatures_var->itemByName(name);

Return Value

Type | Description
CustomFeature | 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 January 2021


CustomFeatures.objectType Property

Parent Object: CustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customFeatures_var" is a variable referencing a CustomFeatures object.

# Get the value of the property.
propertyValue = customFeatures_var.objectType
"customFeatures_var" is a variable referencing a CustomFeatures object.
#include <Fusion/Features/CustomFeatures.h>

// Get the value of the property.
string propertyValue = customFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


CustomGraphicsAppearanceColorEffect Object

Derived from: CustomGraphicsColorEffect Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 available 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsAppearanceColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.appearance Property

Parent Object: CustomGraphicsAppearanceColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

Description

Gets and sets the appearance to use. The appearance assigned must be available in the design where the graphics will be drawn.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

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 available in the design where the graphics will be drawn.

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 available in the design where the graphics will be drawn.

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.isValid Property

Parent Object: CustomGraphicsAppearanceColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 emissive color is 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 highlights like you would see with a rough surface. A maximum value 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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 emissive color is provided, the API will automatically create values for the other colors to render the object as a single color.

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 highlights like you would see with a rough surface. A maximum value 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

Description

Gets and sets the emissiveColor associated with this CustomGraphicsBasicMaterialColorEffect object. The emissive color is the primary color of the entity

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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 highlights like you would see with a rough surface. A maximum value of 128.0 will result in very small highlight as from a smooth surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | RETIRED - This property has been retired. It is not needed since the matrix defined for the CustomGraphicsText object defines the position and anchor for the billboarded text. Getting the value of this property will return a point at the origin. Setting this property will be ignored. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

Description

RETIRED - This property has been retired. It is not needed since the matrix defined for the CustomGraphicsText object defines the position and anchor for the billboarded text. Getting the value of this property will return a point at the origin. Setting this property will be ignored. 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

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.

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 | The parameter must be input and can be null but the value is ignored. Use of the anchor point has been retired and it is no longer used.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.isValid Property

Parent Object: CustomGraphicsBillBoard
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBillBoard.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

This represents custom graphics that are based on a BRepBody.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Returns a transient BRepBody that is being displayed as custom graphics.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Returns the collection of CustomGraphicsBRepEdge objects in the CustomGraphicsBRepBody.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Returns the collection of CustomGraphicsBRepFace objects in the CustomGraphicsBRepBody.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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.name Property

Parent Object: CustomGraphicsBRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.name

# Set the value of the property.
customGraphicsBRepBody_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsBRepBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsBRepBody.objectType Property

Parent Object: CustomGraphicsBRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

Description

Returns the collection of CustomGraphicsBRepVertex objects in the CustomGraphicsBRepBody.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsBRepBody.h>

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).

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


CustomGraphicsColorEffect Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsColorEffect.h>

Description

The base class for all custom graphics color effects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsBRepBody.color, CustomGraphicsCurve.color, CustomGraphicsEntity.color, CustomGraphicsGroup.color, CustomGraphicsLines.color, CustomGraphicsMesh.color, CustomGraphicsPointSet.color, CustomGraphicsText.color

Derived Classes

CustomGraphicsAppearanceColorEffect, CustomGraphicsBasicMaterialColorEffect, CustomGraphicsShowThroughColorEffect, CustomGraphicsSolidColorEffect, CustomGraphicsVertexColorEffect

Version

Introduced in version September 2017


CustomGraphicsColorEffect.classType Method

Parent Object: CustomGraphicsColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Represents coordinates that are used to define vertices in custom graphics.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 associated 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsCoordinates.create, CustomGraphicsLines.coordinates, CustomGraphicsMesh.coordinates, CustomGraphicsPointSet.coordinates

Version

Introduced in version September 2017


CustomGraphicsCoordinates.classType Method

Parent Object: CustomGraphicsCoordinates
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Gets and sets the colors associated 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.

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<short> propertyValue = customGraphicsCoordinates_var->colors();

// Set the value of the property, where value_var is a short.
bool returnValue = customGraphicsCoordinates_var->colors(value_var);

Property Value

This is a read/write property whose value is an array of type short.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.coordinateCount Property

Parent Object: CustomGraphicsCoordinates
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Returns the number of coordinates defined in the CustomGraphicsCoordinates object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Static method that creates a CustomGraphicsCoordinates object which can be used as input to various custom graphics methods.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Gets the color assigned to the coordinate at the specified index.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Gets the coordinate at the specified index.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Sets the color of the coordinate at the specified index.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCoordinates.h>

Description

Sets the coordinate at the specified index.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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 will automatically take care of creating the correct display for the current level of detail.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
lineStylePattern | The line style to apply to the curve. The default is to draw the curve using continuous line style.
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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Gets and sets the curve associated with this graphics entity. Any of the curve types derived from Curve3D is valid except for InfiniteLine3D.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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.lineStylePattern Property

Parent Object: CustomGraphicsCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

The line style to apply to the curve. The default is to draw the curve using continuous line style.

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.lineStylePattern

# Set the value of the property.
customGraphicsCurve_var.lineStylePattern = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
LineStylePatterns propertyValue = customGraphicsCurve_var->lineStylePattern();

// Set the value of the property, where value_var is a LineStylePatterns.
bool returnValue = customGraphicsCurve_var->lineStylePattern(value_var);

Property Value

This is a read/write property whose value is a LineStylePatterns.

Version

Introduced in version September 2022


CustomGraphicsCurve.lineStyleScale Property

Parent Object: CustomGraphicsCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.lineStyleScale

# Set the value of the property.
customGraphicsCurve_var.lineStyleScale = 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->lineStyleScale();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsCurve_var->lineStyleScale(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2022


CustomGraphicsCurve.name Property

Parent Object: CustomGraphicsCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.name

# Set the value of the property.
customGraphicsCurve_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsCurve_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsCurve.objectType Property

Parent Object: CustomGraphicsCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsCurve.h>

Description

Defines the thickness of the curve in pixels.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

The base class for all visible and selectable custom graphics objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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.name Property

Parent Object: CustomGraphicsEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.name

# Set the value of the property.
customGraphicsEntity_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsEntity_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsEntity.objectType Property

Parent Object: CustomGraphicsEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsEntity.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Represents of group of custom graphics entities. A group can also own other graphics groups.

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 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 returned 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.
isChildrenSelectable | Defines if the child custom graphic entities are selectable or if the entire group is selected in the UI. By default this is true. If false, the isSelectable property defines if this group is selectable. If true, the isSelectable property of each child entity defines if it is selectable.
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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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 will automatically take care of creating the correct display for the current level of detail.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Creates a new, empty CustomGraphicsGroup that is owned by this CustomGraphicsGroup.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Adds a new CustomGraphicsLines entity to this group.

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 | integer[] | 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 | integer[] | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Adds a new CustomGraphicsMesh entity to this group.

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 | integer[] | 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 will automatically calculate normal vectors that are 90 degrees to the face of the triangle, making it appear flat.
normalIndexList | integer[] | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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 | integer[] | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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 returned CustomGrahicsText object. You can also reorient the text by changing the transform of the returned CustomGraphicsText object.

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. The origin of the text is the upper-left corner.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Returns the number of graphics entities within the group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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.isChildrenSelectable Property

Parent Object: CustomGraphicsGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Defines if the child custom graphic entities are selectable or if the entire group is selected in the UI. By default this is true. If false, the isSelectable property defines if this group is selectable. If true, the isSelectable property of each child entity defines if it is selectable.

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.isChildrenSelectable

# Set the value of the property.
customGraphicsGroup_var.isChildrenSelectable = 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->isChildrenSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsGroup_var->isChildrenSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


CustomGraphicsGroup.isSelectable Property

Parent Object: CustomGraphicsGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Function that returns the specified custom graphics entity within this group. This also includes any child graphics groups.

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.name Property

Parent Object: CustomGraphicsGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.name

# Set the value of the property.
customGraphicsGroup_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsGroup_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsGroup.objectType Property

Parent Object: CustomGraphicsGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroup.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.customGraphicsGroups, Component.customGraphicsGroups, FlatPatternComponent.customGraphicsGroups

Version

Introduced in version September 2017


CustomGraphicsGroups.add Method

Parent Object: CustomGraphicsGroups
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

Creates a new, empty CustomGraphicsGroup.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

Returns the number of graphics groups in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

Function that returns the specified graphics group using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Represents lines drawn in the graphics window.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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<integer> propertyValue = customGraphicsLines_var->indexList();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsLines_var->indexList(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version September 2017


CustomGraphicsLines.isLineStrip Property

Parent Object: CustomGraphicsLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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<integer> propertyValue = customGraphicsLines_var->lineStripLengths();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsLines_var->lineStripLengths(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version September 2017


CustomGraphicsLines.lineStylePattern Property

Parent Object: CustomGraphicsLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

The line style to apply to the line. The default is to draw a continuous line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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.name Property

Parent Object: CustomGraphicsLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.name

# Set the value of the property.
customGraphicsLines_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsLines_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsLines.objectType Property

Parent Object: CustomGraphicsLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsLines.h>

Description

Defines the thickness of the line in pixels.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Represents a custom triangle mesh drawn in the graphics window.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 triangle. 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Gets and sets the coordinates associated with this CustomGraphicsMesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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.name Property

Parent Object: CustomGraphicsMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.name

# Set the value of the property.
customGraphicsMesh_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsMesh_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsMesh.normalIndexList Property

Parent Object: CustomGraphicsMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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<integer> propertyValue = customGraphicsMesh_var->normalIndexList();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsMesh_var->normalIndexList(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version September 2017


CustomGraphicsMesh.normalVectors Property

Parent Object: CustomGraphicsMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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 triangle. 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.

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<integer> propertyValue = customGraphicsMesh_var->vertexIndexList();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsMesh_var->vertexIndexList(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version September 2017


CustomGraphicsMesh.viewPlacement Property

Parent Object: CustomGraphicsMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsMesh.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Represents a set of one or more custom graphics points all of the same style.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 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 predefined 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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,

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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<integer> propertyValue = customGraphicsPointSet_var->indexList();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsPointSet_var->indexList(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version September 2017


CustomGraphicsPointSet.isSelectable Property

Parent Object: CustomGraphicsPointSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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.name Property

Parent Object: CustomGraphicsPointSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.name

# Set the value of the property.
customGraphicsPointSet_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsPointSet_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsPointSet.objectType Property

Parent Object: CustomGraphicsPointSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

Description

Specifies which of the predefined 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsPointSet.h>

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).

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


CustomGraphicsShowThroughColorEffect Object

Derived from: CustomGraphicsColorEffect Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

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 specified color and will show through other graphics that are in front of it.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 CustomGraphicsShowThroughColorEffect object that can be assigned to a custom graphics entity using its showThrough property.

Properties

Name | Description
color | Gets and sets the color associated with this CustomGraphicsShowThroughColorEffect object. The color that will be used to render the portion of the entity that is covered by other objects in the scene.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity | Gets and sets the opacity value associated with this CustomGraphicsShowThroughColorEffect object. The opacity is used when rendering the portion of the entity that is covered by other objects in the scene. This can be a value between 0 and 1, where 1 is fully opaque and will completely cover any other entities.

Accessed From

CustomGraphicsShowThroughColorEffect.create

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.classType Method

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsShowThroughColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsShowThroughColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.color Property

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

Gets and sets the color associated with this CustomGraphicsShowThroughColorEffect object. The color that will be used to render the portion of the entity that is covered by other objects in the scene.

Syntax

  • Python
  • C++
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsShowThroughColorEffect_var.color

# Set the value of the property.
customGraphicsShowThroughColorEffect_var.color = propertyValue
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.
#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsShowThroughColorEffect_var->color();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsShowThroughColorEffect_var->color(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.create Method

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

Creates a new CustomGraphicsShowThroughColorEffect object that can be assigned to a custom graphics entity using its showThrough property.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsShowThroughColorEffect.create(color, opacity)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsShowThroughColorEffect::create(color, opacity);

Return Value

Type | Description
CustomGraphicsShowThroughColorEffect | Returns the newly created CustomGraphicsShowThroughColorEffect object or null in the case of failure. This can be assigned to a custom graphics entity using its showThrough property.

Parameters

Name | Type | Description
color | Color | The color that will be used to render the custom graphics object.
opacity | double | The level of opacity that will be applied when rendering the custom graphics object. A value of 0 is fully translucent and will have the effect of the object being completely covered by objects in front of it. A value of 1 is fully opaque which will have the effect of the object completely covering all objects. Values in between will make objects in front of the graphics object appear translucent to varying degrees so you can see the custom graphics object through it.

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.isValid Property

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsShowThroughColorEffect_var.isValid
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.
#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsShowThroughColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.objectType Property

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsShowThroughColorEffect_var.objectType
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.
#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsShowThroughColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


CustomGraphicsShowThroughColorEffect.opacity Property

Parent Object: CustomGraphicsShowThroughColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

Description

Gets and sets the opacity value associated with this CustomGraphicsShowThroughColorEffect object. The opacity is used when rendering the portion of the entity that is covered by other objects in the scene. This can be a value between 0 and 1, where 1 is fully opaque and will completely cover any other entities.

Syntax

  • Python
  • C++
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsShowThroughColorEffect_var.opacity

# Set the value of the property.
customGraphicsShowThroughColorEffect_var.opacity = propertyValue
"customGraphicsShowThroughColorEffect_var" is a variable referencing a CustomGraphicsShowThroughColorEffect object.
#include <Fusion/Graphics/CustomGraphicsShowThroughColorEffect.h>

// Get the value of the property.
double propertyValue = customGraphicsShowThroughColorEffect_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsShowThroughColorEffect_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2020


CustomGraphicsSolidColorEffect Object

Derived from: CustomGraphicsColorEffect Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 separately 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsSolidColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.classType Method

Parent Object: CustomGraphicsSolidColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

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 separately using an opacity attribute.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

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.

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 separately using an opacity attribute.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.isValid Property

Parent Object: CustomGraphicsSolidColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Deletes the entity from the custom graphics group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Gets the opacity of the graphics entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

The actual height of the text in centimeters. This is useful when you want to position several GraphicsText objects together.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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.name Property

Parent Object: CustomGraphicsText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed.

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.name

# Set the value of the property.
customGraphicsText_var.name = 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->name();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsText_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


CustomGraphicsText.objectType Property

Parent Object: CustomGraphicsText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsText.h>

Description

The actual width of the text in centimeters. This is useful when you want to position several GraphicsText objects together.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomGraphicsVertexColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsVertexColorEffect.classType Method

Parent Object: CustomGraphicsVertexColorEffect
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

Description

Statically creates a new CustomGraphicsVertexColorEffect object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

Description

Gets and sets which corner the graphics are positioned relative to.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewPlacement.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Graphics/CustomGraphicsViewScale.h>

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.

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


CustomNamedValues Object

CustomNamedValues Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A collection of named values. The values are strings that Fusion stores but can be anything you choose. If you have several things you need to save you can choose to combine the data into a JSON or XML representation and save it as a single custom value or create a new custom value or each unique value you want to store. Fusion doesn't care what the value is or what it represents but only saves and provides access to it.

Methods

Name | Description
addOrSetValue | Adds or updates a value. If the specified ID does not exist, a new named value is added. If the ID does exist, the named value is updated with the specified 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().
idByIndex | Function that returns the name of a value specified by its index.
isExistingValue | Function that returns if a value with the specified ID exists or not.
remove | Removes the specified value from the collection.
value | Function that returns the specified value given its ID.

Properties

Name | Description
count | The number of values 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomFeature.customNamedValues

Version

Introduced in version July 2021


CustomNamedValues.addOrSetValue Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Adds or updates a value. If the specified ID does not exist, a new named value is added. If the ID does exist, the named value is updated with the specified value.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
returnValue = customNamedValues_var.addOrSetValue(id, value)
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = customNamedValues_var->addOrSetValue(id, value);

Return Value

Type | Description
boolean | Returns true is successful and false if it failed.

Parameters

Name | Type | Description
id | string | The ID of the value to create or change.
value | string | The string to assign to the value.

Version

Introduced in version July 2021


CustomNamedValues.classType Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomNamedValues.classType()
This is a static method.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = adsk::fusion::CustomNamedValues::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2021


CustomNamedValues.count Property

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

The number of values in the collection.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

# Get the value of the property.
propertyValue = customNamedValues_var.count
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
#include <Fusion/Features/CustomNamedValues.h>

// Get the value of the property.
uinteger propertyValue = customNamedValues_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2021


CustomNamedValues.idByIndex Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Function that returns the name of a value specified by its index.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
returnValue = customNamedValues_var.idByIndex(index)
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = customNamedValues_var->idByIndex(index);

Return Value

Type | Description
string | Returns the ID of the specified item or asserts if an out of bounds index is used.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return the name of. The first item in the collection has an index of 0 and the last item is the count of this collection minus 1.

Version

Introduced in version July 2021


CustomNamedValues.isExistingValue Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Function that returns if a value with the specified ID exists or not.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
returnValue = customNamedValues_var.isExistingValue(id)
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = customNamedValues_var->isExistingValue(id);

Return Value

Type | Description
boolean | Returns true if a value with the ID exists.

Parameters

Name | Type | Description
id | string | The ID of the value to check if it exists.

Version

Introduced in version July 2021


CustomNamedValues.isValid Property

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

# Get the value of the property.
propertyValue = customNamedValues_var.isValid
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
#include <Fusion/Features/CustomNamedValues.h>

// Get the value of the property.
boolean propertyValue = customNamedValues_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


CustomNamedValues.objectType Property

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

# Get the value of the property.
propertyValue = customNamedValues_var.objectType
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
#include <Fusion/Features/CustomNamedValues.h>

// Get the value of the property.
string propertyValue = customNamedValues_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


CustomNamedValues.remove Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Removes the specified value from the collection.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
returnValue = customNamedValues_var.remove(id)
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = customNamedValues_var->remove(id);

Return Value

Type | Description
boolean | Returns true if the value was successfully removed and false if it failed. Failure is typically because the specified ID does not exist within the collection.

Parameters

Name | Type | Description
id | string | The ID of the value to remove.

Version

Introduced in version July 2021


CustomNamedValues.value Method

Parent Object: CustomNamedValues

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CustomNamedValues.h>

Description

Function that returns the specified value given its ID.

Syntax

  • Python
  • C++
"customNamedValues_var" is a variable referencing a CustomNamedValues object.
returnValue = customNamedValues_var.value(id)
"customNamedValues_var" is a variable referencing a CustomNamedValues object.

#include <Fusion/Features/CustomNamedValues.h>

returnValue = customNamedValues_var->value(id);

Return Value

Type | Description
string | Returns the value or an empty string if the specified ID was not found.

Parameters

Name | Type | Description
id | string | The ID of the value, which was assigned when the value was created.

Version

Introduced in version July 2021


CustomSDFCallbackEventHandler Object

CustomSDFCallbackEventHandler Object Preview

Derived from: EventHandler Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/CustomSDFCallbackEventHandler.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

API clients can implement subclasses of this handler to enable custom Signed Distance Field geometries.

Methods

Name | Description
boundingBox | This method should be implemented in the subclass of the handler to return the bounding box of the Signed Distance Field that it can provide. This method will be called infrequently by the system.
signedDistanceAt | This method should be implemented in the subclass of the handler to return the Signed Distance value at the given coordinates within the bounding box. This method will be called very frequently and potentially from several differrent threads, it should be made as fast as possible

Version

Introduced in version May 2025


CustomSDFCallbackEventHandler.boundingBox Method

Parent Object: CustomSDFCallbackEventHandler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/CustomSDFCallbackEventHandler.h>

Description

This method should be implemented in the subclass of the handler to return the bounding box of the Signed Distance Field that it can provide. This method will be called infrequently by the system.

Syntax

  • Python
  • C++
"customSDFCallbackEventHandler_var" is a variable referencing a CustomSDFCallbackEventHandler object.
returnValue = customSDFCallbackEventHandler_var.boundingBox(bboxOut)
"customSDFCallbackEventHandler_var" is a variable referencing a CustomSDFCallbackEventHandler object.

#include <Volume/Volumetric/CustomSDFCallbackEventHandler.h>

returnValue = customSDFCallbackEventHandler_var->boundingBox(bboxOut);

Return Value

Type | Description
boolean | True if there is a valid bounding box.

Parameters

Name | Type | Description
bboxOut | BoundingBox3D | This is a return parameter. The values of this should be set by the client implementation.

Version

Introduced in version May 2025


CustomSDFCallbackEventHandler.signedDistanceAt Method

Parent Object: CustomSDFCallbackEventHandler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/CustomSDFCallbackEventHandler.h>

Description

This method should be implemented in the subclass of the handler to return the Signed Distance value at the given coordinates within the bounding box. This method will be called very frequently and potentially from several differrent threads, it should be made as fast as possible

Syntax

  • Python
  • C++
"customSDFCallbackEventHandler_var" is a variable referencing a CustomSDFCallbackEventHandler object.
returnValue = customSDFCallbackEventHandler_var.signedDistanceAt(x, y, z)
"customSDFCallbackEventHandler_var" is a variable referencing a CustomSDFCallbackEventHandler object.

#include <Volume/Volumetric/CustomSDFCallbackEventHandler.h>

returnValue = customSDFCallbackEventHandler_var->signedDistanceAt(x, y, z);

Return Value

Type | Description
double | The signed distance value at the sampled point (X,Y,Z).

Parameters

Name | Type | Description
x | double | X coordinate of the sampled point.
y | double | Y coordinate of the sampled point.
z | double | Z coordinate of the sampled point.

Version

Introduced in version May 2025


CutPasteBodies Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

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.

Methods

Name | Description
add | Cuts and copies the specified 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

Cuts and copies the specified body into the component that owns this CutPasteBodies collection. This is effectively the equivalent of moving a body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

The number of Cut/Paste Body features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

Function that returns the specified Cut/Paste Body feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

Function that returns the specified Cut/Paste Body feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBodies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Object that represents an existing Cut/Paste Body feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

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.entityToken Property

Parent Object: CutPasteBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.entityToken
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
string propertyValue = cutPasteBody_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CutPasteBody.errorOrWarningMessage Property

Parent Object: CutPasteBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CutPasteBody.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

The center axis (along the length) of the cylinder that defines its normal direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Creates and returns an independent copy of this Cylinder object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Creates a transient cylinder object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Gets the data that defines the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

The origin point (center) of the base of the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

The radius of the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Sets the data that defines the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Cylinder.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Object that represents an existing cylinder feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

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.

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.entityToken Property

Parent Object: CylinderFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.entityToken
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
string propertyValue = cylinderFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


CylinderFeature.errorOrWarningMessage Property

Parent Object: CylinderFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

Collection that provides access to all of the existing cylinder features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.cylinderFeatures

Version

Introduced in version September 2015


CylinderFeatures.classType Method

Parent Object: CylinderFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

The number of cylinder features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

Function that returns the specified cylinder feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

Function that returns the specified cylinder feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/CylinderFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Represents the set of information specific to a cylindrical joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/CylindricalJointMotion.h>

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

The Data class provides access to data files

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
findFileById | Returns the DataFile identified by the input id. This can fail is there isn't a DataFile identified with the specified id or if the current user doesn't have privileges to access the file.
findFolderById | Returns the DataFolder identified by the input id. This can fail if there isn't a DataFolder identified with the specified id or if the current user doesn't have privileges to access the folder.
refreshDataPanel | Refreshes the contents of the data panel to ensure what is displayed reflects the latest state.

Properties

Name | Description
activeFolder | Gets the active DataFolder as seen in the Fusion Data Panel.
activeHub | Gets the active DataHub.
activeProject | Gets and sets the active DataProject. This is the project currently displayed in the Fusion 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.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
personalUseLimits | If the user is running with a "Fusion for Personal Use license", this property will return a peronalUseLimits object which provides information about file limits associated with the license. If the user is running with any other license type, this property will return null.

Accessed From

Application.data

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version January 2015


Data.activeFolder Property

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Gets the active DataFolder as seen in the Fusion Data Panel.

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.activeFolder
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = data_var->activeFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version May 2022


Data.activeHub Property

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Gets the active DataHub.

Remarks

Setting the active hub is not supported within any of the Command related events. When a command is running, a transaction is open, and changing the active hub cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Gets and sets the active DataProject. This is the project currently displayed in the Fusion Data Panel.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Returns a collection of accessible hubs for the current user. A DataHub represents an A360 Team or Personal hub.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Gets the collection of DataProjects associated with the active Hub.

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.findFileById Method

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Returns the DataFile identified by the input id. This can fail is there isn't a DataFile identified with the specified id or if the current user doesn't have privileges to access the file.

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.
returnValue = data_var.findFileById(id)
"data_var" is a variable referencing a Data object.

#include <Core/Dashboard/Data.h>

returnValue = data_var->findFileById(id);

Return Value

Type | Description
DataFile | Returns the DataFile is one was found matching the input id or null if one was not found or you don't have privileges to access it. You can use the Application.getLastError method to determine the reason for the failure.

Parameters

Name | Type | Description
id | string | The full id of the file will be something similar to that shown below. The version argument can be omitted which will result in getting the latest version. urn:adsk.wipprod:fs.file:vf.NazykCYLRWKZ5tpzJtEQ1A?version=3 This is also the same id that you'll obtain if you use the APS Data Management API.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version December 2020


Data.findFolderById Method

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Returns the DataFolder identified by the input id. This can fail if there isn't a DataFolder identified with the specified id or if the current user doesn't have privileges to access the folder.

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.
returnValue = data_var.findFolderById(id)
"data_var" is a variable referencing a Data object.

#include <Core/Dashboard/Data.h>

returnValue = data_var->findFolderById(id);

Return Value

Type | Description
DataFolder | Returns a DataFolder if one is found matching the input id or null if one is not found or you don't have privileges to access it.

Parameters

Name | Type | Description
id | string | The full id of the folder will be something similar to that shown below. urn:adsk.wipprod:fs.folder:co.BdMZ64GqTAie4w3NShw23C This is also the same id that you'll obtain if you use the APS Data Management API.

Version

Introduced in version May 2024


Data.isDataPanelVisible Property

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Gets and sets if the data panel is visible within Fusion.

Remarks

Setting if the data panel is visible is not supported within any of the Command related events. When a command is running, a transaction is open, and changing the visibility of the data panel cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.personalUseLimits Property

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

If the user is running with a "Fusion for Personal Use license", this property will return a peronalUseLimits object which provides information about file limits associated with the license. If the user is running with any other license type, this property will return null.

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.personalUseLimits
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<PersonalUseLimits> propertyValue = data_var->personalUseLimits();

Property Value

This is a read only property whose value is a PersonalUseLimits.

Version

Introduced in version May 2021


Data.refreshDataPanel Method

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Refreshes the contents of the data panel to ensure what is displayed reflects the latest state.

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


DataComponent Object

DataComponent Object Preview

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

An object that provides ID's that can be used to access the component using MFG DM API. These ID's are generated by the MFG DM API when a file is saved. For that reason, they are not available from a component before its parent file is saved.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
component | Get the fusion.Component that corresponds to this data component.
id | Gets the unique ID of this DataComponent. This ID can be used within the MFG DM API. This ID is created by the MFG DM API when the component is first saved.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mfgdmModelId | Get the MFGDM model Id.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
timestamp | Get the resolution timestamp.
versionId | Returns the unique ID of this file version of the DataComponent. This ID is updated whenever the document the component exists within is saved.

Accessed From

BaseComponent.dataComponent, Component.dataComponent, Design.rootDataComponent, FlatPatternComponent.dataComponent, FlatPatternProduct.rootDataComponent, Occurrence.dataComponent, WorkingModel.rootDataComponent

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version May 2024


DataComponent.classType Method

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataComponent.classType()
This is a static method.

#include <Core/Dashboard/DataComponent.h>

returnValue = adsk::core::DataComponent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


DataComponent.component Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Get the fusion.Component that corresponds to this data component.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.component
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
Ptr<Base> propertyValue = dataComponent_var->component();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2025


DataComponent.id Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Gets the unique ID of this DataComponent. This ID can be used within the MFG DM API. This ID is created by the MFG DM API when the component is first saved.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.id
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
string propertyValue = dataComponent_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


DataComponent.isValid Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.isValid
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
boolean propertyValue = dataComponent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


DataComponent.mfgdmModelId Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Get the MFGDM model Id.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.mfgdmModelId
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
string propertyValue = dataComponent_var->mfgdmModelId();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


DataComponent.objectType Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.objectType
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
string propertyValue = dataComponent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


DataComponent.timestamp Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Get the resolution timestamp.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.timestamp
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
string propertyValue = dataComponent_var->timestamp();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


DataComponent.versionId Property

Parent Object: DataComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataComponent.h>

Description

Returns the unique ID of this file version of the DataComponent. This ID is updated whenever the document the component exists within is saved.

Syntax

  • Python
  • C++
"dataComponent_var" is a variable referencing a DataComponent object.

# Get the value of the property.
propertyValue = dataComponent_var.versionId
"dataComponent_var" is a variable referencing a DataComponent object.
#include <Core/Dashboard/DataComponent.h>

// Get the value of the property.
string propertyValue = dataComponent_var->versionId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


DataEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

A Data event is an event associated with operations on Data items.

Methods

Name | Description
add | Add a handler to be notified when the data 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.dataFileComplete, Application.dataFileCopyComplete

Version

Introduced in version January 2022


DataEvent.add Method

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

Add a handler to be notified when the data event occurs.

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.
returnValue = dataEvent_var.add(handler)
"dataEvent_var" is a variable referencing a DataEvent object.

#include <Core/Dashboard/DataEvent.h>

returnValue = dataEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | DataEventHandler | The handler object to be called when this event is fired.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version January 2022


DataEvent.classType Method

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataEvent.classType()
This is a static method.

#include <Core/Dashboard/DataEvent.h>

returnValue = adsk::core::DataEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2022


DataEvent.isValid Property

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.

# Get the value of the property.
propertyValue = dataEvent_var.isValid
"dataEvent_var" is a variable referencing a DataEvent object.
#include <Core/Dashboard/DataEvent.h>

// Get the value of the property.
boolean propertyValue = dataEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2022


DataEvent.name Property

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.

# Get the value of the property.
propertyValue = dataEvent_var.name
"dataEvent_var" is a variable referencing a DataEvent object.
#include <Core/Dashboard/DataEvent.h>

// Get the value of the property.
string propertyValue = dataEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


DataEvent.objectType Property

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.

# Get the value of the property.
propertyValue = dataEvent_var.objectType
"dataEvent_var" is a variable referencing a DataEvent object.
#include <Core/Dashboard/DataEvent.h>

// Get the value of the property.
string propertyValue = dataEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


DataEvent.remove Method

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.
returnValue = dataEvent_var.remove(handler)
"dataEvent_var" is a variable referencing a DataEvent object.

#include <Core/Dashboard/DataEvent.h>

returnValue = dataEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | DataEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2022


DataEvent.sender Property

Parent Object: DataEvent
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"dataEvent_var" is a variable referencing a DataEvent object.

# Get the value of the property.
propertyValue = dataEvent_var.sender
"dataEvent_var" is a variable referencing a DataEvent object.
#include <Core/Dashboard/DataEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = dataEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2022


DataEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

The DataEventArgs provides information associated with a data event. Note that some properties are not available on every event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets the DataFile object associated with this event. If there isn't a DataFile associated with the event, this property will return null.
filename | Gets the filename associated with the operation. If there isn't an associated filename, an empty string is returned. For a download operation, this will be the full filename of the downloaded file.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
status | Returns a Status object that provides additional information about the success or failure of the operation.

Version

Introduced in version January 2022


DataEventArgs.classType Method

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataEventArgs.classType()
This is a static method.

#include <Core/Dashboard/DataEventArgs.h>

returnValue = adsk::core::DataEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2022


DataEventArgs.file Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

Gets the DataFile object associated with this event. If there isn't a DataFile associated with the event, this property will return null.

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.file
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = dataEventArgs_var->file();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version January 2022


DataEventArgs.filename Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

Gets the filename associated with the operation. If there isn't an associated filename, an empty string is returned. For a download operation, this will be the full filename of the downloaded file.

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.filename
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
string propertyValue = dataEventArgs_var->filename();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


DataEventArgs.firingEvent Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.firingEvent
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = dataEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2022


DataEventArgs.isValid Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.isValid
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
boolean propertyValue = dataEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2022


DataEventArgs.objectType Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.objectType
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
string propertyValue = dataEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


DataEventArgs.status Property

Parent Object: DataEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventArgs.h>

Description

Returns a Status object that provides additional information about the success or failure of the operation.

Syntax

  • Python
  • C++
"dataEventArgs_var" is a variable referencing a DataEventArgs object.

# Get the value of the property.
propertyValue = dataEventArgs_var.status
"dataEventArgs_var" is a variable referencing a DataEventArgs object.
#include <Core/Dashboard/DataEventArgs.h>

// Get the value of the property.
Ptr<Status> propertyValue = dataEventArgs_var->status();

Property Value

This is a read only property whose value is a Status.

Version

Introduced in version January 2022


DataEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventHandler.h>

Description

The DataEventHandler is a client implemented class that can be added as a handler to a DataEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version January 2022


DataEventHandler.notify Method

Parent Object: DataEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"dataEventHandler_var" is a variable referencing a DataEventHandler object.
returnValue = dataEventHandler_var.notify(eventArgs)
"dataEventHandler_var" is a variable referencing a DataEventHandler object.

#include <Core/Dashboard/DataEventHandler.h>

returnValue = dataEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | DataEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2022


DataFile Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

A data file in a data folder.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
copyWithInput | Preview Executes the copy using the information defined by the provided CopyFileInput.
createCopyDesignFileInput | Preview Creates a new CopyDesignFileInput object that is used to create a copy of a DataFile that represents a Fusion design. You set options on the CopyDesignFileInput object to define the behavior of the copy and call the copyWithInput method passing in the input object to create the copy.
createCopyFileInput | Preview Creates a new CopyFileInput object that is used to create a copy of any DataFile.
createMilestone | Makes the version this DataFile represents a milestone.
deleteMe | Deletes this DataFile. This can fail if this file is referenced by another file or is currently open.
download | Performs a synchronous or asynchronous download of this DataFile. Only DataFiles that represent non-Fusion data can be downloaded. For example, this will work for TXT or XLS files but will fail for F3D files. When using this in its synchronous mode, Fusion is frozen during the download and the call will not return until the download is complete or has failed. When using this in its asynchronous mode, calling this method will start the download process and the call return before the download is complete. The event on the provided handler will be called notifying you when the download is complete.
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.
refresh | Refreshes the data associated with a DataFile object to be up to date with the associated cloud data. The DataFile returned by the API reflects the local representation of the DataFile as used by the Data Panel. This is method is only useful in very limited cases and should rarely be used. In most cases the local representation will match the actual data on the cloud. In rare occasions where Fusion was off-line while the cloud processing of DataFile is completed or the DataFile is not in the folder shown in the Data Panel. Getting a DataFileFolder contents forces an update of the local data for all of the data files it contains so they will all be up to date.

Properties

Name | Description
childReferences | Returns a collection of DataFiles that are the children (referenced designs) this datafile references.
configurationRowId | Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.
configurationTable If this file is a configured design or a configuration, this property returns the associated ConfigTable object. If this is not a configured design or configuration, this property returns null.

This property is typed as core.Base because the adsk.core library does not reference the fusion library where the ConfigurationTable object is defined. At runtime, this property will return a ConfigurationTable object.
createdBy | Returns the User that created this data file.
dataObject Starts the process to get the raw binary data associated with this DataFile. Because the data exists on the cloud, a DataObjectFuture is returned that you can use to monitor the state of downloading the data and then getting the raw data once it is available.

Only DataFiles that represent non-Fusion data can accessed. For example, this will work for TXT or XLS files but will fail for F3D files.
dateCreated Returns the date when this data file was created as UNIX epoch time. UNIX epoch time is the number of seconds since January 1, 1970 (midnight UTC/GMT).

In Python you can import the standard time module to work with UNIX epoch time.

In C++ you can use functions in time.h and std::chrono to work with UNIX epoch time.
dateModified Returns the date when this data file was modified. Most changes to a file result in a new version which means a new DataFile is created and will have a new creation date. There are a few changes, like rename, that modify a DataFile without creating a new version and the date of that change is returned by this property.

The date is returned as UNIX epoch time, which is the number of seconds since January 1, 1970 (midnight UTC/GMT). In Python you can import the standard time module to work with UNIX epoch time. In C++ you can use functions in time.h and std::chrono to work with UNIX epoch time.
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.
fusionWebURL

Returns a URL that can be used to access the Fusion Web interface for this file within a browser. The person using the URL must have an Autodesk account and have authority to access the hub this file is owned by.

You can also use this URL to directly open the file in Fusion using the Fusion protocol handler as discussed in the Opening Files from a Web Page topic in the API user manual.
hasChildReferences | Gets if this datafile has children, (i.e. a Fusion 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 design).
id | Returns the unique ID for this DataFile. This is the same id used in the APS 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.
isComplete | Returns if the DataFile is fully processed. This is especially useful when a new file is being saved or uploaded. The initial call to save or upload the file returns when the process has started but processing continues on the cloud. This property will return true when all of the processing has been completed and all information related to the Datafile is now available.
isConfiguration | Gets if this file is a configuration of a configuration table. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.
isConfiguredDesign | Gets if this file represents a configured design. This is a design where a configuration table is defined. Use the configurationTable property to get the associated table.
isInUse | Gets if this DataFile is currently in use (opened for edit) by any other user.
isMilestone | Returns if the version this Datafile represents is a milestone. Returns true if it is a milestone.
isReadOnly | Gets if this file is currently read-only or not. A file can be read-only for various reasons. For example, if you are running with a "Fusion for Personal Use license" and have not designate the file to be editable or if someone else is editing 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.
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.
milestone | If the version this DataFile represents is a milestone, a Milestone object will be returned. If it's not a milestone, null is returned.
milestones | Returns a collection of Milestones associated with all versions of this DataFile.
name | Gets and sets the displayed name of this item.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | **RETIRED** Returns a short URL of this data file which can be shared with others.
sharedLink | Returns the SharedLink object associated with this DataFile. You can use the SharedLink object to enable a shared link and set its behavior and to get the shared link URL.
versionId | Returns the version ID for this DataFile. This is the same id used in the APS Data Management API for an Item and is in the unencoded form and will look similar to this: "urn:adsk.wipqa:fs.file:vf.W3syIw1lQAW-5vWObMdYnA?version=2"
versionNumber | Gets the version number of this DataFile.
versions | Gets the other version of this item.

Accessed From

CloudFileDialog.dataFile, CloudFileDialog.dataFiles, Data.findFileById, DataEventArgs.file, DataFile.copy, DataFile.latestVersion, DataFileFuture.dataFile, DataFiles.asArray, DataFiles.item, DataFiles.itemById, DesignDataFile.copy, DesignDataFile.latestVersion, Document.dataFile, DocumentReference.dataFile, DrawingDocument.dataFile, FusionDocument.dataFile, Milestone.version, Occurrence.configuredDataFile, PersonalUseLimits.editableFiles

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version January 2015


DataFile.childReferences Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns a collection of DataFiles that are the children (referenced designs) this datafile references.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.configurationRowId Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.configurationRowId
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->configurationRowId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


DataFile.configurationTable Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

If this file is a configured design or a configuration, this property returns the associated ConfigTable object. If this is not a configured design or configuration, this property returns null.

This property is typed as core.Base because the adsk.core library does not reference the fusion library where the ConfigurationTable object is defined. At runtime, this property will return a ConfigurationTable object.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.configurationTable
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<Base> propertyValue = dataFile_var->configurationTable();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


DataFile.copy Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Copies this DataFile to the specified folder.

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.copyWithInput Method

Parent Object: DataFile

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Executes the copy using the information defined by the provided CopyFileInput.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.copyWithInput(input)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->copyWithInput(input);

Return Value

Type | Description
DataFileFuture | The copy process is asynchronous which means that this method will return before the copy process has completed. The returned DataFileFuture object can be used to check on the current state of the copy to determine if it is still copying, is complete, or has failed. If it is complete the new DataFile that was created as a result of the copy can be retrieved through the DataFileFuture object.

Parameters

Name | Type | Description
input | CopyFileInput | The input object is of CopyFileInput object type, based on which our copy behavior will be defined. A CopyDesignFileInput object is created using the DataFile.createCopyDesignFileInput.

Version

Introduced in version May 2024


DataFile.createCopyDesignFileInput Method

Parent Object: DataFile

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Creates a new CopyDesignFileInput object that is used to create a copy of a DataFile that represents a Fusion design. You set options on the CopyDesignFileInput object to define the behavior of the copy and call the copyWithInput method passing in the input object to create the copy.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.createCopyDesignFileInput(folder)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->createCopyDesignFileInput(folder);

Return Value

Type | Description
CopyDesignFileInput | Returns the created CopyDesignFileInput object or null in the case of failure.

Parameters

Name | Type | Description
folder | DataFolder | The folder where the copied files will be created.

Version

Introduced in version May 2024


DataFile.createCopyFileInput Method

Parent Object: DataFile

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Creates a new CopyFileInput object that is used to create a copy of any DataFile.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.createCopyFileInput(folder)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->createCopyFileInput(folder);

Return Value

Type | Description
CopyFileInput | Returns the created CopyFileInput object or null in the case of failure.

Parameters

Name | Type | Description
folder | DataFolder | The folder where the copied file will be created.

Version

Introduced in version May 2024


DataFile.createdBy Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the User that created this data file.

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.createMilestone Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Makes the version this DataFile represents a milestone.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.createMilestone(milestoneName)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->createMilestone(milestoneName);

Return Value

Type | Description
Milestone | Returns the created Milestone object or null in the case of failure. One case of failure is if a milestone already exists for this version.

Parameters

Name | Type | Description
milestoneName | string | The name of the milestone as seen in the data panel and Fusion web client. If an empty string is provided, a default name will be used.

Version

Introduced in version March 2024


DataFile.dataObject Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Starts the process to get the raw binary data associated with this DataFile. Because the data exists on the cloud, a DataObjectFuture is returned that you can use to monitor the state of downloading the data and then getting the raw data once it is available.

Only DataFiles that represent non-Fusion data can accessed. For example, this will work for TXT or XLS files but will fail for F3D files.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.dataObject
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataObjectFuture> propertyValue = dataFile_var->dataObject();

Property Value

This is a read only property whose value is a DataObjectFuture.

Version

Introduced in version September 2024


DataFile.dateCreated Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the date when this data file was created as UNIX epoch time. UNIX epoch time is the number of seconds since January 1, 1970 (midnight UTC/GMT).

In Python you can import the standard time module to work with UNIX epoch time.

In C++ you can use functions in time.h and std::chrono to work with UNIX epoch time.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.dateCreated
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
uinteger propertyValue = dataFile_var->dateCreated();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2020


DataFile.dateModified Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the date when this data file was modified. Most changes to a file result in a new version which means a new DataFile is created and will have a new creation date. There are a few changes, like rename, that modify a DataFile without creating a new version and the date of that change is returned by this property.

The date is returned as UNIX epoch time, which is the number of seconds since January 1, 1970 (midnight UTC/GMT). In Python you can import the standard time module to work with UNIX epoch time. In C++ you can use functions in time.h and std::chrono to work with UNIX epoch time.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.dateModified
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
uinteger propertyValue = dataFile_var->dateModified();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2023


DataFile.deleteMe Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Deletes this DataFile. This can fail if this file is referenced by another file or is currently open.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets and sets the description information associated with this item.

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.download Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Performs a synchronous or asynchronous download of this DataFile. Only DataFiles that represent non-Fusion data can be downloaded. For example, this will work for TXT or XLS files but will fail for F3D files.

When using this in its synchronous mode, Fusion is frozen during the download and the call will not return until the download is complete or has failed. When using this in its asynchronous mode, calling this method will start the download process and the call return before the download is complete. The event on the provided handler will be called notifying you when the download is complete.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.download(path, handler)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->download(path, handler);

Return Value

Type | Description
boolean | Returns True in synchronous mode if successful. Returns True in asynchronous mode if the download was successfully started.

Parameters

Name | Type | Description
path | string | The full path and optionally the filename used on the local file system for the file. If the path doesn't exist it will be created. If only a path is specified, the name and file extension associated with the DataFile is used for the filename. You can also specify the full path, including the filename.
handler | DataEventHandler | If you want to do an asynchronous download, provide the handler object to be called when this operation is complete. To call the method synchronously, set this argument to null/None.

Version

Introduced in version January 2022


DataFile.fileExtension Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets the file extension for this data file. The file type can be inferred from this.

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.fusionWebURL Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns a URL that can be used to access the Fusion Web interface for this file within a browser. The person using the URL must have an Autodesk account and have authority to access the hub this file is owned by.

You can also use this URL to directly open the file in Fusion using the Fusion protocol handler as discussed in the Opening Files from a Web Page topic in the API user manual.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.fusionWebURL
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->fusionWebURL();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DataFile.hasChildReferences Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this datafile has children, (i.e. a Fusion Design containing referenced components).

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this datafile has Children (referenced components) that are out of date (not the latest version).

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this datafile has parents, (i.e. this is a child being referenced in another Fusion design).

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the unique ID for this DataFile. This is the same id used in the APS Data Management API for an Item and is in the unencoded form and will look similar to this: "urn:adsk.wipprod:dm.lineage:hC6k4hndRWaeIVhIjvHu8w"

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the array of users that are currently using (have open for edit) this data file.

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.isComplete Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns if the DataFile is fully processed. This is especially useful when a new file is being saved or uploaded. The initial call to save or upload the file returns when the process has started but processing continues on the cloud. This property will return true when all of the processing has been completed and all information related to the Datafile is now available.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isComplete
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isComplete();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2022


DataFile.isConfiguration Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this file is a configuration of a configuration table. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isConfiguration
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isConfiguration();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


DataFile.isConfiguredDesign Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this file represents a configured design. This is a design where a configuration table is defined. Use the configurationTable property to get the associated table.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isConfiguredDesign
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isConfiguredDesign();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


DataFile.isInUse Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this DataFile is currently in use (opened for edit) by any other user.

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.isMilestone Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns if the version this Datafile represents is a milestone. Returns true if it is a milestone.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isMilestone
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isMilestone();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


DataFile.isReadOnly Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets if this file is currently read-only or not. A file can be read-only for various reasons. For example, if you are running with a "Fusion for Personal Use license" and have not designate the file to be editable or if someone else is editing the file.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isReadOnly
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


DataFile.isValid Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the User that last updated this data file

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the latest version of the DataFile. It can return a reference to the same DataFile is this DataFile is the latest version.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets the latest version number for this DataFile.

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.milestone Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

If the version this DataFile represents is a milestone, a Milestone object will be returned. If it's not a milestone, null is returned.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.milestone
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<Milestone> propertyValue = dataFile_var->milestone();

Property Value

This is a read only property whose value is a Milestone.

Version

Introduced in version March 2024


DataFile.milestones Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns a collection of Milestones associated with all versions of this DataFile.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.milestones
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<Milestones> propertyValue = dataFile_var->milestones();

Property Value

This is a read only property whose value is a Milestones.

Version

Introduced in version March 2024


DataFile.move Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Moves this DataFile to the specified folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets and sets the displayed name of this item.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the parent folder this item is contained within.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the parent project that this item is in.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns a collection DataFiles collection that are the parents (designs that reference) this datafile.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Promotes this version to be the latest version. If this is the latest version, nothing happens.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Returns a short URL of this data file which can be shared with others.

Remarks

This method has been retired and replaced by the functionality on the SharedLink object which can be obtained using the DataFile.sharedLink property. The behavior of this property has changed so it can return an empty string if a public link has not been generated.

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
Retired in version May 2024


DataFile.refresh Method

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Refreshes the data associated with a DataFile object to be up to date with the associated cloud data. The DataFile returned by the API reflects the local representation of the DataFile as used by the Data Panel. This is method is only useful in very limited cases and should rarely be used. In most cases the local representation will match the actual data on the cloud. In rare occasions where Fusion was off-line while the cloud processing of DataFile is completed or the DataFile is not in the folder shown in the Data Panel. Getting a DataFileFolder contents forces an update of the local data for all of the data files it contains so they will all be up to date.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.refresh(handler)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->refresh(handler);

Return Value

Type | Description
boolean | Returns True in synchronous mode if successful. Returns True in asynchronous mode if the refresh was successfully started.

Parameters

Name | Type | Description
handler | DataEventHandler | If you want to do an asynchronous refresh, provide the handler object to be called when this operation is complete. To call the method synchronously, set this argument to null/None.

Version

Introduced in version January 2022


DataFile.sharedLink Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the SharedLink object associated with this DataFile. You can use the SharedLink object to enable a shared link and set its behavior and to get the shared link URL.

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.sharedLink
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<SharedLink> propertyValue = dataFile_var->sharedLink();

Property Value

This is a read only property whose value is a SharedLink.

Version

Introduced in version May 2024


DataFile.versionId Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Returns the version ID for this DataFile. This is the same id used in the APS Data Management API for an Item and is in the unencoded form and will look similar to this: "urn:adsk.wipqa:fs.file:vf.W3syIw1lQAW-5vWObMdYnA?version=2"

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.versionId
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->versionId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DataFile.versionNumber Property

Parent Object: DataFile
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets the version number of this DataFile.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFile.h>

Description

Gets the other version of this item.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

Used to check the state and get back the results of a file upload.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
uploadState | Returns the current state of the upload.

Accessed From

Component.saveCopyAs, DataFile.copyWithInput, DataFolder.uploadAssembly, DataFolder.uploadFile, FlatPatternComponent.saveCopyAs

Version

Introduced in version March 2015


DataFileFuture.classType Method

Parent Object: DataFileFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

Returns the DataFile when the upload is complete (uplodeState returns UploadFinished). Returns null if the upload is still running or has failed.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFileFuture.h>

Description

Returns the current state of the upload.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Returns the items within a folder. This includes everything in a folder except for other folders.

Methods

Name | Description
asArray | Get the current list of all files.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
itemById | Returns the file specified using the ID or version ID of the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DataFile.childReferences, DataFile.parentReferences, DataFile.versions, DataFolder.dataFiles, DesignDataFile.childReferences, DesignDataFile.parentReferences, DesignDataFile.versions

Version

Introduced in version January 2015


DataFiles.asArray Method

Parent Object: DataFiles
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Get the current list of all files.

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.
returnValue = dataFiles_var.asArray()
"dataFiles_var" is a variable referencing a DataFiles object.

#include <Core/Dashboard/DataFiles.h>

returnValue = dataFiles_var->asArray();

Return Value

Type | Description
DataFile[] | Returns the current list of all files.

Version

Introduced in version April 2021


DataFiles.classType Method

Parent Object: DataFiles
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

The number of data items in this collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Returns the specified data file.

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.itemById Method

Parent Object: DataFiles
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

Returns the file specified using the ID or version ID of the file.

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.
returnValue = dataFiles_var.itemById(id)
"dataFiles_var" is a variable referencing a DataFiles object.

#include <Core/Dashboard/DataFiles.h>

returnValue = dataFiles_var->itemById(id);

Return Value

Type | Description
DataFile | Returns the file or null if a file with the specified ID is not found.

Parameters

Name | Type | Description
id | string | The ID or version ID of the file to return. This is the same ID used by the APS Data Management API.

Version

Introduced in version December 2020


DataFiles.objectType Property

Parent Object: DataFiles
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFiles.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

A data folder that contains a collection of data items.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 sub-assemblies.
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 APS 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CloudFileDialog.dataFolder, CopyDesignFileInput.targetFolder, CopyFileInput.targetFolder, Data.activeFolder, Data.findFolderById, DataFile.parentFolder, DataFolder.parentFolder, DataFolders.add, DataFolders.asArray, DataFolders.item, DataFolders.itemById, DataFolders.itemByName, DataProject.rootFolder, DesignDataFile.parentFolder, NCProgram.fusionHubFolder

Version

Introduced in version January 2015


DataFolder.classType Method

Parent Object: DataFolder
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Returns a collection containing all of the items within this folder, excluding folders. Use the dataFolders property to get the folders.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Returns a collection containing all of the folders within this folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Deletes this folder item.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Returns the unique ID for this folder. This is the same id used in the APS Data Management API.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Indicates if this folder is the root folder within the parent project.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Gets and sets the displayed name of this folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Returns the parent folder this folder is contained within. Returns null if this is the project's root folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Returns the parent project that owns this folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

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 sub-assemblies.

Remarks

Uploading an assembly is not supported within any of the Command related events. When a command is running, a transaction is open, and uploading files cannot be transacted and, as a result, cannot be contained within a command transaction.

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 top-level assembly file must be the first file in the array.

Version

Introduced in version March 2015


DataFolder.uploadFile Method

Parent Object: DataFolder
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolder.h>

Description

Uploads a single file to this directory.

Remarks

Uploading a file is not supported within any of the Command related events. When a command is running, a transaction is open, and uploading files cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Collection object the provides a list of data folders.

Methods

Name | Description
add | Creates a new folder within the parent folder.
asArray | Get the current list of all folders.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DataFolder.dataFolders

Version

Introduced in version January 2015


DataFolders.add Method

Parent Object: DataFolders
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Creates a new folder within the parent folder.

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.asArray Method

Parent Object: DataFolders
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Get the current list of all folders.

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.
returnValue = dataFolders_var.asArray()
"dataFolders_var" is a variable referencing a DataFolders object.

#include <Core/Dashboard/DataFolders.h>

returnValue = dataFolders_var->asArray();

Return Value

Type | Description
DataFolder[] | Returns the current list of all folders.

Version

Introduced in version April 2021


DataFolders.classType Method

Parent Object: DataFolders
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

The number of folders in this collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Returns the specified folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Returns the folder specified using the ID of the folder.

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 APS Data Management API.

Version

Introduced in version September 2016


DataFolders.itemByName Method

Parent Object: DataFolders
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

Returns the folder specified using the name of the folder.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataFolders.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Represents a hub within the data.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
fusionWebURL | Returns a URL that can be used to access the Fusion Web interface for this hub within a browser. The person using the URL must have an Autodesk account and have authority to access the hub.
hubType | Gets if this hub is a Personal (PersonalHubType) or Team (TeamHubType) type hub.
id | Returns the unique ID for this hub. This is the same id used in the APS Data Management API in an unencoded form and will look something like this: "a.45637".
isCollaborativeEditingEnabled | Returns true if Concurrent Editing 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.
mfgdmId | Preview Get the MFGDM ID for this hub.
name | Returns the name of the hub.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
version | Returns the version of the hub.

Accessed From

Data.activeHub, DataHubs.asArray, DataHubs.item, DataHubs.itemById, DataProject.parentHub

Version

Introduced in version September 2016


DataHub.classType Method

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns the projects within this hub.

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.fusionWebURL Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns a URL that can be used to access the Fusion Web interface for this hub within a browser. The person using the URL must have an Autodesk account and have authority to access the hub.

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.fusionWebURL
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->fusionWebURL();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DataHub.hubType Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Gets if this hub is a Personal (PersonalHubType) or Team (TeamHubType) type hub.

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.id Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns the unique ID for this hub. This is the same id used in the APS Data Management API in an unencoded form and will look something like this: "a.45637".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.id
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DataHub.isCollaborativeEditingEnabled Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns true if Concurrent Editing is enabled.

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.isCollaborativeEditingEnabled
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
boolean propertyValue = dataHub_var->isCollaborativeEditingEnabled();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


DataHub.isValid Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.mfgdmId Property

Parent Object: DataHub

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Get the MFGDM ID for this hub.

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.mfgdmId
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->mfgdmId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


DataHub.name Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns the name of the hub.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


DataHub.version Property

Parent Object: DataHub
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHub.h>

Description

Returns the version of the hub.

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.version
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


DataHubs Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Collection object that provides a list of all available hubs.

Methods

Name | Description
asArray | Get the current list of all hubs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
itemById | Returns the hub specified using the ID of the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Data.dataHubs

Version

Introduced in version September 2016


DataHubs.asArray Method

Parent Object: DataHubs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Get the current list of all hubs.

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.
returnValue = dataHubs_var.asArray()
"dataHubs_var" is a variable referencing a DataHubs object.

#include <Core/Dashboard/DataHubs.h>

returnValue = dataHubs_var->asArray();

Return Value

Type | Description
DataHub[] | Returns the current list of all hubs.

Version

Introduced in version April 2021


DataHubs.classType Method

Parent Object: DataHubs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

The number of hubs in this collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Returns the specified hub.

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.itemById Method

Parent Object: DataHubs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

Returns the hub specified using the ID of the hub.

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.
returnValue = dataHubs_var.itemById(id)
"dataHubs_var" is a variable referencing a DataHubs object.

#include <Core/Dashboard/DataHubs.h>

returnValue = dataHubs_var->itemById(id);

Return Value

Type | Description
DataHub | Returns the hub or null if a hub with the specified ID is not found.

Parameters

Name | Type | Description
id | string | The ID of the hub to return. This is the same ID used by the APS Data Management API.

Version

Introduced in version December 2020


DataHubs.objectType Property

Parent Object: DataHubs
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataHubs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


DataObject Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

The DataObject provides access to the raw data that represents a logical entity. Typically, it is the bytes of a stored file, but it can also be something like the image data that could be stored within another file.

Methods

Name | Description
asString | Gets the file as a string (UTF-8). This is convenient when the saved file contains string data. For example, if the file contains JSON data. This eliminates the need to convert the Base64 string into a standard string.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getAsBase64String | Gets the binary data represented by the DataObject as a Base64 encoded string.
saveToFile | Saves the data represented by the DataObject to a 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.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.createThumbnail, DataObjectFuture.dataObject, FlatPatternComponent.createThumbnail

Version

Introduced in version September 2024


DataObject.asString Method

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

Gets the file as a string (UTF-8). This is convenient when the saved file contains string data. For example, if the file contains JSON data. This eliminates the need to convert the Base64 string into a standard string.

Syntax

  • Python
  • C++
"dataObject_var" is a variable referencing a DataObject object.
returnValue = dataObject_var.asString()
"dataObject_var" is a variable referencing a DataObject object.

#include <Core/Dashboard/DataObject.h>

returnValue = dataObject_var->asString();

Return Value

Type | Description
string | Returns the data as a standard (UTF-8) string. Fails with an appropriate error in the case where the data cannot be provided.

Version

Introduced in version September 2024


DataObject.classType Method

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataObject.classType()
This is a static method.

#include <Core/Dashboard/DataObject.h>

returnValue = adsk::core::DataObject::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


DataObject.getAsBase64String Method

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

Gets the binary data represented by the DataObject as a Base64 encoded string.

Syntax

  • Python
  • C++
"dataObject_var" is a variable referencing a DataObject object.
returnValue = dataObject_var.getAsBase64String()
"dataObject_var" is a variable referencing a DataObject object.

#include <Core/Dashboard/DataObject.h>

returnValue = dataObject_var->getAsBase64String();

Return Value

Type | Description
string | Returns the binary data represented by the DataObject as a standard Base64 encoded string. Fails with an appropriate error in the case where the data cannot be provided.

Version

Introduced in version September 2024


DataObject.isValid Property

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dataObject_var" is a variable referencing a DataObject object.

# Get the value of the property.
propertyValue = dataObject_var.isValid
"dataObject_var" is a variable referencing a DataObject object.
#include <Core/Dashboard/DataObject.h>

// Get the value of the property.
boolean propertyValue = dataObject_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


DataObject.objectType Property

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dataObject_var" is a variable referencing a DataObject object.

# Get the value of the property.
propertyValue = dataObject_var.objectType
"dataObject_var" is a variable referencing a DataObject object.
#include <Core/Dashboard/DataObject.h>

// Get the value of the property.
string propertyValue = dataObject_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DataObject.saveToFile Method

Parent Object: DataObject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObject.h>

Description

Saves the data represented by the DataObject to a file.

Syntax

  • Python
  • C++
"dataObject_var" is a variable referencing a DataObject object.
returnValue = dataObject_var.saveToFile(filename)
"dataObject_var" is a variable referencing a DataObject object.

#include <Core/Dashboard/DataObject.h>

returnValue = dataObject_var->saveToFile(filename);

Return Value

Type | Description
boolean | Returns true if the save was successful.

Parameters

Name | Type | Description
filename | string | The full filename to save the file to. This includes the full path and the filename. The folder must already exist and you are responsible for specifying the correct extension to match the file type.

Version

Introduced in version September 2024


DataObjectFuture Object

Derived from: Future Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

Used to check the state of getting data associated with an object where the associated data typically exists on the cloud.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
dataObject | Returns the DataObject when the data has become available, (state returns FinishedFutureState). Returns null if the operation 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
state | Returns the current state of the process associated with this future.

Accessed From

DataFile.dataObject

Version

Introduced in version September 2024


DataObjectFuture.classType Method

Parent Object: DataObjectFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataObjectFuture.classType()
This is a static method.

#include <Core/Dashboard/DataObjectFuture.h>

returnValue = adsk::core::DataObjectFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


DataObjectFuture.dataObject Property

Parent Object: DataObjectFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

Returns the DataObject when the data has become available, (state returns FinishedFutureState). Returns null if the operation is still running or has failed.

Syntax

  • Python
  • C++
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.

# Get the value of the property.
propertyValue = dataObjectFuture_var.dataObject
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.
#include <Core/Dashboard/DataObjectFuture.h>

// Get the value of the property.
Ptr<DataObject> propertyValue = dataObjectFuture_var->dataObject();

Property Value

This is a read only property whose value is a DataObject.

Version

Introduced in version September 2024


DataObjectFuture.isValid Property

Parent Object: DataObjectFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.

# Get the value of the property.
propertyValue = dataObjectFuture_var.isValid
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.
#include <Core/Dashboard/DataObjectFuture.h>

// Get the value of the property.
boolean propertyValue = dataObjectFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


DataObjectFuture.objectType Property

Parent Object: DataObjectFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.

# Get the value of the property.
propertyValue = dataObjectFuture_var.objectType
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.
#include <Core/Dashboard/DataObjectFuture.h>

// Get the value of the property.
string propertyValue = dataObjectFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DataObjectFuture.state Property

Parent Object: DataObjectFuture
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataObjectFuture.h>

Description

Returns the current state of the process associated with this future.

Syntax

  • Python
  • C++
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.

# Get the value of the property.
propertyValue = dataObjectFuture_var.state
"dataObjectFuture_var" is a variable referencing a DataObjectFuture object.
#include <Core/Dashboard/DataObjectFuture.h>

// Get the value of the property.
FutureStates propertyValue = dataObjectFuture_var->state();

Property Value

This is a read only property whose value is a FutureStates.

Version

Introduced in version September 2024


DataProject Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Represents the master branch project within a hub.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 APS 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.asArray, DataProjects.item, DataProjects.itemById, DesignDataFile.parentProject

Version

Introduced in version January 2015


DataProject.classType Method

Parent Object: DataProject
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Returns the unique ID for this project. This is the same id used in the APS Data Management API in an unencoded form and will look something like this: "a.45637".

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Gets and sets the name of the project.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

Description

Returns the parent DataHub of this project.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProject.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Collection object that provides a list of all available projects.

Methods

Name | Description
add | Creates a new project in the parent hub.
asArray | Get the current list of all projects.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
itemById | Returns the project specified using the ID of the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Data.dataProjects, DataHub.dataProjects

Version

Introduced in version January 2015


DataProjects.add Method

Parent Object: DataProjects
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Creates a new project in the parent hub.

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.asArray Method

Parent Object: DataProjects
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Get the current list of all projects.

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.
returnValue = dataProjects_var.asArray()
"dataProjects_var" is a variable referencing a DataProjects object.

#include <Core/Dashboard/DataProjects.h>

returnValue = dataProjects_var->asArray();

Return Value

Type | Description
DataProject[] | Returns the current list of all projects.

Version

Introduced in version April 2021


DataProjects.classType Method

Parent Object: DataProjects
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

The number of projects in this collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Returns the specified project.

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.itemById Method

Parent Object: DataProjects
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

Returns the project specified using the ID of the project.

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.
returnValue = dataProjects_var.itemById(id)
"dataProjects_var" is a variable referencing a DataProjects object.

#include <Core/Dashboard/DataProjects.h>

returnValue = dataProjects_var->itemById(id);

Return Value

Type | Description
DataProject | Returns the project or null if a project with the specified ID is not found.

Parameters

Name | Type | Description
id | string | The ID of the project to return. This is the same ID used by the APS Data Management API.

Version

Introduced in version December 2020


DataProjects.objectType Property

Parent Object: DataProjects
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/DataProjects.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


Decal Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Represents a Decal within a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 decal from the component.
redefine | Redefines the position, orientation, and how the decal is applied to the body. To call this method, you need to position the timeline marker to immediately before this decal. This can be accomplished using the following code: thisDecal.timelineObject.rollTo(True)
saveImage | Saves the image associated with the decal to the specified file. This is useful in cases where the original image file is no longer available but you need the image for some other purpose.

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.
entityToken Returns a token for the Decal object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same Decal.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
faces Gets the faces the decal is associated with. Typically, this is an array containing a single face. If the isChainFaces property is true, this will return the primary face. If the isChainFaces property is false, the decal is limited to the faces in this list.

If multiple faces have been provided, the first face in the list is the primary face, which is used to position and orient the decal.

To set the faces, use the redefine method.
imageFilename Gets and sets the filename of the image used for the decal. When getting this property, the filename returned is the file that was used when the decal was initially created. it's possible the file may no longer exist.

When setting this property, it is the full filename to the image to use for the decal. PNG, JPEG, and TIFF files are supported.
isChainFaces Returns if the decal is limited to a specified set of faces or wraps onto all faces in the body. If this property is True, a single face has been specified and the decal can wrap onto other faces of the body. If False, the decal is limited to the set of specified faces.

To change this setting, use the redefine method.
isLightBulbOn Gets and sets if the light bulb of this decal as displayed in the browser is on or off.

A decal will only be visible if the light bulb is switched on. However, the light bulb can be on and the decal still invisible if the visibility of a higher level occurrence has its light bulb off or if the light bulb for the Decals folder is off to turn off all decals 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.
isVisible | Returns if the decal is currently visible in the graphics window. The isLightBulbOn property of the decal controls if the decal should be displayed or not, but even when true, the decal may not be visible because the occurrence that references the component may not be visible. It's also possible to turn off the visibility of all the decals in a component. This property takes all of that into account when reporting if the decal is visible or not.
name | Gets and sets the name of the decal. This is the name 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity Gets and sets the opacity of the decal where 0 is completely transparent and 1.0 is completely opaque. Setting this property to a value outside the range of 0-1 will result in the value being set to the closest valid value.

Defaults to 1.0 when the input is created.
timelineObject | Returns the timeline object associated with the creation of this decal.
transform Gets the transform of the decal. The returned matrix defines the position, rotation, scaling, and flipping. This is done by providing a 3D matrix which defines a 3D coordinate system in model space. The origin of the matrix defines the center of the decal and must lie somewhere on the first face. The normal of the face defines the Z axis of the matrix and the X and Y axes define the orientation of the decal and must be both perpendicular to the Z axis and to each other. Reversing the direction of the X or Y axis will flip the decal in that direction. The magnitude of the X and Y axes controls the scale and the scale can be non-uniform, meaning the length of the X and Y vectors do not need to be the same.

To set the transform, use the redefine method.

Accessed From

Decal.createForAssemblyContext, Decal.nativeObject, Decals.add, Decals.item, Decals.itemByName

Version

Introduced in version September 2024


Decal.assemblyContext Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

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.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.assemblyContext
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = decal_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2024


Decal.classType Method

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Decal.classType()
This is a static method.

#include <Fusion/Image/Decal.h>

returnValue = adsk::fusion::Decal::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


Decal.createForAssemblyContext Method

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

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.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.
returnValue = decal_var.createForAssemblyContext(occurrence)
"decal_var" is a variable referencing a Decal object.

#include <Fusion/Image/Decal.h>

returnValue = decal_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Decal | 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 2024


Decal.deleteMe Method

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Deletes the decal from the component.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.
returnValue = decal_var.deleteMe()
"decal_var" is a variable referencing a Decal object.

#include <Fusion/Image/Decal.h>

returnValue = decal_var->deleteMe();

Version

Introduced in version September 2024


Decal.entityToken Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Returns a token for the Decal object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same Decal.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.entityToken
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
string propertyValue = decal_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


Decal.faces Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets the faces the decal is associated with. Typically, this is an array containing a single face. If the isChainFaces property is true, this will return the primary face. If the isChainFaces property is false, the decal is limited to the faces in this list.

If multiple faces have been provided, the first face in the list is the primary face, which is used to position and orient the decal.

To set the faces, use the redefine method.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.faces
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = decal_var->faces();

Property Value

This is a read only property whose value is an array of type BRepFace.

Version

Introduced in version September 2024


Decal.imageFilename Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets and sets the filename of the image used for the decal. When getting this property, the filename returned is the file that was used when the decal was initially created. it's possible the file may no longer exist.

When setting this property, it is the full filename to the image to use for the decal. PNG, JPEG, and TIFF files are supported.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.imageFilename

# Set the value of the property.
decal_var.imageFilename = propertyValue
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
string propertyValue = decal_var->imageFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = decal_var->imageFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


Decal.isChainFaces Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Returns if the decal is limited to a specified set of faces or wraps onto all faces in the body. If this property is True, a single face has been specified and the decal can wrap onto other faces of the body. If False, the decal is limited to the set of specified faces.

To change this setting, use the redefine method.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.isChainFaces
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
boolean propertyValue = decal_var->isChainFaces();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Decal.isLightBulbOn Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets and sets if the light bulb of this decal as displayed in the browser is on or off.

A decal will only be visible if the light bulb is switched on. However, the light bulb can be on and the decal still invisible if the visibility of a higher level occurrence has its light bulb off or if the light bulb for the Decals folder is off to turn off all decals in a component.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.isLightBulbOn

# Set the value of the property.
decal_var.isLightBulbOn = propertyValue
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
boolean propertyValue = decal_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = decal_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


Decal.isValid Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.isValid
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
boolean propertyValue = decal_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Decal.isVisible Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Returns if the decal is currently visible in the graphics window. The isLightBulbOn property of the decal controls if the decal should be displayed or not, but even when true, the decal may not be visible because the occurrence that references the component may not be visible. It's also possible to turn off the visibility of all the decals in a component. This property takes all of that into account when reporting if the decal is visible or not.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.isVisible
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
boolean propertyValue = decal_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Decal.name Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets and sets the name of the decal. This is the name seen in the browser and timeline.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.name

# Set the value of the property.
decal_var.name = propertyValue
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
string propertyValue = decal_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = decal_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


Decal.nativeObject Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

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.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.nativeObject
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
Ptr<Decal> propertyValue = decal_var->nativeObject();

Property Value

This is a read only property whose value is a Decal.

Version

Introduced in version September 2024


Decal.objectType Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.objectType
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
string propertyValue = decal_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


Decal.opacity Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets and sets the opacity of the decal where 0 is completely transparent and 1.0 is completely opaque. Setting this property to a value outside the range of 0-1 will result in the value being set to the closest valid value.

Defaults to 1.0 when the input is created.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.opacity

# Set the value of the property.
decal_var.opacity = propertyValue
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
double propertyValue = decal_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = decal_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


Decal.redefine Method

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Redefines the position, orientation, and how the decal is applied to the body.

To call this method, you need to position the timeline marker to immediately before this decal. This can be accomplished using the following code: thisDecal.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.
returnValue = decal_var.redefine(position, faces, isChainFaces)
"decal_var" is a variable referencing a Decal object.

#include <Fusion/Image/Decal.h>

returnValue = decal_var->redefine(position, faces, isChainFaces);

Parameters

Name | Type | Description
position | Matrix3D | Defines the position, rotation, scaling, and flipping of the decal. The input 3D matrix defines a 3D coordinate system in model space. The origin of the matrix defines the center of the decal and must lie somewhere on the first face. The Z-axis of the matrix should be the same as the normal of the face at the origin. The X and Y axes define the orientation of the decal and must be both perpendicular to the Z axis and each other. Reversing the direction of the X or Y axis will flip the decal in that direction. The magnitude of the X and Y axes controls the scale, and the scale can be non-uniform, meaning the length of the X and Y vectors do not need to be the same.
faces | BRepFace[] | Defines the face where the decal will be placed. The first face in the array is the primary face, which is where the position point must be on. If the isChainFaces argument is true, only the primary face is needed and it will be used to define the position and orientation of the decal and the decal can wrap onto all the faces of the body. If the isChainFaces argument is false, the decal can only be applied to the specified faces with the first face in the array being used as the primary face.
isChainFaces | boolean | If true, only one face is needed and the decal wraps onto all the faces of the body. If false, the decal can only be applied to the specified faces with the first face being used to calculate the position and orientation.

Version

Introduced in version September 2024


Decal.saveImage Method

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Saves the image associated with the decal to the specified file. This is useful in cases where the original image file is no longer available but you need the image for some other purpose.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.
returnValue = decal_var.saveImage(filename)
"decal_var" is a variable referencing a Decal object.

#include <Fusion/Image/Decal.h>

returnValue = decal_var->saveImage(filename);

Return Value

Type | Description
boolean | Returns true if writing the file was successful.

Parameters

Name | Type | Description
filename | string | The full filename of the image to save, including the extension of the file, which controls what format the image file will be. If file extension is other than png, jpg or tiff, then by default png extension will be added to the filename. This method will fail if a file with the specified filename already exists. If you want to overwrite the file, you'll need to delete it first before calling this method.

Version

Introduced in version September 2024


Decal.timelineObject Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Returns the timeline object associated with the creation of this decal.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.timelineObject
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = decal_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2024


Decal.transform Property

Parent Object: Decal
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decal.h>

Description

Gets the transform of the decal. The returned matrix defines the position, rotation, scaling, and flipping. This is done by providing a 3D matrix which defines a 3D coordinate system in model space. The origin of the matrix defines the center of the decal and must lie somewhere on the first face. The normal of the face defines the Z axis of the matrix and the X and Y axes define the orientation of the decal and must be both perpendicular to the Z axis and to each other. Reversing the direction of the X or Y axis will flip the decal in that direction. The magnitude of the X and Y axes controls the scale and the scale can be non-uniform, meaning the length of the X and Y vectors do not need to be the same.

To set the transform, use the redefine method.

Syntax

  • Python
  • C++
"decal_var" is a variable referencing a Decal object.

# Get the value of the property.
propertyValue = decal_var.transform
"decal_var" is a variable referencing a Decal object.
#include <Fusion/Image/Decal.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = decal_var->transform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version September 2024


DecalInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

The DecalInput object is used to define the various options when creating a new decal. It's created using the Decals.createInput method and is used by the Decals.add method to create a Decal.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 and sets the faces the decal will be associated with. Typically, this will be an array containing a single face and the isChainFaces property on the input will be true. The position and orientation of the decal is based on this face and the decal can wrap onto other faces in the body.

If the isChainFace property is false, the decal will only be applied to the provided faces where the first face is used to calculate the position and orientation of the decal.
imageFilename Gets and sets the filename of the image used for the decal.

When setting this property, it is the full filename to the image to use for the decal. PNG, JPG, and TIFF files are supported.
isChainFaces Controls if the decal will wrap onto the faces that connect to the face the decal is placed on. When this is true, the list of faces should contain only one face.

Defaults to true when the input is created.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
opacity Gets and sets the opacity of the decal where 0 is completely transparent and 1.0 is completely opaque. Setting this property to a value outside the range of 0-1 will result in the value being set to the closest valid value.

Defaults to 1.0 when the input is created.
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 transform of the decal. This controls the position, rotation, scaling, and flipping. This is done by providing a 3D matrix that defines a 3D coordinate system in model space. The origin of the matrix defines the center of the decal and must lie somewhere on the first face. The Z-axis of the matrix should be the same as the normal of the face at the origin. The X and Y axes define the orientation of the decal and must be both perpendicular to the Z and each other. Reversing the direction of the X or Y axis will flip the decal in that direction. The magnitude of the X and Y axes controls the scale, and the scale can be non-uniform, meaning the length of the X and Y vectors do not need to be the same.

Accessed From

Decals.createInput

Version

Introduced in version September 2024


DecalInput.classType Method

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DecalInput.classType()
This is a static method.

#include <Fusion/Image/DecalInput.h>

returnValue = adsk::fusion::DecalInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


DecalInput.faces Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Gets and sets the faces the decal will be associated with. Typically, this will be an array containing a single face and the isChainFaces property on the input will be true. The position and orientation of the decal is based on this face and the decal can wrap onto other faces in the body.

If the isChainFace property is false, the decal will only be applied to the provided faces where the first face is used to calculate the position and orientation of the decal.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.faces

# Set the value of the property.
decalInput_var.faces = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = decalInput_var->faces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = decalInput_var->faces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version September 2024


DecalInput.imageFilename Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Gets and sets the filename of the image used for the decal.

When setting this property, it is the full filename to the image to use for the decal. PNG, JPG, and TIFF files are supported.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.imageFilename

# Set the value of the property.
decalInput_var.imageFilename = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
string propertyValue = decalInput_var->imageFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = decalInput_var->imageFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


DecalInput.isChainFaces Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Controls if the decal will wrap onto the faces that connect to the face the decal is placed on. When this is true, the list of faces should contain only one face.

Defaults to true when the input is created.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.isChainFaces

# Set the value of the property.
decalInput_var.isChainFaces = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
boolean propertyValue = decalInput_var->isChainFaces();

// Set the value of the property, where value_var is a boolean.
bool returnValue = decalInput_var->isChainFaces(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


DecalInput.isValid Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.isValid
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
boolean propertyValue = decalInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


DecalInput.objectType Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.objectType
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
string propertyValue = decalInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DecalInput.opacity Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Gets and sets the opacity of the decal where 0 is completely transparent and 1.0 is completely opaque. Setting this property to a value outside the range of 0-1 will result in the value being set to the closest valid value.

Defaults to 1.0 when the input is created.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.opacity

# Set the value of the property.
decalInput_var.opacity = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
double propertyValue = decalInput_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = decalInput_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


DecalInput.targetBaseFeature Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

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.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.targetBaseFeature

# Set the value of the property.
decalInput_var.targetBaseFeature = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = decalInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = decalInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version September 2024


DecalInput.transform Property

Parent Object: DecalInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/DecalInput.h>

Description

Gets and sets the transform of the decal. This controls the position, rotation, scaling, and flipping. This is done by providing a 3D matrix that defines a 3D coordinate system in model space. The origin of the matrix defines the center of the decal and must lie somewhere on the first face. The Z-axis of the matrix should be the same as the normal of the face at the origin. The X and Y axes define the orientation of the decal and must be both perpendicular to the Z and each other. Reversing the direction of the X or Y axis will flip the decal in that direction. The magnitude of the X and Y axes controls the scale, and the scale can be non-uniform, meaning the length of the X and Y vectors do not need to be the same.

Syntax

  • Python
  • C++
"decalInput_var" is a variable referencing a DecalInput object.

# Get the value of the property.
propertyValue = decalInput_var.transform

# Set the value of the property.
decalInput_var.transform = propertyValue
"decalInput_var" is a variable referencing a DecalInput object.
#include <Fusion/Image/DecalInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = decalInput_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = decalInput_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2024


Decals Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Provides access to the Decals in a component and provides the functionality to add new Decals.

Methods

Name | Description
add | Creates a new decal. Use the createInput method to first create an input object and set the available options. Then, pass that input object to the add method to create the decal.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 DecalInput object. A DecalInput object is the logical equivalent to the Decal command dialog by providing access to all the decal options. Passing in the DecalInput object to the add method is the equivalent of clicking the OK button on the dialog to create the decal.
item | Returns the specified Decal object using an index into the collection.
itemByName | Returns the specified decal using the name of the decal.

Properties

Name | Description
count | Returns the number of decals in the 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.decals, Component.decals, FlatPatternComponent.decals

Version

Introduced in version September 2024


Decals.add Method

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Creates a new decal. Use the createInput method to first create an input object and set the available options. Then, pass that input object to the add method to create the decal.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.
returnValue = decals_var.add(input)
"decals_var" is a variable referencing a Decals object.

#include <Fusion/Image/Decals.h>

returnValue = decals_var->add(input);

Return Value

Type | Description
Decal | Returns the newly created Decal object.

Parameters

Name | Type | Description
input | DecalInput | The DecalInput object that defines the required information needed to create a new decal. A DecalInput object is the logical equivalent to the Decal command dialog by providing access to all the decal options. Passing in the DecalInput object to the add method is the equivalent of clicking the OK button on the dialog to create the decal.

Version

Introduced in version September 2024


Decals.classType Method

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Decals.classType()
This is a static method.

#include <Fusion/Image/Decals.h>

returnValue = adsk::fusion::Decals::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


Decals.count Property

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Returns the number of decals in the component.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.

# Get the value of the property.
propertyValue = decals_var.count
"decals_var" is a variable referencing a Decals object.
#include <Fusion/Image/Decals.h>

// Get the value of the property.
uinteger propertyValue = decals_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


Decals.createInput Method

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Creates a new DecalInput object. A DecalInput object is the logical equivalent to the Decal command dialog by providing access to all the decal options. Passing in the DecalInput object to the add method is the equivalent of clicking the OK button on the dialog to create the decal.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.
returnValue = decals_var.createInput(imageFilename, faces, point)
"decals_var" is a variable referencing a Decals object.

#include <Fusion/Image/Decals.h>

returnValue = decals_var->createInput(imageFilename, faces, point);

Return Value

Type | Description
DecalInput | Returns a DecalInput object or null in the case of failure.

Parameters

Name | Type | Description
imageFilename | string | The full filename to the image to use for the decal. PNG, JPEG, and TIFF files are supported.
faces | BRepFace[] | Specifies the faces the decal will be associated with. Typically, this will be an array containing a single face. If the isChainFaces property on the input is true, only a single face is needed, and the rest of the faces in the body will automatically be used. If the isChainFaces property is false, this defines a subset of faces in the body to which the decal will be applied. If multiple faces are provided, the first face in the array is used to position and orient the decal. The position and orientation are relative to the first face. Any additional faces should connect directly or indirectly through other connected faces to the first face.
point | Point3D | Specifies a point on the first face that defines the center position of the decal.

Version

Introduced in version September 2024


Decals.isValid Property

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.

# Get the value of the property.
propertyValue = decals_var.isValid
"decals_var" is a variable referencing a Decals object.
#include <Fusion/Image/Decals.h>

// Get the value of the property.
boolean propertyValue = decals_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Decals.item Method

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Returns the specified Decal object using an index into the collection.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.
returnValue = decals_var.item(index)
"decals_var" is a variable referencing a Decals object.

#include <Fusion/Image/Decals.h>

returnValue = decals_var->item(index);

Return Value

Type | Description
Decal | 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 2024


Decals.itemByName Method

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

Returns the specified decal using the name of the decal.

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.
returnValue = decals_var.itemByName(name)
"decals_var" is a variable referencing a Decals object.

#include <Fusion/Image/Decals.h>

returnValue = decals_var->itemByName(name);

Return Value

Type | Description
Decal | Returns the specified Decal object, if it exists. Otherwise it returns null.

Parameters

Name | Type | Description
name | string | The name of the decal as seen in the browser and timeline.

Version

Introduced in version September 2024


Decals.objectType Property

Parent Object: Decals
Defined in namespace "adsk::fusion" and the header file is <Fusion/Image/Decals.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"decals_var" is a variable referencing a Decals object.

# Get the value of the property.
propertyValue = decals_var.objectType
"decals_var" is a variable referencing a Decals object.
#include <Fusion/Image/Decals.h>

// Get the value of the property.
string propertyValue = decals_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DefaultUnitsPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferences.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DefaultUnitsPreferencesCollection.item, DefaultUnitsPreferencesCollection.itemByName

Derived Classes

FusionDefaultUnitsPreferences

Version

Introduced in version August 2014


DefaultUnitsPreferences.classType Method

Parent Object: DefaultUnitsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferences.h>

Description

Returns the name of this DefaultUnitPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

A collection that provides access to product specific unit preference objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.defaultUnitsPreferences

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.classType Method

Parent Object: DefaultUnitsPreferencesCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

Returns the number of DefaultUnitsPreference objects.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

Function that returns the specified DefaultUnitPreferences object using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

Returns the DefaultUnitsPreference object with the specified name.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DefaultUnitsPreferencesCollection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
deletedFaces Gets and sets the set of faces that are deleted by this feature.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Setting this property can fail if Fusion is unable to heal the body after deleting the specified faces.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Gets and sets the set of faces that are deleted by this feature.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Setting this property can fail if Fusion is unable to heal the body after deleting the specified faces.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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.entityToken Property

Parent Object: DeleteFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.entityToken
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = deleteFaceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


DeleteFaceFeature.errorOrWarningMessage Property

Parent Object: DeleteFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.deleteFaceFeatures

Version

Introduced in version August 2016


DeleteFaceFeatures.add Method

Parent Object: DeleteFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

The number of DeleteFaceFeature objects in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

Function that returns the specified DeleteFaceFeature object using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

Function that returns the specified DeleteFaceFeature object using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DeleteFaceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Object that represents an open Fusion design. This derives from the Product base class and adds the Fusion functionality specific to a Design.

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().
computeAll | Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.
createConfiguredDesign | Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.
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 flexible 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.
findEntityByToken | Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.
modifyParameters | Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.
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.
analyses | Gets the collection of design analyses associated with this design.
appearances | Returns the appearances contained in this document.
attributes | Returns the collection of attributes associated with this product.
configurationRowId | Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.
configurationTopTable | If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.
contactSets | Returns the contact sets associated with this design.
designPlasticRules | Gets the collection of plastic rules in the design.
designSheetMetalRules | Gets the collection of sheet metal rules in the design.
designType | Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.
isConfiguration | Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.
isConfiguredDesign | Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.
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 component 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.
libraryPlasticRules | Gets the collection of plastic rules in the plastic rule library.
librarySheetMetalRules | Gets the collection of sheet metal rules in the sheet metal rule library.
materials | Returns the materials contained in this document.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
renderManager | Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.
rootComponent | Returns the root Component.
rootDataComponent | Preview Get the root DataComponent in this design. This is only available for top level designs.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
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, FlatPatternComponent.parentDesign, FusionDocument.design, FusionUnitsManager.design, PlasticRule.parentDesign, SheetMetalRule.parentDesign, UserParameter.design, UserParameters.design

Derived Classes

FlatPatternProduct, WorkingModel

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the component that is current being edited. This can return the root component or another component within the design.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the Components collection that provides access to existing components in a design.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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 API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Design.analyses Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets the collection of design analyses associated with this design.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.analyses
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Analyses> propertyValue = design_var->analyses();

Property Value

This is a read only property whose value is an Analyses.

Version

Introduced in version January 2023


Design.analyzeInterference Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Calculates the interference between the input bodies and/or occurrences.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the appearances contained in this document.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


Design.areaProperties Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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 CalculationAccuracy.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the collection of attributes associated with this product.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.computeAll Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.computeAll()
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->computeAll();

Return Value

Type | Description
boolean | Returns true if the compute completed. This doesn't indicate if all the items in the timeline successfully computed or not. You need to check the health state of each item in the timeline to determine if everything successfully computed or not.

Version

Introduced in version December 2020


Design.configurationRowId Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.configurationRowId
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
string propertyValue = design_var->configurationRowId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


Design.configurationTopTable Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.configurationTopTable
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<ConfigurationTopTable> propertyValue = design_var->configurationTopTable();

Property Value

This is a read only property whose value is a ConfigurationTopTable.

Version

Introduced in version January 2024


Design.contactSets Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the contact sets associated with this design.

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.createConfiguredDesign Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.createConfiguredDesign()
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->createConfiguredDesign();

Return Value

Type | Description
ConfigurationTopTable | Returns the ConfigurationTable that defines the configurations for this design.

Version

Introduced in version January 2024


Design.createInterferenceInput Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Deletes the specified set of entities that are associated with this product.

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.designPlasticRules Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets the collection of plastic rules in the design.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.designPlasticRules
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = design_var->designPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


Design.designSheetMetalRules Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets the collection of sheet metal rules in the design.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.designSheetMetalRules
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = design_var->designSheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version November 2022


Design.designType Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the ExportManager for this design. You use the ExportManager to export the current design in various formats.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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 flexible 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.

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.findEntityByToken Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.findEntityByToken(entityToken)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->findEntityByToken(entityToken);

Return Value

Type | Description
Base[] | Returns an array of entities associated with the provided token, or an empty array in the case where there are no matches.

Parameters

Name | Type | Description
entityToken | string | The input entity token you want to find the matching entity for.

Version

Introduced in version September 2020


Design.fusionUnitsManager Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns a specialized UnitsManager that can set the default length units and work with parameters.

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.isConfiguration Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isConfiguration
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isConfiguration();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


Design.isConfiguredDesign Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isConfiguredDesign
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isConfiguredDesign();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


Design.isContactAnalysisEnabled Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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 component in the browser. To activate the root component use the ActivateRootComponent method.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.libraryPlasticRules Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets the collection of plastic rules in the plastic rule library.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.libraryPlasticRules
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = design_var->libraryPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


Design.librarySheetMetalRules Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Gets the collection of sheet metal rules in the sheet metal rule library.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.librarySheetMetalRules
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = design_var->librarySheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version November 2022


Design.materials Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the materials contained in this document.

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.modifyParameters Method

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.modifyParameters(parameters, values)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->modifyParameters(parameters, values);

Return Value

Type | Description
boolean | Returns true if setting all of the parameters was successful. Setting multiple parameters is either all or none. If it fails to set any parameters, none of them are updated, and the method will return false.

Parameters

Name | Type | Description
parameters | Parameter[] | An array of UserParameter and ModelParameter objects that you want to change the value. The parameters must all exist within the Design object you're calling this method from. They can be in any component but must be local components owned by the Design.
values ValueInput[] An array of ValueInput objects that defines the new value for each parameter defined by the "parameters" argument. This array must be the same size as the array used for the "parameters" argument, and the items in the arrays are used in the order they exist within the arrays. For example, the parameter at index 0 will use the value at index 0.

If you use the createByString method to create the ValueInput, the expression of the parameter will be edited, and the effect is the same as interactively editing the expression.When you set the expression, you can include units, references to other parameters, and math operators and functions.For example, "(Length / 3) * cos(Angle)" is a valid expression for a distance parameter if the parameters "Length" and "Angle" already exist.

If you use the createByReal method, the value is assigned directly and is always in the internal units for the unit type associated with the parameter.For example, if the parameter is a length, the value will ALWAYS be used as centimeters. If the parameter is an angle, the value will ALWAYS be used as radians.This is because the default design unit types for length are ignored, and internal units are ALWAYS used.

Version

Introduced in version September 2022


Design.namedViews Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.namedViews
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = design_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version September 2023


Design.objectType Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the parent Document object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc for a collection of 3D solid objects.

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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version May 2016


Design.productType Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

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.

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.renderManager Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.renderManager
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<RenderManager> propertyValue = design_var->renderManager();

Property Value

This is a read only property whose value is a RenderManager.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


Design.rootComponent Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the root Component.

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.rootDataComponent Property

Parent Object: Design

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Get the root DataComponent in this design. This is only available for top level designs.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.rootDataComponent
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = design_var->rootDataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


Design.selectionSets Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.selectionSets
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = design_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version May 2022


Design.snapshots Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the timeline associated with this design.

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.
Fillet Feature Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


Design.unitsManager Property

Parent Object: Design
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the UnitsManager object associated with this product.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the collection of User Parameters in a design

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Design.h>

Description

Returns the workspaces associated with this product.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Represents a command input that gets a direction from the user. This displays a button or a check-box 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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
setManipulator | Defines a direction manipulator arrow in the graphics viewport whose direction can be flipped by the toggling the check box, 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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
resourceFolder | Gets and sets the folder that contains the icon to display on the button. The input is shown as a check box if the resource folder is set to an empty string. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: DirectionCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
returnValue = directionCommandInput_var.deleteMe()
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

#include <Core/UserInterface/DirectionCommandInput.h>

returnValue = directionCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


DirectionCommandInput.id Property

Parent Object: DirectionCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the direction of the manipulator (arrow) in the model space of the root component. To set the direction use the setManipulator method.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Gets and sets the folder that contains the icon to display on the button. The input is shown as a check box if the resource folder is set to an empty string. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

Description

Defines a direction manipulator arrow in the graphics viewport whose direction can be flipped by the toggling the check box, clicking the button or by the user clicking and dragging on the manipulator arrow.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DirectionCommandInput.h>

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.

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


DistanceAndAngleChamferEdgeSet Object

Derived from: ChamferEdgeSet Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Provides access to the edges and the parameter associated with a chord length fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 chamfer edge set from the chamfer. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
angle | Returns the model parameter that controls the angle of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.
distance | Returns the model parameter that controls the offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.
edges Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isFlipped Gets and sets if the chamfer is flipped. This swaps the directions for distance one and two.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | Gets and sets the Tangent chain for chamfer. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.angle Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Returns the model parameter that controls the angle of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.angle
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = distanceAndAngleChamferEdgeSet_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.classType Method

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DistanceAndAngleChamferEdgeSet.classType()
This is a static method.

#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

returnValue = adsk::fusion::DistanceAndAngleChamferEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.deleteMe Method

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Deletes the chamfer edge set from the chamfer.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
returnValue = distanceAndAngleChamferEdgeSet_var.deleteMe()
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

returnValue = distanceAndAngleChamferEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.distance Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Returns the model parameter that controls the offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.distance
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = distanceAndAngleChamferEdgeSet_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.edges Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.edges

# Set the value of the property.
distanceAndAngleChamferEdgeSet_var.edges = propertyValue
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = distanceAndAngleChamferEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = distanceAndAngleChamferEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.isFlipped Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Gets and sets if the chamfer is flipped. This swaps the directions for distance one and two.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.isFlipped

# Set the value of the property.
distanceAndAngleChamferEdgeSet_var.isFlipped = propertyValue
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = distanceAndAngleChamferEdgeSet_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceAndAngleChamferEdgeSet_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.isTangentChain Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Gets and sets the Tangent chain for chamfer. This enables tangent chain option for chamfer.

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.isTangentChain

# Set the value of the property.
distanceAndAngleChamferEdgeSet_var.isTangentChain = propertyValue
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = distanceAndAngleChamferEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceAndAngleChamferEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


DistanceAndAngleChamferEdgeSet.isValid Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.isValid
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = distanceAndAngleChamferEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DistanceAndAngleChamferEdgeSet.objectType Property

Parent Object: DistanceAndAngleChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferEdgeSet_var.objectType
"distanceAndAngleChamferEdgeSet_var" is a variable referencing a DistanceAndAngleChamferEdgeSet object.
#include <Fusion/Features/DistanceAndAngleChamferEdgeSet.h>

// Get the value of the property.
string propertyValue = distanceAndAngleChamferEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DistanceAndAngleChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Provides information to create a chamfer that is defined by a distance from the edge and an angle.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.angle Property

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

Returns the parameter controlling the angle. You can edit the angle by editing the value of the parameter object.

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 March 2022


DistanceAndAngleChamferTypeDefinition.classType Method

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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 March 2022


DistanceAndAngleChamferTypeDefinition.distance Property

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

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 March 2022


DistanceAndAngleChamferTypeDefinition.isValid Property

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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 March 2022


DistanceAndAngleChamferTypeDefinition.objectType Property

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 March 2022


DistanceAndAngleChamferTypeDefinition.parentFeature Property

Parent Object: DistanceAndAngleChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

Description

Returns the feature that owns this chamfer type definition

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 March 2022


DistanceExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

Description

Statically creates a new DistanceExtentDefinition object. This is used as input when defining the extents of a feature to be a specified distance.

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.
extrudeFeatures.add using setOneSideExtent | Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DistanceExtentDefinition.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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 meaningful 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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: DistanceValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
returnValue = distanceValueCommandInput_var.deleteMe()
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

#include <Core/UserInterface/DistanceValueCommandInput.h>

returnValue = distanceValueCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


DistanceValueCommandInput.expression Property

Parent Object: DistanceValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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 meaningful when the hasMaximumValue property returns True.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the positive direction of the manipulator in the model space or the root component. To set the direction use the setManipulator method.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the origin point of the manipulator in the model space of the root component. To set the origin use the setManipulator method.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DistanceValueCommandInput.h>

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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Object that represents an open document. This is the base class for all document types.

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.
saveMilestone | Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.
updateAllReferences | Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

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.
creationId Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original 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 external 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 This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent Application object.
products | Returns the products associated with this document.
version | Returns the Fusion 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, Drawing.parentDocument, FlatPatternProduct.parentDocument, ImportManager.importToNewDocument, MFGDMDataEventArgs.document, Product.parentDocument, Viewport.parentDocument, WorkingModel.parentDocument

Derived Classes

DrawingDocument, 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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Causes this document to become the active document in the user interface.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns the collection of attributes associated with this document.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Closes this document.

Remarks

Closing a document is not supported within any of the Command related events. When a command is running, a transaction is open, and creating and closing documents cannot be transacted and, as a result, cannot be contained within a command transaction.

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 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.
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version November 2014


Document.creationId Property

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original document.

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.creationId
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
string propertyValue = document_var->creationId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


Document.dataFile Property

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Gets the DataFile that represents this document in A360.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns a collection containing the documents directly referenced by this document.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Gets if this document is the active document in the user interface.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Property that indicates if the document has been modified since it was last saved.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Indicates if any external 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Gets if a currently open document is open as visible.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns the parent Application object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns the products associated with this document.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version August 2014


Document.save Method

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

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 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.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version March 2015


Document.saveMilestone Method

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.saveMilestone(milestoneName, versionDescription)
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->saveMilestone(milestoneName, versionDescription);

Return Value

Type | Description
boolean | Returns true if saving the document as a milestone was successful.

Parameters

Name | Type | Description
milestoneName | string | The name of the milestone as seen in the data panel and Fusion web client. If an empty string is provided a default name will be used.
versionDescription | string | The description associated with the version. If an empty string is provided, a default description will be used.

Version

Introduced in version March 2024


Document.updateAllReferences Method

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.updateAllReferences()
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->updateAllReferences();

Version

Introduced in version September 2022


Document.version Property

Parent Object: Document
Defined in namespace "adsk::core" and the header file is <Core/Application/Document.h>

Description

Returns the Fusion version this document was last saved with.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

A DocumentEvent represents a document related event. For example, DocumentOpening or DocumentOpened.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

Add a handler to be notified when the file event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
cancelReason | Gets and sets the description of the reason why the operation is being canceled. This property is only used if isOperationCancelled is set to true.
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.
isOperationCancelled | Gets and sets if the operation for this event is to be canceled. The description of the reason for canceling the operation can be set with the cancelReason property. This is only supported for the documentSaving 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


DocumentEventArgs.cancelReason Property

Parent Object: DocumentEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

Gets and sets the description of the reason why the operation is being canceled. This property is only used if isOperationCancelled is set to true.

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.cancelReason

# Set the value of the property.
documentEventArgs_var.cancelReason = propertyValue
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
string propertyValue = documentEventArgs_var->cancelReason();

// Set the value of the property, where value_var is a string.
bool returnValue = documentEventArgs_var->cancelReason(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


DocumentEventArgs.classType Method

Parent Object: DocumentEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

The full path to the file.

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.isOperationCancelled Property

Parent Object: DocumentEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

Gets and sets if the operation for this event is to be canceled. The description of the reason for canceling the operation can be set with the cancelReason property. This is only supported for the documentSaving event.

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.isOperationCancelled

# Set the value of the property.
documentEventArgs_var.isOperationCancelled = propertyValue
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
boolean propertyValue = documentEventArgs_var->isOperationCancelled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = documentEventArgs_var->isOperationCancelled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


DocumentEventArgs.isValid Property

Parent Object: DocumentEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventHandler.h>

Description

The DocumentEventHandler is a client implemented class that can be added as a handler to a DocumentEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version August 2014


DocumentEventHandler.notify Method

Parent Object: DocumentEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"documentEventHandler_var" is a variable referencing a DocumentEventHandler object.
returnValue = documentEventHandler_var.notify(eventArgs)
"documentEventHandler_var" is a variable referencing a DocumentEventHandler object.

#include <Core/Application/DocumentEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Represents a reference to a document from another document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentDocument | The document that is doing the referencing and owns this reference.
referencedDocument | The document currently open in Fusion 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 occurrences referencing this document to update to that version.

Accessed From

DocumentReferences.item, Occurrence.documentReference

Version

Introduced in version June 2017


DocumentReference.classType Method

Parent Object: DocumentReference
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

The dataFile on A360 that this object references.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Updates the reference to use the latest version. This is only useful when the isOutOfDate property is true.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Indicates if this reference is out of date, meaning that the reference is not referencing the latest version.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

The document that is doing the referencing and owns this reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

The document currently open in Fusion that this object references.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReference.h>

Description

Gets and sets the version of the dataFile on A360 that this document currently represents. Setting this property will cause all occurrences referencing this document to update to that version.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

Provides access to the list of documents referenced from a document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Document.allDocumentReferences, Document.documentReferences, DrawingDocument.allDocumentReferences, DrawingDocument.documentReferences, FusionDocument.allDocumentReferences, FusionDocument.documentReferences

Version

Introduced in version June 2017


DocumentReferences.classType Method

Parent Object: DocumentReferences
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

The number of DocumentReference objects in this collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

Returns the specified DocumentReference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DocumentReferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

The Documents object provides access to all of the currently open documents and provides methods to create and open documents.

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 documents. This includes documents that are visible and invisible.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Creates and opens a new document of the specified type.

Remarks

Creating a document is not supported within any of the Command related events. When a command is running, a transaction is open, and creating and closing documents cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Returns the number of currently open documents. This includes documents that are visible and invisible.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Function that returns the specified document using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Documents.h>

Description

Opens an item that has previously been saved.

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. This is an optional argument whose default value is True.

Version

Introduced in version March 2015


DocumentStockMaterialLibrary Object

DocumentStockMaterialLibrary Object Preview

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

DocumentStockMaterialLibrary provides access to stock materials used by the document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Get StockMaterial by index in DocumentStockMaterialLibrary.
setupsByStockMaterial | Returns all setups that use the given StockMaterial. The StockMaterial must exist in the document StockMaterial library. Raises an error if the StockMaterial is not in the document.
update | Update the given StockMaterial in the document StockMaterial library. The update applies all changes to the stockMaterial in the document stockMaterial library and therefore on all setups that use the stockMaterial. Will error if the stockMaterial does not exist in the document stockMaterial library.

Properties

Name | Description
count | The number of StockMaterial in the DocumentStockMaterialLibrary.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.documentStockMaterialLibrary

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.classType Method

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.DocumentStockMaterialLibrary.classType()
This is a static method.

#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

returnValue = adsk::cam::DocumentStockMaterialLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.count Property

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

The number of StockMaterial in the DocumentStockMaterialLibrary.

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

# Get the value of the property.
propertyValue = documentStockMaterialLibrary_var.count
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

// Get the value of the property.
uinteger propertyValue = documentStockMaterialLibrary_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.isValid Property

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

# Get the value of the property.
propertyValue = documentStockMaterialLibrary_var.isValid
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

// Get the value of the property.
boolean propertyValue = documentStockMaterialLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.item Method

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

Get StockMaterial by index in DocumentStockMaterialLibrary.

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
returnValue = documentStockMaterialLibrary_var.item(index)
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

returnValue = documentStockMaterialLibrary_var->item(index);

Return Value

Type | Description
StockMaterial | Returns the StockMaterial in the DocumentStockMaterialLibrary by given index.

Parameters

Name | Type | Description
index | uinteger | Index of the StockMaterial in the DocumentStockMaterialLibrary.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.objectType Property

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

# Get the value of the property.
propertyValue = documentStockMaterialLibrary_var.objectType
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

// Get the value of the property.
string propertyValue = documentStockMaterialLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.setupsByStockMaterial Method

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

Returns all setups that use the given StockMaterial. The StockMaterial must exist in the document StockMaterial library. Raises an error if the StockMaterial is not in the document.

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
returnValue = documentStockMaterialLibrary_var.setupsByStockMaterial(stockMaterial)
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

returnValue = documentStockMaterialLibrary_var->setupsByStockMaterial(stockMaterial);

Return Value

Type | Description
Setup[] | Returns setups using a specific StockMaterial.

Parameters

Name | Type | Description
stockMaterial | StockMaterial | The StockMaterial to search for setups. The StockMaterial must exist in the document.

Version

Introduced in version September 2024


DocumentStockMaterialLibrary.update Method

Parent Object: DocumentStockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

Description

Update the given StockMaterial in the document StockMaterial library. The update applies all changes to the stockMaterial in the document stockMaterial library and therefore on all setups that use the stockMaterial. Will error if the stockMaterial does not exist in the document stockMaterial library.

Syntax

  • Python
  • C++
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.
returnValue = documentStockMaterialLibrary_var.update(stockMaterial)
"documentStockMaterialLibrary_var" is a variable referencing a DocumentStockMaterialLibrary object.

#include <Cam/StockMaterials/DocumentStockMaterialLibrary.h>

returnValue = documentStockMaterialLibrary_var->update(stockMaterial);

Return Value

Type | Description
boolean | Returns true if the update was successful.

Parameters

Name | Type | Description
stockMaterial | StockMaterial | The StockMaterial that should be updated.

Version

Introduced in version September 2024


DocumentToolLibrary Object

Derived from: ToolLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

DocumentToolLibrary provides access to tools used by the document. It supports adding, updating and deleting tools in the document tool library.

Methods

Name | Description
add | Inserts a Tool at the end of the ToolLibrary.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createEmpty | Creates an empty ToolLibrary.
createFromJson | Creates a ToolLibrary by given JSON-string. Raises an error if the given JSON is invalid.
createQuery | Creates a new ToolQuery that is used to query the library for tools matching the query.
item | Get Tool by index in ToolLibrary.
operationsByTool | Returns all operations that use the given tool. The tool must exist in the document tool library. Raises an error if the tool is not in the document.
remove | Remove Tool by index from ToolLibrary.
toJson | Generate and return JSON string that contains all tools of that list.
toolsBySetupOrFolder | Preview Returns all tools used in a given setup or folder. Given setup or folder must belong to the document of the DocumentToolLibrary. Raises an error if given operation is not in the document.
update | Update the given tool in the document tool library. The update applies all changes to the tool in the document tool library and therefore on all operations that use the tool. Will error if the tool does not exist in the document tool library.

Properties

Name | Description
count | The number of tools in the ToolLibrary.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.documentToolLibrary

Version

Introduced in version April 2023


DocumentToolLibrary.add Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Inserts a Tool at the end of the ToolLibrary.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.add(tool)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->add(tool);

Return Value

Type | Description
boolean | Returns true for successful insertion, false otherwise

Parameters

Name | Type | Description
tool | Tool | The Tool that should be added.

Version

Introduced in version April 2023


DocumentToolLibrary.classType Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.DocumentToolLibrary.classType()
This is a static method.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = adsk::cam::DocumentToolLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


DocumentToolLibrary.count Property

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

The number of tools in the ToolLibrary.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

# Get the value of the property.
propertyValue = documentToolLibrary_var.count
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
#include <Cam/Tools/DocumentToolLibrary.h>

// Get the value of the property.
uinteger propertyValue = documentToolLibrary_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


DocumentToolLibrary.createEmpty Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Creates an empty ToolLibrary.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.DocumentToolLibrary.createEmpty()
This is a static method.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = adsk::cam::DocumentToolLibrary::createEmpty();

Return Value

Type | Description
ToolLibrary | Returns the newly created ToolLibrary.

Version

Introduced in version April 2023


DocumentToolLibrary.createFromJson Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Creates a ToolLibrary by given JSON-string. Raises an error if the given JSON is invalid.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.DocumentToolLibrary.createFromJson(json)
This is a static method.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = adsk::cam::DocumentToolLibrary::createFromJson(json);

Return Value

Type | Description
ToolLibrary | Returns the newly created ToolLibrary.

Parameters

Name | Type | Description
json | string | The JSON contains all tools that should be added to the new ToolLibrary

Version

Introduced in version April 2023


DocumentToolLibrary.createQuery Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Creates a new ToolQuery that is used to query the library for tools matching the query.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.createQuery()
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->createQuery();

Return Value

Type | Description
ToolQuery | Returns a new ToolQuery. The query is predefined by given parameter.

Version

Introduced in version April 2023


DocumentToolLibrary.isValid Property

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

# Get the value of the property.
propertyValue = documentToolLibrary_var.isValid
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
#include <Cam/Tools/DocumentToolLibrary.h>

// Get the value of the property.
boolean propertyValue = documentToolLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


DocumentToolLibrary.item Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Get Tool by index in ToolLibrary.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.item(index)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->item(index);

Return Value

Type | Description
Tool | Returns the Tool in the ToolLibrary by given index.

Parameters

Name | Type | Description
index | uinteger | Index of the Tool in the ToolLibrary.

Version

Introduced in version April 2023


DocumentToolLibrary.objectType Property

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

# Get the value of the property.
propertyValue = documentToolLibrary_var.objectType
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
#include <Cam/Tools/DocumentToolLibrary.h>

// Get the value of the property.
string propertyValue = documentToolLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


DocumentToolLibrary.operationsByTool Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Returns all operations that use the given tool. The tool must exist in the document tool library. Raises an error if the tool is not in the document.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.operationsByTool(tool)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->operationsByTool(tool);

Return Value

Type | Description
Operation[] | Returns operations using a specific tool.

Parameters

Name | Type | Description
tool | Tool | The tool to search for in operations. The tool must exist in the document.

Version

Introduced in version April 2023


DocumentToolLibrary.remove Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Remove Tool by index from ToolLibrary.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.remove(index)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->remove(index);

Return Value

Type | Description
boolean | Returns true for successful deletion, false otherwise

Parameters

Name | Type | Description
index | uinteger | Index of the Tool in the ToolLibrary that should be removed.

Version

Introduced in version April 2023


DocumentToolLibrary.toJson Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Generate and return JSON string that contains all tools of that list.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.toJson()
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->toJson();

Return Value

Type | Description
string | Returns JSON string that contains all tools of that list.

Version

Introduced in version April 2023


DocumentToolLibrary.toolsBySetupOrFolder Method

Parent Object: DocumentToolLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Returns all tools used in a given setup or folder. Given setup or folder must belong to the document of the DocumentToolLibrary. Raises an error if given operation is not in the document.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.toolsBySetupOrFolder(setupOrFolder)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->toolsBySetupOrFolder(setupOrFolder);

Return Value

Type | Description
Tool[] | Returns tools used by a specific setup or folder.

Parameters

Name | Type | Description
setupOrFolder | OperationBase | The setup or folder to get tools from. Must belong to the document.

Version

Introduced in version July 2023


DocumentToolLibrary.update Method

Parent Object: DocumentToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/DocumentToolLibrary.h>

Description

Update the given tool in the document tool library. The update applies all changes to the tool in the document tool library and therefore on all operations that use the tool. Will error if the tool does not exist in the document tool library.

Syntax

  • Python
  • C++
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.
returnValue = documentToolLibrary_var.update(tool, updateFeedAndSpeed)
"documentToolLibrary_var" is a variable referencing a DocumentToolLibrary object.

#include <Cam/Tools/DocumentToolLibrary.h>

returnValue = documentToolLibrary_var->update(tool, updateFeedAndSpeed);

Return Value

Type | Description
boolean | Returns true if the update was successful.

Parameters

Name | Type | Description
tool | Tool | The tool that should be updated.
updateFeedAndSpeed | boolean | Setting updateFeedAndSpeed to true will override the feed and speed parameters of operations within the document which use the given tool.

Version

Introduced in version April 2023


DraftAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

Provides access to any draft analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified DraftAnalysis object using an index into the collection.
itemByName | A method that returns the specified DraftAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of DraftAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.draftAnalyses

Version

Introduced in version January 2023


DraftAnalyses.classType Method

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DraftAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/DraftAnalyses.h>

returnValue = adsk::fusion::DraftAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


DraftAnalyses.count Property

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

Returns the number of DraftAnalysis objects in the collection.

Syntax

  • Python
  • C++
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.

# Get the value of the property.
propertyValue = draftAnalyses_var.count
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.
#include <Fusion/Fusion/DraftAnalyses.h>

// Get the value of the property.
uinteger propertyValue = draftAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


DraftAnalyses.isValid Property

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.

# Get the value of the property.
propertyValue = draftAnalyses_var.isValid
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.
#include <Fusion/Fusion/DraftAnalyses.h>

// Get the value of the property.
boolean propertyValue = draftAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


DraftAnalyses.item Method

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

A method that returns the specified DraftAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.
returnValue = draftAnalyses_var.item(index)
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.

#include <Fusion/Fusion/DraftAnalyses.h>

returnValue = draftAnalyses_var->item(index);

Return Value

Type | Description
DraftAnalysis | 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 2023


DraftAnalyses.itemByName Method

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

A method that returns the specified DraftAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.
returnValue = draftAnalyses_var.itemByName(name)
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.

#include <Fusion/Fusion/DraftAnalyses.h>

returnValue = draftAnalyses_var->itemByName(name);

Return Value

Type | Description
DraftAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the DraftAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


DraftAnalyses.objectType Property

Parent Object: DraftAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.

# Get the value of the property.
propertyValue = draftAnalyses_var.objectType
"draftAnalyses_var" is a variable referencing a DraftAnalyses object.
#include <Fusion/Fusion/DraftAnalyses.h>

// Get the value of the property.
string propertyValue = draftAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


DraftAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

Represents any existing Draft Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DraftAnalyses.item, DraftAnalyses.itemByName

Version

Introduced in version January 2023


DraftAnalysis.attributes Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.attributes
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = draftAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


DraftAnalysis.classType Method

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DraftAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/DraftAnalysis.h>

returnValue = adsk::fusion::DraftAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


DraftAnalysis.deleteMe Method

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
returnValue = draftAnalysis_var.deleteMe()
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

#include <Fusion/Fusion/DraftAnalysis.h>

returnValue = draftAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


DraftAnalysis.entityToken Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.entityToken
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
string propertyValue = draftAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


DraftAnalysis.isLightBulbOn Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.isLightBulbOn

# Set the value of the property.
draftAnalysis_var.isLightBulbOn = propertyValue
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
boolean propertyValue = draftAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


DraftAnalysis.isValid Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.isValid
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
boolean propertyValue = draftAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


DraftAnalysis.isVisible Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.isVisible
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
boolean propertyValue = draftAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


DraftAnalysis.name Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.name

# Set the value of the property.
draftAnalysis_var.name = propertyValue
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
string propertyValue = draftAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = draftAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


DraftAnalysis.objectType Property

Parent Object: DraftAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DraftAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.

# Get the value of the property.
propertyValue = draftAnalysis_var.objectType
"draftAnalysis_var" is a variable referencing a DraftAnalysis object.
#include <Fusion/Fusion/DraftAnalysis.h>

// Get the value of the property.
string propertyValue = draftAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


DraftFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Object that represents an existing draft feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isDirectionFlipped Gets and sets if the direction of the draft is flipped.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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.entityToken Property

Parent Object: DraftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.entityToken
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
string propertyValue = draftFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


DraftFeature.errorOrWarningMessage Property

Parent Object: DraftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Gets and sets if the direction of the draft is flipped.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a draft feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

Gets the first, or the only angle in the case of a single angle definition.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

Gets the second angle. This can be null in the case where a single angle definition is used.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

Gets and sets if the direction of the draft is flipped.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
draftFeatures.add | Demonstrates the draftFeatures.add method. To use this sample, have a design open that contains at least one body. When you run the sample, you will be prompted to select the face to draft. Because the pull direction is using the base X-Y plane, you need to select a face that is not parallel to the X-Y plane.
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatureInput.setTwoAngles Method

Parent Object: DraftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Collection that provides access to all of the existing draft features in a component and supports the ability to create new draft features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Creates a new draft feature.

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
draftFeatures.add | Demonstrates the draftFeatures.add method. To use this sample, have a design open that contains at least one body. When you run the sample, you will be prompted to select the face to draft. Because the pull direction is using the base X-Y plane, you need to select a face that is not parallel to the X-Y plane.
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


draftFeatures.add

Description

Demonstrates the draftFeatures.add method. To use this sample, have a design open that contains at least one body. When you run the sample, you will be prompted to select the face to draft. Because the pull direction is using the base X-Y plane, you need to select a face that is not parallel to the X-Y plane.

Code Samples

  • Python
def demo_draftFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the face to draft selected and add it to a list.
    face = _ui.selectEntity('Select a face to draft', 'Faces').entity
    faces = []
    faces.append(face)

    # Define the pull direction and angle.
    pullDirection = rootComp.xYConstructionPlane
    angle = adsk.core.ValueInput.createByString("30 deg")

    # Define the required input and create the draft feature.
    draftFeatures = rootComp.features.draftFeatures
    input = draftFeatures.createInput(faces, pullDirection)
    input.setSingleAngle(True, angle)
    draftFeature = draftFeatures.add(input)


DraftFeatures.classType Method

Parent Object: DraftFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

The number of draft features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

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.

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
draftFeatures.add | Demonstrates the draftFeatures.add method. To use this sample, have a design open that contains at least one body. When you run the sample, you will be prompted to select the face to draft. Because the pull direction is using the base X-Y plane, you need to select a face that is not parallel to the X-Y plane.
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatures.isValid Property

Parent Object: DraftFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Function that returns the specified draft feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

Function that returns the specified draft feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/DraftFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


Drawing Object

Derived from: Product Object
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Object that represents the drawing specific data within a drawing document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 flexible 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.
exportManager | Returns the DrawingExportManager for this drawing. You use the ExportManager to export the drawing in various formats.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
unitsManager | Returns the UnitsManager object associated with this product.
workspaces | Returns the workspaces associated with this product.

Accessed From

DrawingDocument.drawing

Version

Introduced in version December 2020


Drawing.attributes Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the collection of attributes associated with this product.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.attributes
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = drawing_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version December 2020


Drawing.classType Method

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.drawing.Drawing.classType()
This is a static method.

#include <Drawing/Drawing/Drawing.h>

returnValue = adsk::drawing::Drawing::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


Drawing.deleteEntities Method

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Deletes the specified set of entities that are associated with this product.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.
returnValue = drawing_var.deleteEntities(entities)
"drawing_var" is a variable referencing a Drawing object.

#include <Drawing/Drawing/Drawing.h>

returnValue = drawing_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 December 2020


Drawing.exportManager Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the DrawingExportManager for this drawing. You use the ExportManager to export the drawing in various formats.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.exportManager
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<DrawingExportManager> propertyValue = drawing_var->exportManager();

Property Value

This is a read only property whose value is a DrawingExportManager.

Version

Introduced in version December 2020


Drawing.findAttributes Method

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

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 flexible 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.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.
returnValue = drawing_var.findAttributes(groupName, attributeName)
"drawing_var" is a variable referencing a Drawing object.

#include <Drawing/Drawing/Drawing.h>

returnValue = drawing_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 December 2020


Drawing.isValid Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.isValid
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
boolean propertyValue = drawing_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


Drawing.namedViews Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.namedViews
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = drawing_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version September 2023


Drawing.objectType Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.objectType
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
string propertyValue = drawing_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


Drawing.parentDocument Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the parent Document object.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.parentDocument
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<Document> propertyValue = drawing_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version December 2020


Drawing.productType Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

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.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.productType
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
string propertyValue = drawing_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


Drawing.selectionSets Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.selectionSets
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = drawing_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version May 2022


Drawing.unitsManager Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the UnitsManager object associated with this product.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.unitsManager
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = drawing_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Version

Introduced in version December 2020


Drawing.workspaces Property

Parent Object: Drawing
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/Drawing.h>

Description

Returns the workspaces associated with this product.

Syntax

  • Python
  • C++
"drawing_var" is a variable referencing a Drawing object.

# Get the value of the property.
propertyValue = drawing_var.workspaces
"drawing_var" is a variable referencing a Drawing object.
#include <Drawing/Drawing/Drawing.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = drawing_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version December 2020


DrawingDocument Object

Derived from: Document Object
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Object that represents a Fusion 360 drawing document.

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.
saveMilestone | Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.
updateAllReferences | Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

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.
creationId Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original document.
dataFile | Gets the DataFile that represents this document in A360.
documentReferences | Returns a collection containing the documents directly referenced by this document.
drawing | Returns the Drawing product object associated with this drawing 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 external 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 This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent Application object.
products | Returns the products associated with this document.
version | Returns the Fusion version this document was last saved with.

Version

Introduced in version December 2020


DrawingDocument.activate Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Causes this document to become the active document in the user interface.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.activate()
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version December 2020


DrawingDocument.allDocumentReferences Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.allDocumentReferences
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = drawingDocument_var->allDocumentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version December 2020


DrawingDocument.attributes Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the collection of attributes associated with this document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.attributes
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = drawingDocument_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version December 2020


DrawingDocument.classType Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.drawing.DrawingDocument.classType()
This is a static method.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = adsk::drawing::DrawingDocument::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


DrawingDocument.close Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Closes this document.

Remarks

Closing a document is not supported within any of the Command related events. When a command is running, a transaction is open, and creating and closing documents cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.close(saveChanges)
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_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 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 December 2020


DrawingDocument.creationId Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.creationId
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
string propertyValue = drawingDocument_var->creationId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


DrawingDocument.dataFile Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Gets the DataFile that represents this document in A360.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.dataFile
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = drawingDocument_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version December 2020


DrawingDocument.documentReferences Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns a collection containing the documents directly referenced by this document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.documentReferences
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = drawingDocument_var->documentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version December 2020


DrawingDocument.drawing Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the Drawing product object associated with this drawing document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.drawing
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<Drawing> propertyValue = drawingDocument_var->drawing();

Property Value

This is a read only property whose value is a Drawing.

Version

Introduced in version December 2020


DrawingDocument.isActive Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Gets if this document is the active document in the user interface.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isActive
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.isModified Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Property that indicates if the document has been modified since it was last saved.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isModified
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isModified();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.isSaved Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

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.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isSaved
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isSaved();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.isUpToDate Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Indicates if any external 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.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isUpToDate
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isUpToDate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.isValid Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isValid
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.isVisible Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Gets if a currently open document is open as visible.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.isVisible
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
boolean propertyValue = drawingDocument_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingDocument.name Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.name

# Set the value of the property.
drawingDocument_var.name = propertyValue
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
string propertyValue = drawingDocument_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = drawingDocument_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2020


DrawingDocument.objectType Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.objectType
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
string propertyValue = drawingDocument_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DrawingDocument.parent Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the parent Application object.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.parent
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<Application> propertyValue = drawingDocument_var->parent();

Property Value

This is a read only property whose value is an Application.

Version

Introduced in version December 2020


DrawingDocument.products Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the products associated with this document.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.products
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
Ptr<Products> propertyValue = drawingDocument_var->products();

Property Value

This is a read only property whose value is a Products.

Version

Introduced in version December 2020


DrawingDocument.save Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.save(description)
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_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 December 2020


DrawingDocument.saveAs Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.saveAs(name, dataFolder, description, tag)
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_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 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 December 2020


DrawingDocument.saveMilestone Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.saveMilestone(milestoneName, versionDescription)
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_var->saveMilestone(milestoneName, versionDescription);

Return Value

Type | Description
boolean | Returns true if saving the document as a milestone was successful.

Parameters

Name | Type | Description
milestoneName | string | The name of the milestone as seen in the data panel and Fusion web client. If an empty string is provided a default name will be used.
versionDescription | string | The description associated with the version. If an empty string is provided, a default description will be used.

Version

Introduced in version March 2024


DrawingDocument.updateAllReferences Method

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.
returnValue = drawingDocument_var.updateAllReferences()
"drawingDocument_var" is a variable referencing a DrawingDocument object.

#include <Drawing/Drawing/DrawingDocument.h>

returnValue = drawingDocument_var->updateAllReferences();

Version

Introduced in version September 2022


DrawingDocument.version Property

Parent Object: DrawingDocument
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingDocument.h>

Description

Returns the Fusion version this document was last saved with.

Syntax

  • Python
  • C++
"drawingDocument_var" is a variable referencing a DrawingDocument object.

# Get the value of the property.
propertyValue = drawingDocument_var.version
"drawingDocument_var" is a variable referencing a DrawingDocument object.
#include <Drawing/Drawing/DrawingDocument.h>

// Get the value of the property.
string propertyValue = drawingDocument_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DrawingExportManager Object

Derived from: Base Object
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

Provides support to export the drawing in various formats.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createPDFExportOptions | Defines the various settings for a STEP 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Drawing.exportManager

Version

Introduced in version December 2020


DrawingExportManager.classType Method

Parent Object: DrawingExportManager
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.drawing.DrawingExportManager.classType()
This is a static method.

#include <Drawing/Drawing/DrawingExportManager.h>

returnValue = adsk::drawing::DrawingExportManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


DrawingExportManager.createPDFExportOptions Method

Parent Object: DrawingExportManager
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

Defines the various settings for a STEP export.

Syntax

  • Python
  • C++
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.
returnValue = drawingExportManager_var.createPDFExportOptions(filename)
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.

#include <Drawing/Drawing/DrawingExportManager.h>

returnValue = drawingExportManager_var->createPDFExportOptions(filename);

Return Value

Type | Description
PDFExportOptions | Returns a PDFExportOptions object if successful and null if it should fail.

Parameters

Name | Type | Description
filename | string | The name of the file to export to. Use settings on the returned PDFExportOptions object to change other settings.

Version

Introduced in version December 2020


DrawingExportManager.execute Method

Parent Object: DrawingExportManager
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

Executes the export operation to create the file in the format specified by the input ExportOptions object.

Syntax

  • Python
  • C++
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.
returnValue = drawingExportManager_var.execute(exportOptions)
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.

#include <Drawing/Drawing/DrawingExportManager.h>

returnValue = drawingExportManager_var->execute(exportOptions);

Return Value

Type | Description
boolean | Returns true if the export was successful.

Parameters

Name | Type | Description
exportOptions | DrawingExportOptions | A DrawingExportOptions object that is created using one of the create methods on the DrawingExportManager object. This defines the type of export and defines the options supported for that file type.

Version

Introduced in version December 2020


DrawingExportManager.isValid Property

Parent Object: DrawingExportManager
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.

# Get the value of the property.
propertyValue = drawingExportManager_var.isValid
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.
#include <Drawing/Drawing/DrawingExportManager.h>

// Get the value of the property.
boolean propertyValue = drawingExportManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingExportManager.objectType Property

Parent Object: DrawingExportManager
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.

# Get the value of the property.
propertyValue = drawingExportManager_var.objectType
"drawingExportManager_var" is a variable referencing a DrawingExportManager object.
#include <Drawing/Drawing/DrawingExportManager.h>

// Get the value of the property.
string propertyValue = drawingExportManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DrawingExportOptions Object

Derived from: Base Object
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportOptions.h>

Description

The base class for the different drawing 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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

PDFExportOptions

Version

Introduced in version December 2020


DrawingExportOptions.classType Method

Parent Object: DrawingExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.drawing.DrawingExportOptions.classType()
This is a static method.

#include <Drawing/Drawing/DrawingExportOptions.h>

returnValue = adsk::drawing::DrawingExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


DrawingExportOptions.filename Property

Parent Object: DrawingExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportOptions.h>

Description

Gets and sets the filename that the exported file will be written to.

Syntax

  • Python
  • C++
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.

# Get the value of the property.
propertyValue = drawingExportOptions_var.filename

# Set the value of the property.
drawingExportOptions_var.filename = propertyValue
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.
#include <Drawing/Drawing/DrawingExportOptions.h>

// Get the value of the property.
string propertyValue = drawingExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = drawingExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2020


DrawingExportOptions.isValid Property

Parent Object: DrawingExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.

# Get the value of the property.
propertyValue = drawingExportOptions_var.isValid
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.
#include <Drawing/Drawing/DrawingExportOptions.h>

// Get the value of the property.
boolean propertyValue = drawingExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


DrawingExportOptions.objectType Property

Parent Object: DrawingExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/DrawingExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.

# Get the value of the property.
propertyValue = drawingExportOptions_var.objectType
"drawingExportOptions_var" is a variable referencing a DrawingExportOptions object.
#include <Drawing/Drawing/DrawingExportOptions.h>

// Get the value of the property.
string propertyValue = drawingExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


DropDownCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Provides a command input to get the choice in a drop-down list from the user.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: DropDownCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
returnValue = dropDownCommandInput_var.deleteMe()
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

#include <Core/UserInterface/DropDownCommandInput.h>

returnValue = dropDownCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


DropDownCommandInput.dropDownStyle Property

Parent Object: DropDownCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Returns the style of drop down this was created as.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets or sets the maximum allowed size on screen of the drop down list, measured in items.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Represents a drop-down control.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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 | This argument defines the resource folder that contains the images used for the icon when icons are used in the drop-down. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

Accessed From

ToolbarControls.addDropDown

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


DropDownControl.classType Method

Parent Object: DropDownControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Gets the associated ToolbarControls collection. Through this you can add additional controls to the drop-down.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


DropDownControl.deleteMe Method

Parent Object: DropDownControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Deletes the ToolbarControl

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Gets or sets if this control is currently visible.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/DropDownControl.h>

Description

This argument defines the resource folder that contains the images used for the icon when icons are used in the drop-down. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isCreateControlPointSplines | When set to true, if there are any splines in the DXF they will be created as control point splines. Otherwise they will be created as fixed splines that cannot be edited. The default for this property is false, to create fixed splines.
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.
layers | Gets and sets the names of the layers that will be imported. When the DXF2DImportOptions object is first created, the array returned is a list of all the layers in the DXF file. By default, all layers will be imported. You can set the property using a new array that contains the names of only those layers you want to import.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version November 2015


DXF2DImportOptions.classType Method

Parent Object: DXF2DImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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.isCreateControlPointSplines Property

Parent Object: DXF2DImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

When set to true, if there are any splines in the DXF they will be created as control point splines. Otherwise they will be created as fixed splines that cannot be edited. The default for this property is false, to create fixed splines.

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.isCreateControlPointSplines

# Set the value of the property.
dXF2DImportOptions_var.isCreateControlPointSplines = 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->isCreateControlPointSplines();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXF2DImportOptions_var->isCreateControlPointSplines(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


DXF2DImportOptions.isSingleSketchResult Property

Parent Object: DXF2DImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

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.

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.layers Property

Parent Object: DXF2DImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

Gets and sets the names of the layers that will be imported. When the DXF2DImportOptions object is first created, the array returned is a list of all the layers in the DXF file. By default, all layers will be imported. You can set the property using a new array that contains the names of only those layers you want to import.

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.layers

# Set the value of the property.
dXF2DImportOptions_var.layers = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
std::vector<string> propertyValue = dXF2DImportOptions_var->layers();

// Set the value of the property, where value_var is a string.
bool returnValue = dXF2DImportOptions_var->layers(value_var);

Property Value

This is a read/write property whose value is an array of type string.

Version

Introduced in version October 2022


DXF2DImportOptions.objectType Property

Parent Object: DXF2DImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

Description

Gets and sets the construction plane or planar face that defines the plane that the resulting sketches will be created on.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/DXF2DImportOptions.h>

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.

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


DXFFlatPatternExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Defines that a DXF export of a flat pattern is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
convertToPolylineTolerance | Specifies the tolerance when converting a spline to polylines. This value is only used when the isSplineConvertedToPolyline property is true and otherwise it is ignored. The units for this value are centimeters. Defaults to 0.01 cm.
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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isCenterLinesExported | Specifies if the center lines (bend line) of the flat pattern are exported in the DXF. Defaults to true.
isExtentLinesExported | Specifies if the bend extent lines of the flat pattern are exported in the DXF. Defaults to true.
isSplineConvertedToPolyline | Specifies if splines are converted to polylines. If true, the convertToPolylineTolerance value is used to specify the accuracy of the conversion. Defaults to 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
units | Gets and sets the units that will be used for the DXF file. This defaults to be the same as the default units of the design.

Accessed From

ExportManager.createDXFFlatPatternExportOptions

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.classType Method

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DXFFlatPatternExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

returnValue = adsk::fusion::DXFFlatPatternExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.convertToPolylineTolerance Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Specifies the tolerance when converting a spline to polylines. This value is only used when the isSplineConvertedToPolyline property is true and otherwise it is ignored. The units for this value are centimeters. Defaults to 0.01 cm.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.convertToPolylineTolerance

# Set the value of the property.
dXFFlatPatternExportOptions_var.convertToPolylineTolerance = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
double propertyValue = dXFFlatPatternExportOptions_var->convertToPolylineTolerance();

// Set the value of the property, where value_var is a double.
bool returnValue = dXFFlatPatternExportOptions_var->convertToPolylineTolerance(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.filename Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

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.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.filename

# Set the value of the property.
dXFFlatPatternExportOptions_var.filename = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
string propertyValue = dXFFlatPatternExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = dXFFlatPatternExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.geometry Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.geometry

# Set the value of the property.
dXFFlatPatternExportOptions_var.geometry = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = dXFFlatPatternExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = dXFFlatPatternExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.isCenterLinesExported Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Specifies if the center lines (bend line) of the flat pattern are exported in the DXF. Defaults to true.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.isCenterLinesExported

# Set the value of the property.
dXFFlatPatternExportOptions_var.isCenterLinesExported = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFFlatPatternExportOptions_var->isCenterLinesExported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFFlatPatternExportOptions_var->isCenterLinesExported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


DXFFlatPatternExportOptions.isExtentLinesExported Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Specifies if the bend extent lines of the flat pattern are exported in the DXF. Defaults to true.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.isExtentLinesExported

# Set the value of the property.
dXFFlatPatternExportOptions_var.isExtentLinesExported = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFFlatPatternExportOptions_var->isExtentLinesExported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFFlatPatternExportOptions_var->isExtentLinesExported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


DXFFlatPatternExportOptions.isSplineConvertedToPolyline Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Specifies if splines are converted to polylines. If true, the convertToPolylineTolerance value is used to specify the accuracy of the conversion. Defaults to false.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.isSplineConvertedToPolyline

# Set the value of the property.
dXFFlatPatternExportOptions_var.isSplineConvertedToPolyline = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFFlatPatternExportOptions_var->isSplineConvertedToPolyline();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFFlatPatternExportOptions_var->isSplineConvertedToPolyline(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.isValid Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.isValid
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFFlatPatternExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.objectType Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.objectType
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
string propertyValue = dXFFlatPatternExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


DXFFlatPatternExportOptions.units Property

Parent Object: DXFFlatPatternExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFFlatPatternExportOptions.h>

Description

Gets and sets the units that will be used for the DXF file. This defaults to be the same as the default units of the design.

Syntax

  • Python
  • C++
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.

# Get the value of the property.
propertyValue = dXFFlatPatternExportOptions_var.units

# Set the value of the property.
dXFFlatPatternExportOptions_var.units = propertyValue
"dXFFlatPatternExportOptions_var" is a variable referencing a DXFFlatPatternExportOptions object.
#include <Fusion/Fusion/DXFFlatPatternExportOptions.h>

// Get the value of the property.
DistanceUnits propertyValue = dXFFlatPatternExportOptions_var->units();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = dXFFlatPatternExportOptions_var->units(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version January 2025


DXFSketchExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Defines the various settings associated with exporting a sketch in DXF format.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isConstructionExported | Indicates if construction geometry should be exported. Defaults to true, which will export all construction geometry. If false it will be ignored and not included in the DXF file.
isPointsExported | Indicates if the sketch points should be exported. Defaults to true, which will export all points. If false it will be ignored and not included in the DXF file.
isProjectedGeometryExported | Indicates if any projected geometry should be exported. Defaults to true, which will export all projected geometry. If false it will be ignored and not included in the DXF 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
units | Gets and sets the units that will be used for the DXF file. This defaults to be the same as the default units of the design.

Accessed From

ExportManager.createDXFSketchExportOptions

Version

Introduced in version January 2025


DXFSketchExportOptions.classType Method

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DXFSketchExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/DXFSketchExportOptions.h>

returnValue = adsk::fusion::DXFSketchExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


DXFSketchExportOptions.filename Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

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.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.filename

# Set the value of the property.
dXFSketchExportOptions_var.filename = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
string propertyValue = dXFSketchExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = dXFSketchExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


DXFSketchExportOptions.geometry Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.geometry

# Set the value of the property.
dXFSketchExportOptions_var.geometry = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = dXFSketchExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = dXFSketchExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2025


DXFSketchExportOptions.isConstructionExported Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Indicates if construction geometry should be exported. Defaults to true, which will export all construction geometry. If false it will be ignored and not included in the DXF file.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.isConstructionExported

# Set the value of the property.
dXFSketchExportOptions_var.isConstructionExported = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFSketchExportOptions_var->isConstructionExported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFSketchExportOptions_var->isConstructionExported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


DXFSketchExportOptions.isPointsExported Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Indicates if the sketch points should be exported. Defaults to true, which will export all points. If false it will be ignored and not included in the DXF file.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.isPointsExported

# Set the value of the property.
dXFSketchExportOptions_var.isPointsExported = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFSketchExportOptions_var->isPointsExported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFSketchExportOptions_var->isPointsExported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


DXFSketchExportOptions.isProjectedGeometryExported Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Indicates if any projected geometry should be exported. Defaults to true, which will export all projected geometry. If false it will be ignored and not included in the DXF file.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.isProjectedGeometryExported

# Set the value of the property.
dXFSketchExportOptions_var.isProjectedGeometryExported = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFSketchExportOptions_var->isProjectedGeometryExported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXFSketchExportOptions_var->isProjectedGeometryExported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


DXFSketchExportOptions.isValid Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.isValid
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
boolean propertyValue = dXFSketchExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


DXFSketchExportOptions.objectType Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.objectType
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
string propertyValue = dXFSketchExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


DXFSketchExportOptions.units Property

Parent Object: DXFSketchExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/DXFSketchExportOptions.h>

Description

Gets and sets the units that will be used for the DXF file. This defaults to be the same as the default units of the design.

Syntax

  • Python
  • C++
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.

# Get the value of the property.
propertyValue = dXFSketchExportOptions_var.units

# Set the value of the property.
dXFSketchExportOptions_var.units = propertyValue
"dXFSketchExportOptions_var" is a variable referencing a DXFSketchExportOptions object.
#include <Fusion/Fusion/DXFSketchExportOptions.h>

// Get the value of the property.
DistanceUnits propertyValue = dXFSketchExportOptions_var->units();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = dXFSketchExportOptions_var->units(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version January 2025


Ellipse2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Ellipse2D.copy, Ellipse2D.create

Version

Introduced in version August 2014


Ellipse2D.asNurbsCurve Property

Parent Object: Ellipse2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Returns a NURBS curve that is geometrically identical to the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Gets and sets the center position of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Creates and returns a copy of this Ellipse2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Creates a transient 2D ellipse by specifying a center position, major and minor axes, and major and minor radii.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Gets all of the data defining the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Gets and sets the major axis of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Gets and sets the major radius of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Gets and sets the minor radius of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Sets all of the data defining the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the normal of the ellipse.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Ellipse3D.copy, Ellipse3D.create, SketchEllipse.geometry, SketchEllipse.worldGeometry

Version

Introduced in version August 2014


Ellipse3D.asNurbsCurve Property

Parent Object: Ellipse3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Returns a NURBS curve that is geometrically identical to the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets and sets the center position of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Creates a copy of this Ellipse3D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Creates a transient 3D ellipse object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets all of the data defining the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets and sets the major axis of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets and sets the major radius of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets and sets the minor radius of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Gets the normal of the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Sets all of the data defining the ellipse.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Ellipse3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
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 | Gets if the elliptical arc is the geometric equivalent of a circular arc
isClockwise | Gets 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Returns a NURBS curve that is geometrically identical to the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the center position of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Creates and returns a copy of this EllipticalArc2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Creates a transient 2D elliptical arc

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the end angle of the elliptical arc in radians, where 0 is along the major axis.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets the position of the end point of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets all of the data defining the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets if the elliptical arc is the geometric equivalent of a circular arc

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets if the sweep direction of the elliptical arc is clockwise or counterclockwise.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the major axis of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the major radius of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the minor radius of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Sets all of the data defining the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets and sets the start angle of the elliptical arc in radians, where 0 is along the major axis.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Gets the position of the start point of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the normal of the elliptical arc.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Returns a NURBS curve that is geometrically identical to the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the center point of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Creates and returns a copy of this EllipticalArc3D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Creates a transient 3D elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the end angle of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets all of the data defining the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the major axis of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the major radius of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the minor radius of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets the normal of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Sets all of the data defining the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Gets and sets the start angle of the elliptical arc.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalArc3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Creates and returns an independent copy of this EllipticalCone object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Creates a transient elliptical cone object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Gets the center axis of the cone that defines its normal direction and the major axis direction of the ellipse that defines it.

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;
void returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Gets the data that defines the Elliptical Cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Gets and sets the major radius of the ellipse that defines the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Gets and sets the minor radius of the ellipse that defines the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Gets and sets the origin point (center) of the base of the cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Sets the data that defines the Elliptical Cone.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Sets the center axis of the cone and the major axis direction of the ellipse that defines it.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCone.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets and set the center axis (along the length) of the cylinder that defines its normal direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Creates and returns an independent copy of this EllipticalCylinder object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Creates a transient 3D elliptical cylinder object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets the data defining the elliptical cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets and sets the direction of the major axis of the ellipse that defines the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets and sets the major radius of the ellipse that defines the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets and sets the minor radius of the ellipse that defines the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Gets and sets the origin point (center) of the base of the cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Sets the data defining the elliptical cylinder.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/EllipticalCylinder.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

An equal constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Returns the first curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Returns the second curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: EqualConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.entityToken
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
string propertyValue = equalConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


EqualConstraint.isDeletable Property

Parent Object: EqualConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/EqualConstraint.h>

Description

Returns the parent sketch object.

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


EqualDistanceChamferEdgeSet Object

Derived from: ChamferEdgeSet Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Provides access to the edges and the parameter associated with a equal distance offset chamfer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 chamfer edge set from the chamfer. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
distance | Returns the model parameter that controls the offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.
edges Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | Gets and sets the Tangent chain for chamfer. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.classType Method

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.EqualDistanceChamferEdgeSet.classType()
This is a static method.

#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

returnValue = adsk::fusion::EqualDistanceChamferEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.deleteMe Method

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Deletes the chamfer edge set from the chamfer.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
returnValue = equalDistanceChamferEdgeSet_var.deleteMe()
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

returnValue = equalDistanceChamferEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.distance Property

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Returns the model parameter that controls the offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

# Get the value of the property.
propertyValue = equalDistanceChamferEdgeSet_var.distance
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = equalDistanceChamferEdgeSet_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.edges Property

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

# Get the value of the property.
propertyValue = equalDistanceChamferEdgeSet_var.edges

# Set the value of the property.
equalDistanceChamferEdgeSet_var.edges = propertyValue
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = equalDistanceChamferEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = equalDistanceChamferEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.isTangentChain Property

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Gets and sets the Tangent chain for chamfer. This enables tangent chain option for chamfer.

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

# Get the value of the property.
propertyValue = equalDistanceChamferEdgeSet_var.isTangentChain

# Set the value of the property.
equalDistanceChamferEdgeSet_var.isTangentChain = propertyValue
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = equalDistanceChamferEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = equalDistanceChamferEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


EqualDistanceChamferEdgeSet.isValid Property

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

# Get the value of the property.
propertyValue = equalDistanceChamferEdgeSet_var.isValid
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = equalDistanceChamferEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


EqualDistanceChamferEdgeSet.objectType Property

Parent Object: EqualDistanceChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.

# Get the value of the property.
propertyValue = equalDistanceChamferEdgeSet_var.objectType
"equalDistanceChamferEdgeSet_var" is a variable referencing an EqualDistanceChamferEdgeSet object.
#include <Fusion/Features/EqualDistanceChamferEdgeSet.h>

// Get the value of the property.
string propertyValue = equalDistanceChamferEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


EqualDistanceChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Provides information to create a chamfer that is defined by a single distance and has an equal offset from the edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.classType Method

Parent Object: EqualDistanceChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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 March 2022


EqualDistanceChamferTypeDefinition.distance Property

Parent Object: EqualDistanceChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

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 March 2022


EqualDistanceChamferTypeDefinition.isValid Property

Parent Object: EqualDistanceChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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 March 2022


EqualDistanceChamferTypeDefinition.objectType Property

Parent Object: EqualDistanceChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 March 2022


EqualDistanceChamferTypeDefinition.parentFeature Property

Parent Object: EqualDistanceChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

Description

Returns the feature that owns this chamfer type definition

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 March 2022


Event Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

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).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

ActiveSelectionEventArgs.firingEvent, ApplicationCommandEventArgs.firingEvent, ApplicationEventArgs.firingEvent, CameraEventArgs.firingEvent, CommandCreatedEventArgs.firingEvent, CommandEventArgs.firingEvent, CustomEventArgs.firingEvent, CustomFeatureEventArgs.firingEvent, DataEventArgs.firingEvent, DocumentEventArgs.firingEvent, EventArgs.firingEvent, HTMLEventArgs.firingEvent, HttpEventArgs.firingEvent, InputChangedEventArgs.firingEvent, KeyboardEventArgs.firingEvent, MarkingMenuEventArgs.firingEvent, MFGDMDataEventArgs.firingEvent, MouseEventArgs.firingEvent, NavigationEventArgs.firingEvent, RenderEventArgs.firingEvent, SelectionEventArgs.firingEvent, SetupChangeEventArgs.firingEvent, SetupEventArgs.firingEvent, UserInterfaceGeneralEventArgs.firingEvent, ValidateInputsEventArgs.firingEvent, WebRequestEventArgs.firingEvent, WorkspaceEventArgs.firingEvent

Derived Classes

ActiveSelectionEvent, ApplicationCommandEvent, ApplicationEvent, CameraEvent, CommandCreatedEvent, CommandEvent, CustomEvent, CustomFeatureEvent, DataEvent, DocumentEvent, HTMLEvent, HttpEvent, InputChangedEvent, KeyboardEvent, MarkingMenuEvent, MFGDMDataEvent, MouseEvent, NavigationEvent, RenderEvent, SelectionEvent, SetupChangeEvent, SetupEvent, UserInterfaceGeneralEvent, ValidateInputsEvent, WebRequestEvent, WorkspaceEvent

Version

Introduced in version August 2014


Event.classType Method

Parent Object: Event
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Event.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/EventArgs.h>

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'.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

ActiveSelectionEventArgs, ApplicationCommandEventArgs, ApplicationEventArgs, CameraEventArgs, CommandCreatedEventArgs, CommandEventArgs, CustomEventArgs, CustomFeatureEventArgs, DataEventArgs, DocumentEventArgs, HTMLEventArgs, HttpEventArgs, InputChangedEventArgs, KeyboardEventArgs, MarkingMenuEventArgs, MFGDMDataEventArgs, MouseEventArgs, NavigationEventArgs, RenderEventArgs, SelectionEventArgs, SetupChangeEventArgs, SetupEventArgs, UserInterfaceGeneralEventArgs, ValidateInputsEventArgs, WebRequestEventArgs, WorkspaceEventArgs

Version

Introduced in version August 2014


EventArgs.classType Method

Parent Object: EventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/EventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/EventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/EventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/EventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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

Defined in namespace "adsk::core" and the header file is <Core/Application/EventHandler.h>

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.

Derived Classes

ActiveSelectionEventHandler, ApplicationCommandEventHandler, ApplicationEventHandler, CameraEventHandler, CommandCreatedEventHandler, CommandEventHandler, CustomEventHandler, CustomFeatureEventHandler, CustomSDFCallbackEventHandler, DataEventHandler, DocumentEventHandler, HTMLEventHandler, HttpEventHandler, InputChangedEventHandler, KeyboardEventHandler, MarkingMenuEventHandler, MFGDMDataEventHandler, MouseEventHandler, NavigationEventHandler, RenderEventHandler, SelectionEventHandler, SetupChangeEventHandler, SetupEventHandler, UserInterfaceGeneralEventHandler, ValidateInputsEventHandler, WebRequestEventHandler, WorkspaceEventHandler

Version

Introduced in version August 2014


ExportManager Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Provides support for exporting model data to various formats.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createC3MFExportOptions | Creates a C3MFExportOptions object that's used to export a design in 3MF format. Creation of the C3MFExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.
createDXFFlatPatternExportOptions | Creates a DXFFlatPatternExport object that's used to export a flat pattern in DXF format. Creation of the DXFFlatPatternExport object does not perform the export. You must call the execute method. You can change any additional settings by setting properties on the returned object before calling the execute method.
createDXFSketchExportOptions | Preview Creates a DXFSketchExportOptions object that's used to export a sketch in DXF format. Creation of the DXFSketchExportOptions object does not perform the export. You must call the execute method after changing the settings to the desired values.
createFusionArchiveExportOptions | Creates an FusionArchiveExportOptions object that's used to export a design in Fusion 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 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.
createOBJExportOptions | Creates an OBJExportOptions object that's used to export a design in OBJ format. Creation of the OBJExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.
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.
createUSDExportOptions | Creates an USDExportOptions object that's used to export a design in USD format. Creation of the USDExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The USDExportOptions supports any available options when exporting to USD format.
execute | Executes the export operation to create the file in the format specified by the provided 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.exportManager, FlatPatternProduct.exportManager, WorkingModel.exportManager

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.createC3MFExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates a C3MFExportOptions object that's used to export a design in 3MF format. Creation of the C3MFExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createC3MFExportOptions(geometry)

# Uses optional arguments.
returnValue = exportManager_var.createC3MFExportOptions(geometry, filename)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createC3MFExportOptions(geometry);

// Uses optional arguments.
returnValue = exportManager_var->createC3MFExportOptions(geometry, filename);

Return Value

Type | Description
C3MFExportOptions | The created createC3MFExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
geometry | Base | The geometry to export. This can be a BRepBody, Occurrence, or Component object.
filename | string | The filename of the 3MF 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 "".

Version

Introduced in version September 2021


ExportManager.createDXFFlatPatternExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates a DXFFlatPatternExport object that's used to export a flat pattern in DXF format. Creation of the DXFFlatPatternExport object does not perform the export. You must call the execute method. You can change any additional settings by setting properties on the returned object before calling the execute method.

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
returnValue = exportManager_var.createDXFFlatPatternExportOptions(filename, flatPattern)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

returnValue = exportManager_var->createDXFFlatPatternExportOptions(filename, flatPattern);

Return Value

Type | Description
DXFFlatPatternExportOptions | The created DXFFlatPatternExport object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the DXF file to be created.
flatPattern | FlatPattern | The FlatPattern object to export.

Version

Introduced in version November 2022


ExportManager.createDXFSketchExportOptions Method

Parent Object: ExportManager

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates a DXFSketchExportOptions object that's used to export a sketch in DXF format. Creation of the DXFSketchExportOptions object does not perform the export. You must call the execute method after changing the settings to the desired values.

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
returnValue = exportManager_var.createDXFSketchExportOptions(filename, sketch)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

returnValue = exportManager_var->createDXFSketchExportOptions(filename, sketch);

Return Value

Type | Description
DXFSketchExportOptions | The created DXFSketchExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the DXF file to be created.
sketch | Sketch | The Sketch object to export.

Version

Introduced in version January 2025


ExportManager.createFusionArchiveExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates an FusionArchiveExportOptions object that's used to export a design in Fusion 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 archive format.

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 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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


ExportManager.createIGESExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

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.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


ExportManager.createOBJExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates an OBJExportOptions object that's used to export a design in OBJ format. Creation of the OBJExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createOBJExportOptions(geometry)

# Uses optional arguments.
returnValue = exportManager_var.createOBJExportOptions(geometry, filename)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createOBJExportOptions(geometry);

// Uses optional arguments.
returnValue = exportManager_var->createOBJExportOptions(geometry, filename);

Return Value

Type | Description
OBJExportOptions | The created createOBJExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
geometry | Base | The geometry to export. This can be a BRepBody, Occurrence, or Component object.
filename | string | The filename of the OBJ 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 "".

Version

Introduced in version October 2022


ExportManager.createSATExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

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.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


ExportManager.createSMTExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

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.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


ExportManager.createSTEPExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

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.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

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.

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 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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


ExportManager.createUSDExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates an USDExportOptions object that's used to export a design in USD format. Creation of the USDExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The USDExportOptions supports any available options when exporting to USD format.

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createUSDExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createUSDExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createUSDExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createUSDExportOptions(filename, geometry);

Return Value

Type | Description
USDExportOptions | The created USDExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the USD 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.

Version

Introduced in version March 2022


ExportManager.execute Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Executes the export operation to create the file in the format specified by the provided ExportOptions object.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

C3MFExportOptions, DXFFlatPatternExportOptions, DXFSketchExportOptions, FusionArchiveExportOptions, IGESExportOptions, OBJExportOptions, SATExportOptions, SMTExportOptions, STEPExportOptions, STLExportOptions, USDExportOptions

Version

Introduced in version January 2015


ExportOptions.classType Method

Parent Object: ExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Object that represents an existing extend feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
extendAlignment Gets and sets surface extend alignment to use.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
extendType Gets and sets surface extend type to use.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
faces Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the parameter controlling the extend distance. You can edit the distance by editing the value of the parameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.entityToken Property

Parent Object: ExtendFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.entityToken
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
string propertyValue = extendFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ExtendFeature.errorOrWarningMessage Property

Parent Object: ExtendFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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.extendAlignment Property

Parent Object: ExtendFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Gets and sets surface extend alignment to use.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.extendAlignment

# Set the value of the property.
extendFeature_var.extendAlignment = propertyValue
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
SurfaceExtendAlignment propertyValue = extendFeature_var->extendAlignment();

// Set the value of the property, where value_var is a SurfaceExtendAlignment.
bool returnValue = extendFeature_var->extendAlignment(value_var);

Property Value

This is a read/write property whose value is a SurfaceExtendAlignment.

Version

Introduced in version September 2020


ExtendFeature.extendType Property

Parent Object: ExtendFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Gets and sets surface extend type to use.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Gets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Sets the edges for the extend feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a extend feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
extendAlignment | Gets and sets surface extend alignment to use.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the extend distance

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Gets and sets the edges to extend

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.extendAlignment Property

Parent Object: ExtendFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Gets and sets surface extend alignment to use.

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.extendAlignment

# Set the value of the property.
extendFeatureInput_var.extendAlignment = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
SurfaceExtendAlignment propertyValue = extendFeatureInput_var->extendAlignment();

// Set the value of the property, where value_var is a SurfaceExtendAlignment.
bool returnValue = extendFeatureInput_var->extendAlignment(value_var);

Property Value

This is a read/write property whose value is a SurfaceExtendAlignment.

Version

Introduced in version September 2020


ExtendFeatureInput.extendType Property

Parent Object: ExtendFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Gets and sets surface extend type to use

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Gets and sets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Collection that provides access to all of the existing Extend features in a component and supports the ability to create new Extend features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.extendFeatures

Samples

Name | Description
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


ExtendFeatures.add Method

Parent Object: ExtendFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Creates a new extend feature.

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.

Samples

Name | Description
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.

Version

Introduced in version June 2015


extendFeatures.add

Description

Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.

Code Samples

  • Python
def demo_extendFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the edge to extend selected and add it to an ObjectCollection.
    # This must be on a surface body and be an open edge or the creation
    # of the feature will fail.
    edge: adsk.fusion.BRepEdge = _ui.selectEntity('Select edge to extend', 'Edges').entity
    edges = adsk.core.ObjectCollection.create()
    edges.add(edge)

    # Define the needed input.
    distance = adsk.core.ValueInput.createByReal(5)
    extendType = adsk.fusion.SurfaceExtendTypes.NaturalSurfaceExtendType
    extendFeatures = rootComp.features.extendFeatures
    input: adsk.fusion.ExtendFeatureInput = extendFeatures.createInput(edges, distance, extendType)
    input.extendAlignment = adsk.fusion.SurfaceExtendAlignment.FreeEdges

    # Create the feature.
    extendFeature = extendFeatures.add(input)


ExtendFeatures.classType Method

Parent Object: ExtendFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

The number of Extend features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

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.

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.

Samples

Name | Description
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.

Version

Introduced in version June 2015


ExtendFeatures.isValid Property

Parent Object: ExtendFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Function that returns the specified extend feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

Function that returns the specified extend feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtendFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtentDefinition.h>

Description

The base class for the various definition objects used to define the extent of a feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

AllExtentDefinition, AngleExtentDefinition, DistanceExtentDefinition, FromEntityStartDefinition, OffsetStartDefinition, OneSideToExtentDefinition, ProfilePlaneStartDefinition, SymmetricExtentDefinition, ThroughAllExtentDefinition, ToEntityExtentDefinition, TwoSidesAngleExtentDefinition, TwoSidesDistanceExtentDefinition, TwoSidesToExtentDefinition

Version

Introduced in version August 2014


ExtentDefinition.classType Method

Parent Object: ExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Object that represents an existing extrude feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setSymmetricExtent | Redefines the extrusion to go symmetrically in both directions from the profile. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setThinExtrude | Changes the extrude feature to be a thin extrude. This is only valid if the isThinExtrude property is False. If the extrusion is already a thin extrude, you can use the properties on the ExtrudeFeature to modify the thin extrude specific values.
setTwoSidesExtent | Redefines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
isThinExtrude | Sets or returns whether the extrude is a thin extrude. Setting it as false will make it a regular extrude.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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, OffsetStartDefinition or a EntityStartDefinition object. You can get any of those objects by using the static create method on the class.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 feature 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.
thinExtrudeWallLocationOne | Gets and sets the wall location for a one sided thin extrude or side one of a two sided thin extrude
thinExtrudeWallLocationTwo | Gets and sets the wall location for side two of a two sided thin extrude
thinExtrudeWallThicknessOne | Gets and sets the wall thickness for a one sided thin extrude or side one of a two sided thin extrude
thinExtrudeWallThicknessTwo | Gets and sets the wall thickness for side two of a two sided thin extrude
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 API Sample | 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 | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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.entityToken Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.entityToken
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
string propertyValue = extrudeFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ExtrudeFeature.errorOrWarningMessage Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns a value indicating how the extent is defined for this extrude.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Indicates if this feature was initially created as a solid or a surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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.isThinExtrude Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Sets or returns whether the extrude is a thin extrude. Setting it as false will make it a regular extrude.

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.isThinExtrude

# Set the value of the property.
extrudeFeature_var.isThinExtrude = 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->isThinExtrude();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extrudeFeature_var->isThinExtrude(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2021


ExtrudeFeature.isValid Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the type of operation performed by the extrusion.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Redefines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Redefines the extrusion to go symmetrically in both directions from the profile.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.setThinExtrude Method

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Changes the extrude feature to be a thin extrude. This is only valid if the isThinExtrude property is False. If the extrusion is already a thin extrude, you can use the properties on the ExtrudeFeature to modify the thin extrude specific values.

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
# Uses no optional arguments.
returnValue = extrudeFeature_var.setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne)

# Uses optional arguments.
returnValue = extrudeFeature_var.setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne, thinExtrudeWallLocationTwo, thinExtrudeWallThicknessTwo)
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

// Uses no optional arguments.
returnValue = extrudeFeature_var->setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne);

// Uses optional arguments.
returnValue = extrudeFeature_var->setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne, thinExtrudeWallLocationTwo, thinExtrudeWallThicknessTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
thinExtrudeWallLocationOne | ThinExtrudeWallLocation | Specifies the position of the thin wall extrude with respect to the profile being extruded. This defines the direction for a single sided thin extrude or side one of a two-sided extrusion.
thinExtrudeWallThicknessOne | ValueInput | A ValueInput object that defines the thickness for a single sided thin extrude or side one of a two-sided extrusion .
thinExtrudeWallLocationTwo | ThinExtrudeWallLocation | Optional argument that specifies the position of side two of a two-sided extrusion. This argument is ignored for a single sided thin extrude. This is an optional argument whose default value is ThinExtrudeWallLocation.Side1.
thinExtrudeWallThicknessTwo | ValueInput | Optional argument that is a ValueInput object that defines the thickness for side two of a two-sided extrusion. This argument is ignored for a single sided thin extrude. This is an optional argument whose default value is null.

Version

Introduced in version April 2021


ExtrudeFeature.setTwoSidesExtent Method

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Redefines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Property that returns all of the side faces (i.e. those running perpendicular to the extrude direction) of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the extent used to define the start of the extrusion. You can set this property with either a ProfilePlaneStartDefinition, OffsetStartDefinition or a EntityStartDefinition object. You can get any of those objects by using the static create method on the class.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

If the current extent of the feature 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

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.

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.thinExtrudeWallLocationOne Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the wall location for a one sided thin extrude or side one of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.thinExtrudeWallLocationOne

# Set the value of the property.
extrudeFeature_var.thinExtrudeWallLocationOne = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
ThinExtrudeWallLocation propertyValue = extrudeFeature_var->thinExtrudeWallLocationOne();

// Set the value of the property, where value_var is a ThinExtrudeWallLocation.
bool returnValue = extrudeFeature_var->thinExtrudeWallLocationOne(value_var);

Property Value

This is a read/write property whose value is a ThinExtrudeWallLocation.

Version

Introduced in version April 2021


ExtrudeFeature.thinExtrudeWallLocationTwo Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the wall location for side two of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.thinExtrudeWallLocationTwo

# Set the value of the property.
extrudeFeature_var.thinExtrudeWallLocationTwo = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
ThinExtrudeWallLocation propertyValue = extrudeFeature_var->thinExtrudeWallLocationTwo();

// Set the value of the property, where value_var is a ThinExtrudeWallLocation.
bool returnValue = extrudeFeature_var->thinExtrudeWallLocationTwo(value_var);

Property Value

This is a read/write property whose value is a ThinExtrudeWallLocation.

Version

Introduced in version April 2021


ExtrudeFeature.thinExtrudeWallThicknessOne Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the wall thickness for a one sided thin extrude or side one of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.thinExtrudeWallThicknessOne
"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->thinExtrudeWallThicknessOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version April 2021


ExtrudeFeature.thinExtrudeWallThicknessTwo Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Gets and sets the wall thickness for side two of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.thinExtrudeWallThicknessTwo
"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->thinExtrudeWallThicknessTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version April 2021


ExtrudeFeature.timelineObject Property

Parent Object: ExtrudeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** Sets the extrusion extents option to 'All' (i.e. the extrusion is through-all, in both directions.) This method will fail in the case of a non-parametric extrusion.
setDistanceExtent | **RETIRED** Sets the extrusion extents option to 'Distance'.
setOneSideExtent | Defines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.
setOneSideToExtent | **RETIRED** Sets the extrusion Direction option to 'One Side' and the Extents option to 'To' (a specified face)
setSymmetricExtent | Defines the extrusion to go symmetrically in both directions from the profile.
setThinExtrude | Changes the extrude feature to be a thin extrude. This is only valid if the isThinExtrude property is False. If the extrusion is already a thin extrude, you can use the properties on the ExtrudeFeature to modify the thin extrude specific values.
setTwoSidesDistanceExtent | **RETIRED** Sets the extrusion extents option to 'Two Side'. This method will fail in the case of a non-parametric extrusion.
setTwoSidesExtent | Defines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.
setTwoSidesToExtent | **RETIRED** Set the extrusion Direction option to 'Two Side'. This method will fail in the case of a non-parametric extrusion.

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 assigned 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 assigned 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.
isThinExtrude | Sets or returns whether the extrude is a thin extrude. Setting it as false will make it a regular extrude.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 OffsetStartDefinition or a EntityStartDefinition object. You can get either one of those objects by using the static create method on the class.
taperAngle | **RETIRED** Gets and sets the taper angle of the extrusion. This is used to define the taper angle for a single sided and symmetric and defines the angle for side one of a two sided extrusion. This property is initialized with a taper angle of zero. A negative angle will taper the extrusion inward while a positive value will taper the extrusion outward. This property is valid for both parametric and non-parametric extrusions.
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.
thinExtrudeWallLocationOne | Gets and sets the wall location for a one sided thin extrude or side one of a two sided thin extrude
thinExtrudeWallLocationTwo | Gets and sets the wall location for side two of a two sided thin extrude
thinExtrudeWallThicknessOne | Gets and sets the wall thickness for a one sided thin extrude or side one of a two sided thin extrude
thinExtrudeWallThicknessTwo | Gets and sets the wall thickness for side two of a two sided thin extrude

Accessed From

ExtrudeFeatures.createInput

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets the extent assigned 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets the extent assigned 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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 API Sample | 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.isThinExtrude Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Sets or returns whether the extrude is a thin extrude. Setting it as false will make it a regular extrude.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.isThinExtrude

# Set the value of the property.
extrudeFeatureInput_var.isThinExtrude = 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->isThinExtrude();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extrudeFeatureInput_var->isThinExtrude(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2021


ExtrudeFeatureInput.isValid Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets and sets the type of operation performed by the extrusion.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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.setAllExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Sets the extrusion extents option to 'All' (i.e. the extrusion is through-all, in both directions.) This method will fail in the case of a non-parametric extrusion.

Remarks

This method has been retired and is replaced with the setOneSideExtent and SetTwoSidesExtent, passing in a ThroughAllExtentDefinition. This method continues to work to allow the API to remain backward compatible, but it is no longer officially supported.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
returnValue = extrudeFeatureInput_var.setAllExtent(direction)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

returnValue = extrudeFeatureInput_var->setAllExtent(direction);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
direction | ExtentDirections | The direction can be either positive, negative, or symmetric.

Version

Introduced in version August 2014
Retired in version November 2016


ExtrudeFeatureInput.setDistanceExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Sets the extrusion extents option to 'Distance'.

Remarks

This method has been retired and is replaced with the new SetOneSideExtent and passing in either a DistanceExtentDefinition or SymmetricExtentDefinition. This method continues to work for the API to remain backward compatible but it is not longer officially supported.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
returnValue = extrudeFeatureInput_var.setDistanceExtent(isSymmetric, distance)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

returnValue = extrudeFeatureInput_var->setDistanceExtent(isSymmetric, distance);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
isSymmetric | boolean | Set to 'true' for an extrusion symmetrical about the profile plane
distance | ValueInput | ValueInput object that defines the extrude distance. If the isSymmetric argument is 'false', a positive or negative distance can be used to control the direction.

Version

Introduced in version November 2016
Retired in version September 2022


ExtrudeFeatureInput.setOneSideExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Defines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.

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.
extrudeFeatures.add using setOneSideExtent | Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.
Manage Participant Bodies API Sample | 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.setOneSideToExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Sets the extrusion Direction option to 'One Side' and the Extents option to 'To' (a specified face)

Remarks

This method has been retired and is replaced with the new setOneSideExtent and passing in a ToEntityExtentDefinition. This method continues to work to allow the API to remain backward compatible, but it is no longer officially supported.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
# Uses no optional arguments.
returnValue = extrudeFeatureInput_var.setOneSideToExtent(toEntity, matchShape)

# Uses optional arguments.
returnValue = extrudeFeatureInput_var.setOneSideToExtent(toEntity, matchShape, directionHint)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

// Uses no optional arguments.
returnValue = extrudeFeatureInput_var->setOneSideToExtent(toEntity, matchShape);

// Uses optional arguments.
returnValue = extrudeFeatureInput_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 an extrude it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
matchShape | boolean | If the matchShape argument is 'true', the toEntity is extended to fully intersect the extrusion.
directionHint | Vector3D | Specifies the direction of the extrusion. This is only used in the case where there are two possible solutions and the extrusion can hit the toEntity in either direction. An example is if the profile of the extrusion is within a hole. The extrusion will intersect the cylinder of the hole 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
Retired in version November 2016


ExtrudeFeatureInput.setSymmetricExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Defines the extrusion to go symmetrically in both directions from the profile.

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.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.

Version

Introduced in version November 2016


ExtrudeFeatureInput.setThinExtrude Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Changes the extrude feature to be a thin extrude. This is only valid if the isThinExtrude property is False. If the extrusion is already a thin extrude, you can use the properties on the ExtrudeFeature to modify the thin extrude specific values.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
# Uses no optional arguments.
returnValue = extrudeFeatureInput_var.setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne)

# Uses optional arguments.
returnValue = extrudeFeatureInput_var.setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne, thinExtrudeWallLocationTwo, thinExtrudeWallThicknessTwo)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

// Uses no optional arguments.
returnValue = extrudeFeatureInput_var->setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne);

// Uses optional arguments.
returnValue = extrudeFeatureInput_var->setThinExtrude(thinExtrudeWallLocationOne, thinExtrudeWallThicknessOne, thinExtrudeWallLocationTwo, thinExtrudeWallThicknessTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
thinExtrudeWallLocationOne | ThinExtrudeWallLocation | Specifies the position of the thin wall extrude with respect to the profile being extruded. This defines the direction for a single sided thin extrude or side one of a two-sided extrusion.
thinExtrudeWallThicknessOne | ValueInput | A ValueInput object that defines the thickness for a single sided thin extrude or side one of a two-sided extrusion .
thinExtrudeWallLocationTwo | ThinExtrudeWallLocation | Optional argument that specifies the position of side two of a two-sided extrusion. This argument is ignored for a single sided thin extrude. This is an optional argument whose default value is ThinExtrudeWallLocation.Side1.
thinExtrudeWallThicknessTwo | ValueInput | Optional argument that is a ValueInput object that defines the thickness for side two of a two-sided extrusion. This argument is ignored for a single sided thin extrude. This is an optional argument whose default value is null.

Samples

Name | Description
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.

Version

Introduced in version April 2021


ExtrudeFeatureInput.setTwoSidesDistanceExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Sets the extrusion extents option to 'Two Side'. This method will fail in the case of a non-parametric extrusion.

Remarks

This method has been retired and is replaced with the new SetTwoSidesExtent, passing in a DistanceExtentDefinition for both sides. This method continues to work to allow the API to remain backward compatible, but it is no longer officially supported.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
returnValue = extrudeFeatureInput_var.setTwoSidesDistanceExtent(distanceOne, distanceTwo)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

returnValue = extrudeFeatureInput_var->setTwoSidesDistanceExtent(distanceOne, distanceTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
distanceOne | ValueInput | ValueInput object that defines the extrude distance for the first side.
distanceTwo | ValueInput | ValueInput object that defines the extrude distance for the second side.

Version

Introduced in version August 2014
Retired in version November 2016


ExtrudeFeatureInput.setTwoSidesExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Defines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

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.
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.

Version

Introduced in version November 2016


ExtrudeFeatureInput.setTwoSidesToExtent Method

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Set the extrusion Direction option to 'Two Side'. This method will fail in the case of a non-parametric extrusion.

Remarks

This method has been retired and is replaced with the new setTwoSidesExtent and passing in a ToEntityExtentDefinition for both sides. This method continues to work to allow the API to remain backward compatible, but it is no longer officially supported.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
returnValue = extrudeFeatureInput_var.setTwoSidesToExtent(toEntityOne, toEntityTwo, matchShape)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

returnValue = extrudeFeatureInput_var->setTwoSidesToExtent(toEntityOne, toEntityTwo, matchShape);

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 an extrude 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 an extrude it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
matchShape | boolean | If the matchShape argument is 'true', the toEntity is extended to fully intersect the extrusion.

Version

Introduced in version August 2014
Retired in version November 2016


ExtrudeFeatureInput.startExtent Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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 OffsetStartDefinition or a EntityStartDefinition object. You can get either one of those objects by using the static create method on the class.

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.taperAngle Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the taper angle of the extrusion. This is used to define the taper angle for a single sided and symmetric and defines the angle for side one of a two sided extrusion. This property is initialized with a taper angle of zero. A negative angle will taper the extrusion inward while a positive value will taper the extrusion outward. This property is valid for both parametric and non-parametric extrusions.

Remarks

This property has been retired and is replaced by getting the extent definition for each direction and using it to set the taper angle.

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.taperAngle

# Set the value of the property.
extrudeFeatureInput_var.taperAngle = propertyValue
"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->taperAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = extrudeFeatureInput_var->taperAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version August 2014
Retired in version November 2016


ExtrudeFeatureInput.taperAngleOne Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

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.

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


ExtrudeFeatureInput.thinExtrudeWallLocationOne Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets and sets the wall location for a one sided thin extrude or side one of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.thinExtrudeWallLocationOne

# Set the value of the property.
extrudeFeatureInput_var.thinExtrudeWallLocationOne = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
ThinExtrudeWallLocation propertyValue = extrudeFeatureInput_var->thinExtrudeWallLocationOne();

// Set the value of the property, where value_var is a ThinExtrudeWallLocation.
bool returnValue = extrudeFeatureInput_var->thinExtrudeWallLocationOne(value_var);

Property Value

This is a read/write property whose value is a ThinExtrudeWallLocation.

Version

Introduced in version April 2021


ExtrudeFeatureInput.thinExtrudeWallLocationTwo Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets and sets the wall location for side two of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.thinExtrudeWallLocationTwo

# Set the value of the property.
extrudeFeatureInput_var.thinExtrudeWallLocationTwo = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
ThinExtrudeWallLocation propertyValue = extrudeFeatureInput_var->thinExtrudeWallLocationTwo();

// Set the value of the property, where value_var is a ThinExtrudeWallLocation.
bool returnValue = extrudeFeatureInput_var->thinExtrudeWallLocationTwo(value_var);

Property Value

This is a read/write property whose value is a ThinExtrudeWallLocation.

Version

Introduced in version April 2021


ExtrudeFeatureInput.thinExtrudeWallThicknessOne Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets and sets the wall thickness for a one sided thin extrude or side one of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.thinExtrudeWallThicknessOne

# Set the value of the property.
extrudeFeatureInput_var.thinExtrudeWallThicknessOne = propertyValue
"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->thinExtrudeWallThicknessOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = extrudeFeatureInput_var->thinExtrudeWallThicknessOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version April 2021


ExtrudeFeatureInput.thinExtrudeWallThicknessTwo Property

Parent Object: ExtrudeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatureInput.h>

Description

Gets and sets the wall thickness for side two of a two sided thin extrude

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.thinExtrudeWallThicknessTwo

# Set the value of the property.
extrudeFeatureInput_var.thinExtrudeWallThicknessTwo = propertyValue
"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->thinExtrudeWallThicknessTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = extrudeFeatureInput_var->thinExtrudeWallThicknessTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version April 2021


ExtrudeFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Collection that provides access to all of the existing extrude features in a design and supports the ability to create new extrude features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 API Sample | 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 | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

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.

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.
extrudeFeatures.add using setOneSideExtent | Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Creates a basic extrusion that goes from the profile plane the specified distance.

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. This method can only be used to create solid extrusions. To create a surface extrusion you need to use the add method.
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
extrudeFeatures.addSimple | Demonstrates the extrudeFeatures.addSimple method.
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies API Sample | 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 | 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.addSimple

Description

Demonstrates the extrudeFeatures.addSimple method.

Code Samples

  • Python
def demo_extrudeFeatures_addSimple(rootComp: adsk.fusion.Design.rootComponent):
    filter =  adsk.core.SelectionCommandInput.Profiles
    profile = _ui.selectEntity('Select a profile', filter).entity
    distance = adsk.core.ValueInput.createByString("100 mm")
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation

    extrudeFeatures = rootComp.features.extrudeFeatures
    extrudeFeature = extrudeFeatures.addSimple(profile, distance, operation)


ExtrudeFeatures.classType Method

Parent Object: ExtrudeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

The number of extrude features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Creates a new ExtrudeFeatureInput object that is used to specify the input needed to create a new extrude feature.

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.
extrudeFeatures.add using setOneSideExtent | Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.
Manage Participant Bodies API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Function that returns the specified extrude feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

Function that returns the specified extrude feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ExtrudeFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


FaceContourSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Represents a face type of curve selection. It allows BRepFace objects for the input geometry. Overrides the GeometrySelection's value method to include other faces if the isSelectingSamePlaneFaces property is true and the selection has been applied. The result of the value property call may contain duplicates.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isSelectingSamePlaneFaces | Property to get and set if all planar faces lying in the same plane as the selected face should be automatically selected as well.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loopType | Property to get and set the desired loop type. The default is AllLoops.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sideType | Property to get and set the desired side type. The default is StartOutside.
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewFaceContourSelection

Version

Introduced in version April 2023


FaceContourSelection.classType Method

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.FaceContourSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/FaceContourSelection.h>

returnValue = adsk::cam::FaceContourSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


FaceContourSelection.error Property

Parent Object: FaceContourSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.error
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
string propertyValue = faceContourSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


FaceContourSelection.hasError Property

Parent Object: FaceContourSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.hasError
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
boolean propertyValue = faceContourSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


FaceContourSelection.hasWarning Property

Parent Object: FaceContourSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.hasWarning
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
boolean propertyValue = faceContourSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


FaceContourSelection.inputGeometry Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.inputGeometry

# Set the value of the property.
faceContourSelection_var.inputGeometry = propertyValue
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = faceContourSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = faceContourSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version April 2023


FaceContourSelection.isSelectingSamePlaneFaces Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Property to get and set if all planar faces lying in the same plane as the selected face should be automatically selected as well.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.isSelectingSamePlaneFaces

# Set the value of the property.
faceContourSelection_var.isSelectingSamePlaneFaces = propertyValue
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
boolean propertyValue = faceContourSelection_var->isSelectingSamePlaneFaces();

// Set the value of the property, where value_var is a boolean.
bool returnValue = faceContourSelection_var->isSelectingSamePlaneFaces(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


FaceContourSelection.isValid Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.isValid
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
boolean propertyValue = faceContourSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


FaceContourSelection.loopType Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Property to get and set the desired loop type. The default is AllLoops.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.loopType

# Set the value of the property.
faceContourSelection_var.loopType = propertyValue
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
LoopTypes propertyValue = faceContourSelection_var->loopType();

// Set the value of the property, where value_var is a LoopTypes.
bool returnValue = faceContourSelection_var->loopType(value_var);

Property Value

This is a read/write property whose value is a LoopTypes.

Version

Introduced in version April 2023


FaceContourSelection.objectType Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.objectType
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
string propertyValue = faceContourSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


FaceContourSelection.sideType Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Property to get and set the desired side type. The default is StartOutside.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.sideType

# Set the value of the property.
faceContourSelection_var.sideType = propertyValue
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
SideTypes propertyValue = faceContourSelection_var->sideType();

// Set the value of the property, where value_var is a SideTypes.
bool returnValue = faceContourSelection_var->sideType(value_var);

Property Value

This is a read/write property whose value is a SideTypes.

Version

Introduced in version April 2023


FaceContourSelection.value Property

Parent Object: FaceContourSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.value
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = faceContourSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


FaceContourSelection.warning Property

Parent Object: FaceContourSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/FaceContourSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.

# Get the value of the property.
propertyValue = faceContourSelection_var.warning
"faceContourSelection_var" is a variable referencing a FaceContourSelection object.
#include <Cam/GeometrySelections/FaceContourSelection.h>

// Get the value of the property.
string propertyValue = faceContourSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


FaceGroup Object

FaceGroup Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represent a connected region on a single geometric surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
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 face group 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.
boundingBox | Returns the bounding box of this face
centroid | Returns a point at the centroid (aka, geometric center) of the face.
entityToken Returns a token for the face group object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same face.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for faces that exist in the design, (the isTemporary property is false).
isPlanar | Returns if the face group is planar 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.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentBody | Returns the parent body of the face.
tempId | Returns the temporary ID of this face group. This ID is only good while the document remains open and as long as the owning mesh body is not modified in any way.

Accessed From

FaceGroup.createForAssemblyContext, FaceGroup.nativeObject, FaceGroups.item, MeshCombineFaceGroupsFeature.inputFaceGroups, MeshCombineFaceGroupsFeatureInput.inputFaceGroups

Version

Introduced in version September 2024


FaceGroup.area Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns the area in cm ^ 2.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.area
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
double propertyValue = faceGroup_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2024


FaceGroup.assemblyContext Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this face group 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.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.assemblyContext
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = faceGroup_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2024


FaceGroup.boundingBox Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns the bounding box of this face

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.boundingBox
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = faceGroup_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2024


FaceGroup.centroid Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns a point at the centroid (aka, geometric center) of the face.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.centroid
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = faceGroup_var->centroid();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version September 2024


FaceGroup.classType Method

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FaceGroup.classType()
This is a static method.

#include <Fusion/MeshBody/FaceGroup.h>

returnValue = adsk::fusion::FaceGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


FaceGroup.createForAssemblyContext Method

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

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.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.
returnValue = faceGroup_var.createForAssemblyContext(occurrence)
"faceGroup_var" is a variable referencing a FaceGroup object.

#include <Fusion/MeshBody/FaceGroup.h>

returnValue = faceGroup_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
FaceGroup | Returns the new face group 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 September 2024


FaceGroup.entityToken Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns a token for the face group object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same face.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

This is only valid for faces that exist in the design, (the isTemporary property is false).

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.entityToken
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
string propertyValue = faceGroup_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


FaceGroup.isPlanar Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns if the face group is planar or not.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.isPlanar
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
boolean propertyValue = faceGroup_var->isPlanar();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


FaceGroup.isValid Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.isValid
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
boolean propertyValue = faceGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


FaceGroup.nativeObject Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

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.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.nativeObject
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
Ptr<FaceGroup> propertyValue = faceGroup_var->nativeObject();

Property Value

This is a read only property whose value is a FaceGroup.

Version

Introduced in version September 2024


FaceGroup.objectType Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.objectType
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
string propertyValue = faceGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


FaceGroup.parentBody Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns the parent body of the face.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.parentBody
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
Ptr<MeshBody> propertyValue = faceGroup_var->parentBody();

Property Value

This is a read only property whose value is a MeshBody.

Version

Introduced in version September 2024


FaceGroup.tempId Property

Parent Object: FaceGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroup.h>

Description

Returns the temporary ID of this face group. This ID is only good while the document remains open and as long as the owning mesh body is not modified in any way.

Syntax

  • Python
  • C++
"faceGroup_var" is a variable referencing a FaceGroup object.

# Get the value of the property.
propertyValue = faceGroup_var.tempId
"faceGroup_var" is a variable referencing a FaceGroup object.
#include <Fusion/MeshBody/FaceGroup.h>

// Get the value of the property.
integer propertyValue = faceGroup_var->tempId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2024


FaceGroups Object

FaceGroups Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

FaceGroup collection.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 faceGroup using an index into the collection.

Properties

Name | Description
count | The number of FaceGroup 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MeshBody.faceGroups

Version

Introduced in version September 2024


FaceGroups.classType Method

Parent Object: FaceGroups

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FaceGroups.classType()
This is a static method.

#include <Fusion/MeshBody/FaceGroups.h>

returnValue = adsk::fusion::FaceGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


FaceGroups.count Property

Parent Object: FaceGroups

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Description

The number of FaceGroup objects in the collection.

Syntax

  • Python
  • C++
"faceGroups_var" is a variable referencing a FaceGroups object.

# Get the value of the property.
propertyValue = faceGroups_var.count
"faceGroups_var" is a variable referencing a FaceGroups object.
#include <Fusion/MeshBody/FaceGroups.h>

// Get the value of the property.
uinteger propertyValue = faceGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


FaceGroups.isValid Property

Parent Object: FaceGroups

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"faceGroups_var" is a variable referencing a FaceGroups object.

# Get the value of the property.
propertyValue = faceGroups_var.isValid
"faceGroups_var" is a variable referencing a FaceGroups object.
#include <Fusion/MeshBody/FaceGroups.h>

// Get the value of the property.
boolean propertyValue = faceGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


FaceGroups.item Method

Parent Object: FaceGroups

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Description

Function that returns the specified faceGroup using an index into the collection.

Syntax

  • Python
  • C++
"faceGroups_var" is a variable referencing a FaceGroups object.
returnValue = faceGroups_var.item(index)
"faceGroups_var" is a variable referencing a FaceGroups object.

#include <Fusion/MeshBody/FaceGroups.h>

returnValue = faceGroups_var->item(index);

Return Value

Type | Description
FaceGroup | 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 2024


FaceGroups.objectType Property

Parent Object: FaceGroups

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/FaceGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"faceGroups_var" is a variable referencing a FaceGroups object.

# Get the value of the property.
propertyValue = faceGroups_var.objectType
"faceGroups_var" is a variable referencing a FaceGroups object.
#include <Fusion/MeshBody/FaceGroups.h>

// Get the value of the property.
string propertyValue = faceGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


FaceRipFeatureDefinition Object

Derived from: RipFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

Description

The definition for a face rip.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
ripFace | Gets and sets the input face for a face rip.

Version

Introduced in version September 2023


FaceRipFeatureDefinition.classType Method

Parent Object: FaceRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FaceRipFeatureDefinition.classType()
This is a static method.

#include <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

returnValue = adsk::fusion::FaceRipFeatureDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


FaceRipFeatureDefinition.isValid Property

Parent Object: FaceRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.

# Get the value of the property.
propertyValue = faceRipFeatureDefinition_var.isValid
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.
#include <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

// Get the value of the property.
boolean propertyValue = faceRipFeatureDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


FaceRipFeatureDefinition.objectType Property

Parent Object: FaceRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.

# Get the value of the property.
propertyValue = faceRipFeatureDefinition_var.objectType
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.
#include <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

// Get the value of the property.
string propertyValue = faceRipFeatureDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


FaceRipFeatureDefinition.ripFace Property

Parent Object: FaceRipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

Description

Gets and sets the input face for a face rip.

Syntax

  • Python
  • C++
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.

# Get the value of the property.
propertyValue = faceRipFeatureDefinition_var.ripFace

# Set the value of the property.
faceRipFeatureDefinition_var.ripFace = propertyValue
"faceRipFeatureDefinition_var" is a variable referencing a FaceRipFeatureDefinition object.
#include <Fusion/SheetMetal/FaceRipFeatureDefinition.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = faceRipFeatureDefinition_var->ripFace();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = faceRipFeatureDefinition_var->ripFace(value_var);

Property Value

This is a read/write property whose value is a BRepFace.

Version

Introduced in version September 2023


FavoriteAppearances Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Collection of the favorite appearances.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.favoriteAppearances

Version

Introduced in version August 2014


FavoriteAppearances.add Method

Parent Object: FavoriteAppearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Adds an existing appearance to the Favorites list

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

The number of Appearances in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Returns the specified Appearance using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

Returns the Appearance by it's internal unique ID.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteAppearances.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Collection of the favorite materials.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.favoriteMaterials

Version

Introduced in version August 2014


FavoriteMaterials.add Method

Parent Object: FavoriteMaterials
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Adds an existing material to the Favorites list

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

The number of Materials in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Returns the specified Material using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

Returns the Material by it's internal unique ID.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/FavoriteMaterials.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Base class object representing all features.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

AllExtentDefinition.parentFeature, AngleExtentDefinition.parentFeature, DistanceExtentDefinition.parentFeature, ExtentDefinition.parentFeature, FeatureList.item, Features.item, Features.itemByName, FromEntityStartDefinition.parentFeature, OffsetStartDefinition.parentFeature, OneSideToExtentDefinition.parentFeature, PatternElement.parentFeature, ProfilePlaneStartDefinition.parentFeature, SymmetricExtentDefinition.parentFeature, ThroughAllExtentDefinition.parentFeature, ToEntityExtentDefinition.parentFeature, TwoSidesAngleExtentDefinition.parentFeature, TwoSidesDistanceExtentDefinition.parentFeature, TwoSidesToExtentDefinition.parentFeature

Derived Classes

ArrangeFeature, BaseFeature, BossFeature, BoundaryFillFeature, BoxFeature, ChamferFeature, CircularPatternFeature, CoilFeature, CombineFeature, CopyPasteBody, CustomFeature, CutPasteBody, CylinderFeature, DeleteFaceFeature, DraftFeature, ExtendFeature, ExtrudeFeature, FilletFeature, FlangeFeature, FlatPattern, FormFeature, HoleFeature, LoftFeature, MeshConvertFeature, MeshFeature, MirrorFeature, MoveFeature, OffsetFacesFeature, OffsetFeature, PatchFeature, PathPatternFeature, PipeFeature, RectangularPatternFeature, RefoldFeature, RemoveFeature, ReplaceFaceFeature, ReverseNormalFeature, RevolveFeature, RibFeature, RipFeature, RuledSurfaceFeature, RuleFilletFeature, ScaleFeature, ShellFeature, SilhouetteSplitFeature, SphereFeature, SplitBodyFeature, SplitFaceFeature, StitchFeature, SurfaceDeleteFaceFeature, SweepFeature, ThickenFeature, ThreadFeature, TorusFeature, TrimFeature, UnfoldFeature, UnstitchFeature, UntrimFeature, VolumetricCustomFeature, VolumetricModelToMeshFeature, WebFeature

Version

Introduced in version August 2014


Feature.assemblyContext Property

Parent Object: Feature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

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.

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.entityToken Property

Parent Object: Feature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.entityToken
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
string propertyValue = feature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Feature.errorOrWarningMessage Property

Parent Object: Feature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Feature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

Provides access to a list of features. This is used in the API to return a list of features from an API call.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ArrangeFeature.linkedFeatures, BaseFeature.linkedFeatures, BossFeature.linkedFeatures, BoundaryFillFeature.linkedFeatures, BoxFeature.linkedFeatures, ChamferFeature.linkedFeatures, CircularPatternFeature.linkedFeatures, CoilFeature.linkedFeatures, CombineFeature.linkedFeatures, CopyPasteBody.linkedFeatures, CustomFeature.linkedFeatures, CutPasteBody.linkedFeatures, CylinderFeature.linkedFeatures, DeleteFaceFeature.linkedFeatures, DraftFeature.linkedFeatures, ExtendFeature.linkedFeatures, ExtrudeFeature.linkedFeatures, Feature.linkedFeatures, FilletFeature.linkedFeatures, FlangeFeature.linkedFeatures, FlatPattern.linkedFeatures, FormFeature.linkedFeatures, HoleFeature.linkedFeatures, LoftFeature.linkedFeatures, MeshCombineFaceGroupsFeature.linkedFeatures, MeshCombineFeature.linkedFeatures, MeshConvertFeature.linkedFeatures, MeshFeature.linkedFeatures, MeshGenerateFaceGroupsFeature.linkedFeatures, MeshReduceFeature.linkedFeatures, MeshRemeshFeature.linkedFeatures, MeshRepairFeature.linkedFeatures, MeshReverseNormalFeature.linkedFeatures, MeshSeparateFeature.linkedFeatures, MeshShellFeature.linkedFeatures, MeshSmoothFeature.linkedFeatures, MirrorFeature.linkedFeatures, MoveFeature.linkedFeatures, OffsetFacesFeature.linkedFeatures, OffsetFeature.linkedFeatures, PatchFeature.linkedFeatures, PathPatternFeature.linkedFeatures, PipeFeature.linkedFeatures, RectangularPatternFeature.linkedFeatures, RefoldFeature.linkedFeatures, RemoveFeature.linkedFeatures, ReplaceFaceFeature.linkedFeatures, ReverseNormalFeature.linkedFeatures, RevolveFeature.linkedFeatures, RibFeature.linkedFeatures, RipFeature.linkedFeatures, RuledSurfaceFeature.linkedFeatures, RuleFilletFeature.linkedFeatures, ScaleFeature.linkedFeatures, ShellFeature.linkedFeatures, SilhouetteSplitFeature.linkedFeatures, SphereFeature.linkedFeatures, SplitBodyFeature.linkedFeatures, SplitFaceFeature.linkedFeatures, StitchFeature.linkedFeatures, SurfaceDeleteFaceFeature.linkedFeatures, SweepFeature.linkedFeatures, TessellateFeature.linkedFeatures, ThickenFeature.linkedFeatures, ThreadFeature.linkedFeatures, TorusFeature.linkedFeatures, TrimFeature.linkedFeatures, UnfoldFeature.linkedFeatures, UnstitchFeature.linkedFeatures, UntrimFeature.linkedFeatures, VolumetricCustomFeature.linkedFeatures, VolumetricModelToMeshFeature.linkedFeatures, WebFeature.linkedFeatures

Version

Introduced in version November 2014


FeatureList.classType Method

Parent Object: FeatureList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

The number of features in this collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

Returns the specified folder.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FeatureList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
arrangeFeatures | Preview Returns the collection that provides access to the Arrange features within the component and supports the creation of new Arrange features.
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.
bossFeatures | Returns the collection that provides access to the boss features within the component and supports the creation of new boss features.
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.
customFeatures | Preview Returns the collection that provides access to the custom features within the component and supports the creation of new custom features.
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.
flangeFeatures | Returns the collection that provides access to the existing flange 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.
mergeFacesFeatures | Returns the collection object that supports the ability to merge faces. Merging faces is currently limited to a Direct Modeling design or a body in a base feature. The result of merging faces is a direct B-Rep modification, and the change is not represented as a feature in the browser.
meshCombineFaceGroupsFeatures | Preview Returns the collection that provides access to the mesh combine face groups features within the component and supports the creation of new mesh combine face groups features.
meshCombineFeatures | Preview Returns the collection that provides access to the mesh combine features within the component and supports the creation of new mesh combine features.
meshGenerateFaceGroupsFeatures | Preview Returns the collection that provides access to the mesh generate facegroup features within the component and supports the creation of new mesh generate facegroup features.
meshReduceFeatures | Preview Returns the collection that provides access to the mesh reduce features within the component and supports the creation of new mesh reduce features.
meshRemeshFeatures | Preview Returns the collection that provides access to the mesh remesh features within the component and supports the creation of new mesh remesh features.
meshRepairFeatures | Preview Returns the collection that provides access to the mesh repair features within the component and supports the creation of new mesh repair features.
meshShellFeatures | Preview Returns the collection that provides access to the mesh shell features within the component and supports the creation of new mesh shell features.
meshSmoothFeatures | Preview Returns the collection that provides access to the mesh smooth features within the component and supports the creation of new mesh smooth 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
pipeFeatures | 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.
refoldFeatures | Returns the collection that provides access to the existing refold 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.
ripFeatures | Returns the collection that provides access to the existing Rip features.
ruledSurfaceFeatures | Returns the collection that provides access to the Ruled Surface features within the component and supports the creation of new Ruled Surface 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.
tessellateFeatures | Preview Returns the collection that provides access to the tessellate features within the component and supports the creation of new tessellate 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.
unfoldFeatures | Returns the collection that provides access to the existing unfold features.
unstitchFeatures | Returns the collection that provides access to the Unstitch features within the component and supports the creation of new Unstitch features.
untrimFeatures | Returns the collection that provides access to the Untrim features within the component and supports the creation of new Untrim features.
volumetricCustomFeatures | Preview Returns the collection that provides access to volumetric custom features within the component and supports the creation of new volumetric custom features.
volumetricModelToMeshFeatures | Preview Returns the collection that provides access to the Volumetric Model to Mesh features within the component and supports the creation of new Volumetric Model to Mesh features.
webFeatures | Returns the collection that provides access to the existing web features.

Accessed From

Component.features, FlatPatternComponent.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.arrangeFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Arrange features within the component and supports the creation of new Arrange features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.arrangeFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ArrangeFeatures> propertyValue = features_var->arrangeFeatures();

Property Value

This is a read only property whose value is an ArrangeFeatures.

Version

Introduced in version January 2025


Features.baseFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

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.

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
baseFeatures.add | Demonstrates the baseFeature.add method.
BaseFeature Sample | Creates a new base feature.
Sketches.addToBaseOrFormFeature | Demonstrates the Sketches.addToBaseOrFormFeature method.

Version

Introduced in version September 2015


Features.bossFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the boss features within the component and supports the creation of new boss features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.bossFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<BossFeatures> propertyValue = features_var->bossFeatures();

Property Value

This is a read only property whose value is a BossFeatures.

Version

Introduced in version October 2022


Features.boundaryFillFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Boundary Fill features within the component and supports the creation of new Boundary Fill features.

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.

Samples

Name | Description
boundaryFillFeatures.add | Demonstrates the boundaryFill.add method. To use this sample you need to have two existing overlapping bodies. You'll be prompted to select the bodies when running the script.

Version

Introduced in version June 2015


Features.boxFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing box features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the chamfer features within the component and supports the creation of new chamfer features.

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
chamferFeatures.add | Demonstrates the chamferFeatures.add method. To use this sample have a part open that contains a body. When you run the script, you will be prompted to select an edge to chamfer.
Equal Distance Chamfer Feature API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the circular pattern features within the component and supports the creation of new circular pattern features.

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.

Samples

Name | Description
circularPatternFeatures.add | Demonstrates the circularPatternFeatures.add method. To use the sample have a design open that contains at least one body. When you run the script, it will prompt you to select a body, which will be patterned around the base Y-axis.

Version

Introduced in version November 2014


Features.classType Method

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Coil Primitive features within the component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the combine features within the component and supports the creation of new combine features.

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.

Samples

Name | Description
combineFeatures.add | Demonstrates the combineFeatures.add method. To use this sample, have a design open that contains at least two bodies. When you run the sample, you will be prompted to select the bodies and they will joined.

Version

Introduced in version November 2014


Features.copyPasteBodies Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing copy-paste features and supports the creation of new copy-paste features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the number of bodies in the collection.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


Features.createPath Method

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

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.

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.customFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the custom features within the component and supports the creation of new custom features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.customFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CustomFeatures> propertyValue = features_var->customFeatures();

Property Value

This is a read only property whose value is a CustomFeatures.

Version

Introduced in version January 2021


Features.cutPasteBodies Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing cut-paste features and supports the creation of new cut-paste features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing cylinder features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing Delete Face features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the draft features within the component and supports the creation of new draft features.

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.

Samples

Name | Description
draftFeatures.add | Demonstrates the draftFeatures.add method. To use this sample, have a design open that contains at least one body. When you run the sample, you will be prompted to select the face to draft. Because the pull direction is using the base X-Y plane, you need to select a face that is not parallel to the X-Y plane.

Version

Introduced in version January 2015


Features.extendFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Extend features within the component and supports the creation of new Extend features.

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
extendFeatures.add | Demonstrates the extendFeatures.add method. To use this sample, have a design open that contains at least one surface body. When you run the sample, you will be prompted to select an open edge of the body.
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


Features.extrudeFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the extrude features within the component and supports the creation of new extrude features.

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
extrudeFeatures.addSimple | Demonstrates the extrudeFeatures.addSimple method.
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
extrudeFeatures.add using setOneSideExtent | Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies API Sample | 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 | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the fillet features within the component and supports the creation of new fillet features.

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.

Samples

Name | Description
filletFeatures.add | Demonstrates the filletFeatures.add method.

Version

Introduced in version November 2014


Features.flangeFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing flange features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.flangeFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<FlangeFeatures> propertyValue = features_var->flangeFeatures();

Property Value

This is a read only property whose value is a FlangeFeatures.

Version

Introduced in version August 2020


Features.formFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing form features.

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.

Samples

Name | Description
formFeatures.add | Demonstrates the formFeatures.add method. This creates a new empty form (T-Spline) feature, which you'll see in the timeline.

Version

Introduced in version September 2015


Features.holeFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the hole features within the component and supports the creation of new hole features.

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.

Samples

Name | Description
holeFeatures.add | Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.
holeFeatures.add with Counterbore | Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.
holeFeatures.add with Countersink | Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Version

Introduced in version August 2014


Features.isValid Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Function that returns the specified feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Function that returns the specified feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing loft features and supports the creation of new loft features.

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version September 2015


Features.mergeFacesFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection object that supports the ability to merge faces. Merging faces is currently limited to a Direct Modeling design or a body in a base feature. The result of merging faces is a direct B-Rep modification, and the change is not represented as a feature in the browser.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.mergeFacesFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MergeFacesFeatures> propertyValue = features_var->mergeFacesFeatures();

Property Value

This is a read only property whose value is a MergeFacesFeatures.

Version

Introduced in version September 2024


Features.meshCombineFaceGroupsFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh combine face groups features within the component and supports the creation of new mesh combine face groups features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshCombineFaceGroupsFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshCombineFaceGroupsFeatures> propertyValue = features_var->meshCombineFaceGroupsFeatures();

Property Value

This is a read only property whose value is a MeshCombineFaceGroupsFeatures.

Version

Introduced in version January 2025


Features.meshCombineFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh combine features within the component and supports the creation of new mesh combine features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshCombineFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshCombineFeatures> propertyValue = features_var->meshCombineFeatures();

Property Value

This is a read only property whose value is a MeshCombineFeatures.

Version

Introduced in version January 2025


Features.meshGenerateFaceGroupsFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh generate facegroup features within the component and supports the creation of new mesh generate facegroup features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshGenerateFaceGroupsFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshGenerateFaceGroupsFeatures> propertyValue = features_var->meshGenerateFaceGroupsFeatures();

Property Value

This is a read only property whose value is a MeshGenerateFaceGroupsFeatures.

Version

Introduced in version January 2025


Features.meshReduceFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh reduce features within the component and supports the creation of new mesh reduce features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshReduceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshReduceFeatures> propertyValue = features_var->meshReduceFeatures();

Property Value

This is a read only property whose value is a MeshReduceFeatures.

Version

Introduced in version March 2024


Features.meshRemeshFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh remesh features within the component and supports the creation of new mesh remesh features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshRemeshFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshRemeshFeatures> propertyValue = features_var->meshRemeshFeatures();

Property Value

This is a read only property whose value is a MeshRemeshFeatures.

Version

Introduced in version March 2024


Features.meshRepairFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh repair features within the component and supports the creation of new mesh repair features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshRepairFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshRepairFeatures> propertyValue = features_var->meshRepairFeatures();

Property Value

This is a read only property whose value is a MeshRepairFeatures.

Version

Introduced in version March 2024


Features.meshShellFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh shell features within the component and supports the creation of new mesh shell features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshShellFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshShellFeatures> propertyValue = features_var->meshShellFeatures();

Property Value

This is a read only property whose value is a MeshShellFeatures.

Version

Introduced in version March 2024


Features.meshSmoothFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mesh smooth features within the component and supports the creation of new mesh smooth features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.meshSmoothFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MeshSmoothFeatures> propertyValue = features_var->meshSmoothFeatures();

Property Value

This is a read only property whose value is a MeshSmoothFeatures.

Version

Introduced in version March 2024


Features.mirrorFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the mirror features within the component and supports the creation of new mirror features.

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
mirrorFeatures.add | Demonstrates the mirrorFeatures.add method by mirroring the selected body around the base X-Y construction plane.
Mirror Feature API Sample | Demonstrates creating a new mirror feature

Version

Introduced in version November 2014


Features.moveFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Move features within the component and supports the creation of new Move features.

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
moveFeatures.add | Demonstrates the moveFeatures.add method.
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version January 2015


Features.objectType Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing Offset Face features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Offset features within the component and supports the creation of new Offset features.

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.

Samples

Name | Description
offsetFeatures.add | Demonstrates the offsetFeatures.add method. This is the equivalent of the Offset command in the SURFACE tab.

Version

Introduced in version June 2015


Features.patchFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Patch features within the component and supports the creation of new Patch features.

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
patchFeatures.add | Demonstrates the patchFeatures.add method by creating a patch surface on the selected profile.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version September 2015


Features.pathPatternFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the path pattern features within the component and supports the creation of new path pattern features.

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
pathPatternFeatures.add | Demonstrates the pathPatternFeatures.add method using a selected body and sketch curve as the path.
Path Pattern Feature API Sample | Demonstrates creating a new path pattern feature.

Version

Introduced in version November 2014


Features.pipeFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing pipe features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.pipeFeatures
"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->pipeFeatures();

Property Value

This is a read only property whose value is a PipeFeatures.

Version

Introduced in version January 2022


Features.rectangularPatternFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the rectangular pattern features within the component and supports the creation of new rectangular pattern features.

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 API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
rectangularPattern.add | Demonstrates the rectangularPattern.add method using a selected body and two selected edges to define the directions.
RectangularPattern Feature | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


Features.refoldFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing refold features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.refoldFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RefoldFeatures> propertyValue = features_var->refoldFeatures();

Property Value

This is a read only property whose value is a RefoldFeatures.

Version

Introduced in version August 2020


Features.removeFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Remove features within the component and supports the creation of new Remove features.

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.

Samples

Name | Description
removeFeatures.add | Demonstrate the removeFeatures.add method. The Remove feature is the same as selecting a body in the browser and selecting "Remove" in the context menu.

Version

Introduced in version September 2015


Features.replaceFaceFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the replaceFace features within the component and supports the creation of new replaceFace features.

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
replaceFaceFeatures.add | Demonstrate the remove replaceFaceFeatures.add method.
ReplaceFace Feature | Demonstrates creating a new replaceface feature.

Version

Introduced in version January 2015


Features.reverseNormalFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Reverse Normal features within the component and supports the creation of new Reverse Normal features.

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.

Samples

Name | Description
reverseNormalFeatures.add | Demonstrates the reverseNormalFeatures.add method.

Version

Introduced in version September 2015


Features.revolveFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the revolve features within the component and supports the creation of new revolved features.

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
revolveFeatures.add | Demonstrates creating a revolve feature using an angle extent.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing rib features.

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.ripFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing Rip features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.ripFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RipFeatures> propertyValue = features_var->ripFeatures();

Property Value

This is a read only property whose value is a RipFeatures.

Samples

Name | Description
Rip Feature Sample | Demonstrates creating a new sheet metal rip feature.

Version

Introduced in version September 2023


Features.ruledSurfaceFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Ruled Surface features within the component and supports the creation of new Ruled Surface features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.ruledSurfaceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RuledSurfaceFeatures> propertyValue = features_var->ruledSurfaceFeatures();

Property Value

This is a read only property whose value is a RuledSurfaceFeatures.

Samples

Name | Description
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2020


Features.ruleFilletFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing form features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the scale features within the component and supports the creation of new scale features.

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.

Samples

Name | Description
scaleFeatures.add | Demonstrates the creation a scale feature.

Version

Introduced in version January 2015


Features.shellFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the shell features within the component and supports the creation of new shell features.

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
shellFeatures.add | Demonstrates creating a shell feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


Features.silhouetteSplitFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

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

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
silhouetteSplitFeatures.add | Demonstrates the silhouetteSplitFeatures.add method. The Silhouette Split feature is limited in the bodies it will split. The simplest body to get a valid result is to create a sphere and split it.
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


Features.sphereFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing sphere features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the SplitBody features within the component and supports the creation of new SplitBody features

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
splitBodyFeatures.add | Demonstrates the splitBodyFeatures.add method.
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


Features.splitFaceFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the SplitFace features within the component and supports the creation of new SplitFace features

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
splitFaceFeatures.add | Demonstrates the splitFaceFeatures.add method by spliting a face with another intersecting face.
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


Features.stitchFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Stitch features within the component and supports the creation of new Stitch features.

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.

Samples

Name | Description
stitchFeatures.add | Demonstrates the stitchFeatures.add method.

Version

Introduced in version June 2015


Features.surfaceDeleteFaceFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing Surface Delete Face features.

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.

Samples

Name | Description
surfaceDeleteFeatures.add | Demonstrates the surfaceDeleteFeatures.add method.

Version

Introduced in version August 2016


Features.sweepFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the sweep features within the component and supports the creation of new sweep features.

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
sweepFeatures.add | Demonstrates the sweepFeatures.add method.
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.tessellateFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the tessellate features within the component and supports the creation of new tessellate features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.tessellateFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<TessellateFeatures> propertyValue = features_var->tessellateFeatures();

Property Value

This is a read only property whose value is a TessellateFeatures.

Version

Introduced in version January 2025


Features.thickenFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Thicken features within the component and supports the creation of new Thicken features.

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.

Samples

Name | Description
thickenFeatures.add | Demonstrates the thickenFeatures.add method.

Version

Introduced in version June 2015


Features.threadFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the thread features within the component and supports the creation of new thread features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing torus features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Trim features within the component and supports the creation of new Trim features.

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.

Samples

Name | Description
trimFeatures.add | Demonstrates the trimFeatures.add method.

Version

Introduced in version July 2015


Features.unfoldFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing unfold features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.unfoldFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<UnfoldFeatures> propertyValue = features_var->unfoldFeatures();

Property Value

This is a read only property whose value is a UnfoldFeatures.

Version

Introduced in version August 2020


Features.unstitchFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Unstitch features within the component and supports the creation of new Unstitch features.

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.untrimFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Untrim features within the component and supports the creation of new Untrim features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.untrimFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<UntrimFeatures> propertyValue = features_var->untrimFeatures();

Property Value

This is a read only property whose value is a UntrimFeatures.

Version

Introduced in version January 2021


Features.volumetricCustomFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to volumetric custom features within the component and supports the creation of new volumetric custom features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.volumetricCustomFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<VolumetricCustomFeatures> propertyValue = features_var->volumetricCustomFeatures();

Property Value

This is a read only property whose value is a VolumetricCustomFeatures.

Version

Introduced in version May 2025


Features.volumetricModelToMeshFeatures Property

Parent Object: Features

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the Volumetric Model to Mesh features within the component and supports the creation of new Volumetric Model to Mesh features.

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.volumetricModelToMeshFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<VolumetricModelToMeshFeatures> propertyValue = features_var->volumetricModelToMeshFeatures();

Property Value

This is a read only property whose value is a VolumetricModelToMeshFeatures.

Version

Introduced in version May 2025


Features.webFeatures Property

Parent Object: Features
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Features.h>

Description

Returns the collection that provides access to the existing web features.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 canceled 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 canceled 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 separated by semi-colons. Multiple filters are separated 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
title | Gets or sets the title displayed on the dialog.

Accessed From

UserInterface.createFileDialog

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.classType Method

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.filenames Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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 separated by semi-colons. Multiple filters are separated 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 (*.*)

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.filterIndex Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.initialDirectory Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Gets or sets the initial directory displayed by the file dialog box.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Gets or sets a value indicating whether the dialog box allows multiple files to be selected.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.isValid Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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 canceled without selecting a file. The Filename and Filenames properties can be used to get the selected files.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

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 canceled without selecting a file. The Filename and Filenames properties can be used to get the selected files.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FileDialog.title Property

Parent Object: FileDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FileDialog.h>

Description

Gets or sets the title displayed on the dialog.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


FilenameProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

A property that defines a filename.

This is most commonly used for properties associated with materials and appearances.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FilenameProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Gets the boolean flag that indicates if this property has multiple values or not.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Gets and sets the value of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FilenameProperty.h>

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

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/Application/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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

The base class for the classes that define the different types of fillet edge sets.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 fillet edge set from the fillet. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.
isTangentChain | Gets and sets the Tangent chain for fillet. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tangencyWeight | Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Accessed From

FilletEdgeSets.item

Derived Classes

ChordLengthFilletEdgeSet, ConstantRadiusFilletEdgeSet, VariableRadiusFilletEdgeSet

Version

Introduced in version November 2014


FilletEdgeSet.classType Method

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.continuity Property

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

# Get the value of the property.
propertyValue = filletEdgeSet_var.continuity

# Set the value of the property.
filletEdgeSet_var.continuity = propertyValue
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
#include <Fusion/Features/FilletEdgeSet.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = filletEdgeSet_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = filletEdgeSet_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


FilletEdgeSet.deleteMe Method

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Deletes the fillet edge set from the fillet.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
returnValue = filletEdgeSet_var.deleteMe()
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

#include <Fusion/Features/FilletEdgeSet.h>

returnValue = filletEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version November 2022


FilletEdgeSet.isTangentChain Property

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Gets and sets the Tangent chain for fillet. This enables tangent chain option for fillet.

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

# Get the value of the property.
propertyValue = filletEdgeSet_var.isTangentChain

# Set the value of the property.
filletEdgeSet_var.isTangentChain = propertyValue
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
#include <Fusion/Features/FilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = filletEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


FilletEdgeSet.isValid Property

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


FilletEdgeSet.tangencyWeight Property

Parent Object: FilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSet.h>

Description

Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

# Get the value of the property.
propertyValue = filletEdgeSet_var.tangencyWeight
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
#include <Fusion/Features/FilletEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = filletEdgeSet_var->tangencyWeight();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2022


FilletEdgeSetInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Represents the input to define a fillet edge set.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.
entities | Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tangencyWeight | Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Accessed From

FilletEdgeSetInputs.item

Derived Classes

ChordLengthFilletEdgeSetInput, ConstantRadiusFilletEdgeSetInput, VariableRadiusFilletEdgeSetInput

Version

Introduced in version November 2022


FilletEdgeSetInput.classType Method

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletEdgeSetInput.classType()
This is a static method.

#include <Fusion/Features/FilletEdgeSetInput.h>

returnValue = adsk::fusion::FilletEdgeSetInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


FilletEdgeSetInput.continuity Property

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.

Syntax

  • Python
  • C++
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.

# Get the value of the property.
propertyValue = filletEdgeSetInput_var.continuity

# Set the value of the property.
filletEdgeSetInput_var.continuity = propertyValue
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.
#include <Fusion/Features/FilletEdgeSetInput.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = filletEdgeSetInput_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = filletEdgeSetInput_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


FilletEdgeSetInput.entities Property

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.

Syntax

  • Python
  • C++
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.

# Get the value of the property.
propertyValue = filletEdgeSetInput_var.entities

# Set the value of the property.
filletEdgeSetInput_var.entities = propertyValue
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.
#include <Fusion/Features/FilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = filletEdgeSetInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = filletEdgeSetInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


FilletEdgeSetInput.isValid Property

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.

# Get the value of the property.
propertyValue = filletEdgeSetInput_var.isValid
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.
#include <Fusion/Features/FilletEdgeSetInput.h>

// Get the value of the property.
boolean propertyValue = filletEdgeSetInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


FilletEdgeSetInput.objectType Property

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.

# Get the value of the property.
propertyValue = filletEdgeSetInput_var.objectType
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.
#include <Fusion/Features/FilletEdgeSetInput.h>

// Get the value of the property.
string propertyValue = filletEdgeSetInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


FilletEdgeSetInput.tangencyWeight Property

Parent Object: FilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInput.h>

Description

Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Syntax

  • Python
  • C++
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.

# Get the value of the property.
propertyValue = filletEdgeSetInput_var.tangencyWeight

# Set the value of the property.
filletEdgeSetInput_var.tangencyWeight = propertyValue
"filletEdgeSetInput_var" is a variable referencing a FilletEdgeSetInput object.
#include <Fusion/Features/FilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = filletEdgeSetInput_var->tangencyWeight();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = filletEdgeSetInput_var->tangencyWeight(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


FilletEdgeSetInputs Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Collection of edge sets associated with the input object that will be used to create the new fillet feature. Use the various add methods on this object to add new edge sets to the input object.

Methods

Name | Description
addChordLengthEdgeSet | Adds a set of edges to be filleted with a chord length fillet to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned ChordLengthFilletEdgeSetInput object.
addConstantRadiusEdgeSet | Adds a constant radius fillet edge set to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned ConstantRadiusFilletEdgeSetInput object.
addVariableRadiusEdgeSet | Adds a single edge or set of tangent edges to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned VariableRadiusFilletEdgeSetInput 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().
item | Function that returns the specified fillet edge set input using an index into the collection.

Properties

Name | Description
count | The number of fillet edge set input 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

FilletFeatureInput.edgeSetInputs

Samples

Name | Description
filletFeatures.add | Demonstrates the filletFeatures.add method.
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


FilletEdgeSetInputs.addChordLengthEdgeSet Method

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Adds a set of edges to be filleted with a chord length fillet to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned ChordLengthFilletEdgeSetInput object.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
returnValue = filletEdgeSetInputs_var.addChordLengthEdgeSet(entities, chordLength, isTangentChain)
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

#include <Fusion/Features/FilletEdgeSetInputs.h>

returnValue = filletEdgeSetInputs_var->addChordLengthEdgeSet(entities, chordLength, isTangentChain);

Return Value

Type | Description
ChordLengthFilletEdgeSetInput | Returns the newly created ChordLengthFilletEdgeSetInput. This object provides access to additional settings.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepEdge, BRepFace, and Feature objects to be filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.
chordLength | ValueInput | A ValueInput object that defines the chord length of the fillet. If the ValueInput uses a real value 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") or if no units are specified it is interpreted using the current document units for length.
isTangentChain | boolean | A boolean value for setting whether or not edges or faces that are tangentially connected to the input edges or faces (if any) will also be filleted.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


FilletEdgeSetInputs.addConstantRadiusEdgeSet Method

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Adds a constant radius fillet edge set to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned ConstantRadiusFilletEdgeSetInput object.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
returnValue = filletEdgeSetInputs_var.addConstantRadiusEdgeSet(entities, radius, isTangentChain)
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

#include <Fusion/Features/FilletEdgeSetInputs.h>

returnValue = filletEdgeSetInputs_var->addConstantRadiusEdgeSet(entities, radius, isTangentChain);

Return Value

Type | Description
ConstantRadiusFilletEdgeSetInput | Returns the newly created ConstantRadiusFilletEdgeSetInput. This object provides access to additional settings.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepEdge, BRepFace, and Feature objects to be filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.
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") or 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
filletFeatures.add | Demonstrates the filletFeatures.add method.
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


FilletEdgeSetInputs.addVariableRadiusEdgeSet Method

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Adds a single edge or set of tangent edges to the fillet feature input. Some settings are initialized with a default value and can be set by modifying properties on the returned VariableRadiusFilletEdgeSetInput object.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
returnValue = filletEdgeSetInputs_var.addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, isTangentChain)
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

#include <Fusion/Features/FilletEdgeSetInputs.h>

returnValue = filletEdgeSetInputs_var->addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, isTangentChain);

Return Value

Type | Description
VariableRadiusFilletEdgeSetInput | Returns the newly created VariableRadiusFilletEdgeSetInput. This object provides access to additional settings.

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 their connected order. If a single edge is input, you can use the isTangentChain argument to automatically find any tangentially connected edges.
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 start 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") or 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") or 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 single input edge will also be filleted.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


FilletEdgeSetInputs.classType Method

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletEdgeSetInputs.classType()
This is a static method.

#include <Fusion/Features/FilletEdgeSetInputs.h>

returnValue = adsk::fusion::FilletEdgeSetInputs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


FilletEdgeSetInputs.count Property

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

The number of fillet edge set input objects in the collection.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

# Get the value of the property.
propertyValue = filletEdgeSetInputs_var.count
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
#include <Fusion/Features/FilletEdgeSetInputs.h>

// Get the value of the property.
uinteger propertyValue = filletEdgeSetInputs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2022


FilletEdgeSetInputs.isValid Property

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

# Get the value of the property.
propertyValue = filletEdgeSetInputs_var.isValid
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
#include <Fusion/Features/FilletEdgeSetInputs.h>

// Get the value of the property.
boolean propertyValue = filletEdgeSetInputs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


FilletEdgeSetInputs.item Method

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

Function that returns the specified fillet edge set input using an index into the collection.

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
returnValue = filletEdgeSetInputs_var.item(index)
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

#include <Fusion/Features/FilletEdgeSetInputs.h>

returnValue = filletEdgeSetInputs_var->item(index);

Return Value

Type | Description
FilletEdgeSetInput | 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. The edge sets are returned in the same order they were created in.

Version

Introduced in version November 2022


FilletEdgeSetInputs.objectType Property

Parent Object: FilletEdgeSetInputs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSetInputs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.

# Get the value of the property.
propertyValue = filletEdgeSetInputs_var.objectType
"filletEdgeSetInputs_var" is a variable referencing a FilletEdgeSetInputs object.
#include <Fusion/Features/FilletEdgeSetInputs.h>

// Get the value of the property.
string propertyValue = filletEdgeSetInputs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


FilletEdgeSets Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Collection that provides access to all of the existing fillet edge sets associated with a fillet feature.

Methods

Name | Description
addChordLengthEdgeSet | Adds a set of edges with a chord length to this fillet feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
addConstantRadiusEdgeSet | Adds a set of edges with a constant radius to this fillet feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
addVariableRadiusEdgeSet | Adds a single edge or set of tangent edges along with variable radius information to this fillet feature. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

FilletFeature.edgeSets

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletEdgeSets.addChordLengthEdgeSet Method

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Adds a set of edges with a chord length to this fillet feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
returnValue = filletEdgeSets_var.addChordLengthEdgeSet(entities, chordLength, isTangentChain)
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

#include <Fusion/Features/FilletEdgeSets.h>

returnValue = filletEdgeSets_var->addChordLengthEdgeSet(entities, chordLength, isTangentChain);

Return Value

Type | Description
ChordLengthFilletEdgeSet | Returns the newly created FilletEdgeSet.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepEdge, BRepFace, and Feature objects to be filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.
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") or 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.

Version

Introduced in version November 2022


FilletEdgeSets.addConstantRadiusEdgeSet Method

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Adds a set of edges with a constant radius to this fillet feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
returnValue = filletEdgeSets_var.addConstantRadiusEdgeSet(entities, radius, isTangentChain)
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

#include <Fusion/Features/FilletEdgeSets.h>

returnValue = filletEdgeSets_var->addConstantRadiusEdgeSet(entities, radius, isTangentChain);

Return Value

Type | Description
ConstantRadiusFilletEdgeSet | Returns the newly created FilletEdgeSet.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepEdge, BRepFace, and Feature objects to be filleted. If the isTangentChain argument is true additional edges or faces may also get filleted if they are tangentially connected to any of the input edges or faces.
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") or 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.

Version

Introduced in version November 2022


FilletEdgeSets.addVariableRadiusEdgeSet Method

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Adds a single edge or set of tangent edges along with variable radius information to this fillet feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
returnValue = filletEdgeSets_var.addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, positions, radii, isTangentChain)
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

#include <Fusion/Features/FilletEdgeSets.h>

returnValue = filletEdgeSets_var->addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, positions, radii, isTangentChain);

Return Value

Type | Description
VariableRadiusFilletEdgeSet | Returns the newly created FilletEdgeSet.

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 their connected order. If a single edge is input, you can use the isTangentChain argument to automatically find any tangentially connected edges.
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") or 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") or 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 additional 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.
isTangentChain | boolean | A boolean value for setting whether or not edges that are tangentially connected to the single input edge will also be filleted.

Version

Introduced in version November 2022


FilletEdgeSets.classType Method

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

The number of fillet edge sets in the collection.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletEdgeSets.isValid Property

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

Function that returns the specified fillet edge set using an index into the collection.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletEdgeSets.objectType Property

Parent Object: FilletEdgeSets
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletEdgeSets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Object that represents an existing fillet feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
edgeSets | Returns the edge sets collection associated with this fillet.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isG2 | **RETIRED** 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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | **RETIRED** 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeature.assemblyContext Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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 fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeature.dissolve Method

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the edge sets collection associated with this fillet.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletFeature.entityToken Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.entityToken
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
string propertyValue = filletFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


FilletFeature.errorOrWarningMessage Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option.

Remarks

This property is obsolete. You should now use the continuity property on the FilletEdgeSet object to control the continuity.

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.

Version

Introduced in version November 2014
Retired in version November 2022


FilletFeature.isParametric Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Gets and sets if a rolling ball solution is to be used in any corners.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletFeature.isSuppressed Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be filleted.

Remarks

This property is obsolete. You should now use the isTangentChain property on the FilletEdgeSet object.

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.

Version

Introduced in version March 2021
Retired in version November 2022


FilletFeature.isValid Property

Parent Object: FilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeature.h>

Description

Returns the timeline object associated with this feature.

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.

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a fillet feature.

Methods

Name | Description
addChordLengthEdgeSet | **RETIRED** Adds a set of edges with a chord length to this input.
addConstantRadiusEdgeSet | **RETIRED** Adds a set of edges with a constant radius to this input.
addVariableRadiusEdgeSet | **RETIRED** 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
edgeSetInputs | Gets the FilletEdgeSetInputs object that provides support to create the various types of edge sets that will be used to create the fillet.
isG2 | **RETIRED** Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option.
isRollingBallCorner | Gets and sets if a rolling ball or setback solution is to be used in any corners.
isTangentChain | **RETIRED** 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeatureInput.addChordLengthEdgeSet Method

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a set of edges with a chord length to this input.

Remarks

This method is obsolete. You should now use the methods on the EdgeSetInputs objects to define new fillets.

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") or 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.

Version

Introduced in version November 2015
Retired in version November 2022


FilletFeatureInput.addConstantRadiusEdgeSet Method

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a set of edges with a constant radius to this input.

Remarks

This method is obsolete. You should now use the methods on the EdgeSetInputs objects to define new fillets.

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") or 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.

Version

Introduced in version November 2014
Retired in version November 2022


FilletFeatureInput.addVariableRadiusEdgeSet Method

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Adds a single edge or set of tangent edges along with variable radius information to this input.

Remarks

This method is obsolete. You should now use the methods on the EdgeSetInputs objects to define new fillets.

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") or 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") or 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 additional 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.

Version

Introduced in version November 2014
Retired in version November 2022


FilletFeatureInput.classType Method

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.edgeSetInputs Property

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

Gets the FilletEdgeSetInputs object that provides support to create the various types of edge sets that will be used to create the fillet.

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.edgeSetInputs
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
Ptr<FilletEdgeSetInputs> propertyValue = filletFeatureInput_var->edgeSetInputs();

Property Value

This is a read only property whose value is a FilletEdgeSetInputs.

Samples

Name | Description
filletFeatures.add | Demonstrates the filletFeatures.add method.
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


FilletFeatureInput.isG2 Property

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option.

Remarks

This property is obsolete. You should now use the continuity property on the EdgeSetInput object to control the continuity. define new fillets.

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.

Version

Introduced in version November 2014
Retired in version November 2022


FilletFeatureInput.isRollingBallCorner Property

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

Gets and sets if a rolling ball or setback solution is to be used in any corners.

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 fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeatureInput.isTangentChain Property

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets if any edges that are tangentially connected to any of filleted edges will also be included in the fillet.

Remarks

This property is obsolete. You should now use the FilletEdgeSet object to define if the tangency chaining should be used for entities in that edge set.

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
Retired in version November 2022


FilletFeatureInput.isValid Property

Parent Object: FilletFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Collection that provides access to all of the existing fillet features in a component and supports the ability to create new fillet features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.filletFeatures

Samples

Name | Description
Constant Radius Fillet API Sample | 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 Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeatures.add Method

Parent Object: FilletFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Creates a new fillet feature.

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 API Sample | Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.
filletFeatures.add | Demonstrates the filletFeatures.add method.
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


filletFeatures.add

Description

Demonstrates the filletFeatures.add method.

Code Samples

  • Python
def demo_filletFeatures_add(rootComp: adsk.fusion.Component):
    # Have an edge selected.
    edge = _ui.selectEntity('Select an edge', 'Edges').entity
    edgesToFillet = adsk.core.ObjectCollection.create()

    # Define the required input.
    edgesToFillet.add(edge)
    filletFeatures = rootComp.features.filletFeatures
    input = filletFeatures.createInput()
    radius = adsk.core.ValueInput.createByReal(2)
    isTangentChain = True

    input.edgeSetInputs.addConstantRadiusEdgeSet(edgesToFillet, radius, isTangentChain)

    # Create the fillet.
    filletFeature = filletFeatures.add(input)


FilletFeatures.classType Method

Parent Object: FilletFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

The number of fillet features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

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.

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 API Sample | Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.
filletFeatures.add | Demonstrates the filletFeatures.add method.
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2014


FilletFeatures.isValid Property

Parent Object: FilletFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Function that returns the specified fillet feature using an index into the collection.

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.

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


FilletFeatures.itemByName Method

Parent Object: FilletFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

Function that returns the specified fillet feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FilletFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


FitOnPathTextDefintion Object

Derived from: SketchTextDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Defines the information for text that fits along a path.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isAbovePath | Gets and sets if the text should be positioned above or below the path 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketchText | Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.
path | Get and sets the entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.

Version

Introduced in version December 2020


FitOnPathTextDefintion.classType Method

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FitOnPathTextDefintion.classType()
This is a static method.

#include <Fusion/Sketch/FitOnPathTextDefintion.h>

returnValue = adsk::fusion::FitOnPathTextDefintion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


FitOnPathTextDefintion.isAbovePath Property

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Gets and sets if the text should be positioned above or below the path entity.

Syntax

  • Python
  • C++
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.

# Get the value of the property.
propertyValue = fitOnPathTextDefintion_var.isAbovePath

# Set the value of the property.
fitOnPathTextDefintion_var.isAbovePath = propertyValue
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.
#include <Fusion/Sketch/FitOnPathTextDefintion.h>

// Get the value of the property.
boolean propertyValue = fitOnPathTextDefintion_var->isAbovePath();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fitOnPathTextDefintion_var->isAbovePath(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


FitOnPathTextDefintion.isValid Property

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.

# Get the value of the property.
propertyValue = fitOnPathTextDefintion_var.isValid
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.
#include <Fusion/Sketch/FitOnPathTextDefintion.h>

// Get the value of the property.
boolean propertyValue = fitOnPathTextDefintion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


FitOnPathTextDefintion.objectType Property

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.

# Get the value of the property.
propertyValue = fitOnPathTextDefintion_var.objectType
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.
#include <Fusion/Sketch/FitOnPathTextDefintion.h>

// Get the value of the property.
string propertyValue = fitOnPathTextDefintion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


FitOnPathTextDefintion.parentSketchText Property

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.

Syntax

  • Python
  • C++
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.

# Get the value of the property.
propertyValue = fitOnPathTextDefintion_var.parentSketchText
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.
#include <Fusion/Sketch/FitOnPathTextDefintion.h>

// Get the value of the property.
Ptr<SketchText> propertyValue = fitOnPathTextDefintion_var->parentSketchText();

Property Value

This is a read only property whose value is a SketchText.

Version

Introduced in version July 2022


FitOnPathTextDefintion.path Property

Parent Object: FitOnPathTextDefintion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/FitOnPathTextDefintion.h>

Description

Get and sets the entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.

Syntax

  • Python
  • C++
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.

# Get the value of the property.
propertyValue = fitOnPathTextDefintion_var.path

# Set the value of the property.
fitOnPathTextDefintion_var.path = propertyValue
"fitOnPathTextDefintion_var" is a variable referencing a FitOnPathTextDefintion object.
#include <Fusion/Sketch/FitOnPathTextDefintion.h>

// Get the value of the property.
Ptr<Base> propertyValue = fitOnPathTextDefintion_var->path();

// Set the value of the property, where value_var is a Base.
bool returnValue = fitOnPathTextDefintion_var->path(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version December 2020


FlangeFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Object that represents an existing flange feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

FlangeFeatures.item, FlangeFeatures.itemByName

Version

Introduced in version August 2020


FlangeFeature.assemblyContext Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

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.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.assemblyContext
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = flangeFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2020


FlangeFeature.attributes Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.attributes
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = flangeFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2020


FlangeFeature.baseFeature Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

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.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.baseFeature
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = flangeFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version August 2020


FlangeFeature.bodies Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.bodies
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = flangeFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2020


FlangeFeature.classType Method

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FlangeFeature.classType()
This is a static method.

#include <Fusion/SheetMetal/FlangeFeature.h>

returnValue = adsk::fusion::FlangeFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


FlangeFeature.deleteMe Method

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.
returnValue = flangeFeature_var.deleteMe()
"flangeFeature_var" is a variable referencing a FlangeFeature object.

#include <Fusion/SheetMetal/FlangeFeature.h>

returnValue = flangeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2020


FlangeFeature.dissolve Method

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

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.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.
returnValue = flangeFeature_var.dissolve()
"flangeFeature_var" is a variable referencing a FlangeFeature object.

#include <Fusion/SheetMetal/FlangeFeature.h>

returnValue = flangeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2020


FlangeFeature.entityToken Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.entityToken
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
string propertyValue = flangeFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


FlangeFeature.errorOrWarningMessage Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

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.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.errorOrWarningMessage
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
string propertyValue = flangeFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


FlangeFeature.faces Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.faces
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = flangeFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2020


FlangeFeature.healthState Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.healthState
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = flangeFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version August 2020


FlangeFeature.isParametric Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.isParametric
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
boolean propertyValue = flangeFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


FlangeFeature.isSuppressed Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.isSuppressed

# Set the value of the property.
flangeFeature_var.isSuppressed = propertyValue
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
boolean propertyValue = flangeFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flangeFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2020


FlangeFeature.isValid Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.isValid
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
boolean propertyValue = flangeFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


FlangeFeature.linkedFeatures Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

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.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.linkedFeatures
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = flangeFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version August 2020


FlangeFeature.name Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.name

# Set the value of the property.
flangeFeature_var.name = propertyValue
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
string propertyValue = flangeFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = flangeFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2020


FlangeFeature.objectType Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.objectType
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
string propertyValue = flangeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


FlangeFeature.parentComponent Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.parentComponent
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = flangeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2020


FlangeFeature.timelineObject Property

Parent Object: FlangeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"flangeFeature_var" is a variable referencing a FlangeFeature object.

# Get the value of the property.
propertyValue = flangeFeature_var.timelineObject
"flangeFeature_var" is a variable referencing a FlangeFeature object.
#include <Fusion/SheetMetal/FlangeFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = flangeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2020


FlangeFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

Collection that provides access to all of the existing flange features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 flange feature using an index into the collection.
itemByName | Function that returns the specified flange feature using the name of the feature.

Properties

Name | Description
count | The number of flange 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.flangeFeatures

Version

Introduced in version August 2020


FlangeFeatures.classType Method

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FlangeFeatures.classType()
This is a static method.

#include <Fusion/SheetMetal/FlangeFeatures.h>

returnValue = adsk::fusion::FlangeFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


FlangeFeatures.count Property

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

The number of flange features in the collection.

Syntax

  • Python
  • C++
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.

# Get the value of the property.
propertyValue = flangeFeatures_var.count
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.
#include <Fusion/SheetMetal/FlangeFeatures.h>

// Get the value of the property.
uinteger propertyValue = flangeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2020


FlangeFeatures.isValid Property

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.

# Get the value of the property.
propertyValue = flangeFeatures_var.isValid
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.
#include <Fusion/SheetMetal/FlangeFeatures.h>

// Get the value of the property.
boolean propertyValue = flangeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


FlangeFeatures.item Method

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

Function that returns the specified flange feature using an index into the collection.

Syntax

  • Python
  • C++
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.
returnValue = flangeFeatures_var.item(index)
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.

#include <Fusion/SheetMetal/FlangeFeatures.h>

returnValue = flangeFeatures_var->item(index);

Return Value

Type | Description
FlangeFeature | 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 2020


FlangeFeatures.itemByName Method

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

Function that returns the specified flange feature using the name of the feature.

Syntax

  • Python
  • C++
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.
returnValue = flangeFeatures_var.itemByName(name)
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.

#include <Fusion/SheetMetal/FlangeFeatures.h>

returnValue = flangeFeatures_var->itemByName(name);

Return Value

Type | Description
FlangeFeature | 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 2020


FlangeFeatures.objectType Property

Parent Object: FlangeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlangeFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.

# Get the value of the property.
propertyValue = flangeFeatures_var.objectType
"flangeFeatures_var" is a variable referencing a FlangeFeatures object.
#include <Fusion/SheetMetal/FlangeFeatures.h>

// Get the value of the property.
string propertyValue = flangeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


FlatPattern Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

The FlatPattern object provides access to the flattened representation of a folded part. This supports most of the functionality of a regular component like creating sketches, construction geometry, and most features. Functionality that is not supported in a flat pattern will fail if you attempt to use it. For example, the creation of occurrences and new components is not supported. Also the creation of sheet metal features is not supported.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
getBendInfo | Returns bend information for the specified bend.

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.
bendLinesBody | Returns the wire B-Rep body that represents the bend lines of the flattened sheet metal part.
bodies Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
bottomFace | Returns the "bottom" face of the flat pattern B-Rep body.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
extentLinesBody | Returns the wire B-Rep body that represents the extent lines of the flattened sheet metal part.
faces Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
flatBody | Returns the B-Rep body that represents the flattened sheet metal part.
foldedBody | Returns the folded B-Rep body in the design that this flat pattern was created from.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
sideFaces | Returns the "side" faces of the flat pattern B-Rep body. These are the faces around the edge of the flat pattern that connect the top and bottom faces.
timelineObject | Returns the timeline object associated with this feature.
topFace | Returns the "top" face of the flat pattern B-Rep body.

Accessed From

Component.createFlatPattern, Component.flatPattern, FlatPatternComponent.createFlatPattern, FlatPatternComponent.flatPattern, FlatPatternProduct.flatPattern

Version

Introduced in version October 2022


FlatPattern.assemblyContext Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

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.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.assemblyContext
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = flatPattern_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version October 2022


FlatPattern.attributes Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.attributes
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = flatPattern_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version October 2022


FlatPattern.baseFeature Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

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.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.baseFeature
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = flatPattern_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version October 2022


FlatPattern.bendLinesBody Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the wire B-Rep body that represents the bend lines of the flattened sheet metal part.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.bendLinesBody
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = flatPattern_var->bendLinesBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version October 2022


FlatPattern.bodies Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.bodies
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = flatPattern_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version October 2022


FlatPattern.bottomFace Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the "bottom" face of the flat pattern B-Rep body.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.bottomFace
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = flatPattern_var->bottomFace();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version October 2022


FlatPattern.classType Method

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FlatPattern.classType()
This is a static method.

#include <Fusion/SheetMetal/FlatPattern.h>

returnValue = adsk::fusion::FlatPattern::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


FlatPattern.deleteMe Method

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.
returnValue = flatPattern_var.deleteMe()
"flatPattern_var" is a variable referencing a FlatPattern object.

#include <Fusion/SheetMetal/FlatPattern.h>

returnValue = flatPattern_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version October 2022


FlatPattern.dissolve Method

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

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.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.
returnValue = flatPattern_var.dissolve()
"flatPattern_var" is a variable referencing a FlatPattern object.

#include <Fusion/SheetMetal/FlatPattern.h>

returnValue = flatPattern_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version October 2022


FlatPattern.entityToken Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.entityToken
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
string propertyValue = flatPattern_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPattern.errorOrWarningMessage Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

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.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.errorOrWarningMessage
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
string propertyValue = flatPattern_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPattern.extentLinesBody Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the wire B-Rep body that represents the extent lines of the flattened sheet metal part.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.extentLinesBody
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = flatPattern_var->extentLinesBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version October 2022


FlatPattern.faces Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.faces
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = flatPattern_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2022


FlatPattern.flatBody Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the B-Rep body that represents the flattened sheet metal part.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.flatBody
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = flatPattern_var->flatBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version October 2022


FlatPattern.foldedBody Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the folded B-Rep body in the design that this flat pattern was created from.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.foldedBody
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = flatPattern_var->foldedBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version October 2022


FlatPattern.getBendInfo Method

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns bend information for the specified bend.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

(returnValue, isBendUp, bendAngle) = flatPattern_var.getBendInfo(bendEdge)

#include <Fusion/SheetMetal/FlatPattern.h

// Declare the output arguments.
Ptr<BRepEdge> bendEdge;
boolean isBendUp;
double bendAngle;
boolean returnValue = flatPattern_var->getBendInfo(bendEdge, isBendUp, bendAngle);

Return Value

Type | Description
boolean | Returns true if the bend information was successfully returned.

Parameters

Name | Type | Description
bendEdge | BRepEdge | The wire BrepEdge that represents a bend line in the model. The edges are obtained from the wire body returned by the bendLinesBody property.
isBendUp | boolean | Indicates if the bend is in the natural direction of the bend line or in the opposite direction. Returns true if the bend is in the same direction as the input bend line.
bendAngle | double | Returns the bend angle of the bend in radians.

Version

Introduced in version October 2022


FlatPattern.healthState Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.healthState
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
FeatureHealthStates propertyValue = flatPattern_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version October 2022


FlatPattern.isParametric Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.isParametric
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
boolean propertyValue = flatPattern_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


FlatPattern.isSuppressed Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.isSuppressed

# Set the value of the property.
flatPattern_var.isSuppressed = propertyValue
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
boolean propertyValue = flatPattern_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPattern_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPattern.isValid Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.isValid
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
boolean propertyValue = flatPattern_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


FlatPattern.linkedFeatures Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

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.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.linkedFeatures
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = flatPattern_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version October 2022


FlatPattern.name Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.name

# Set the value of the property.
flatPattern_var.name = propertyValue
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
string propertyValue = flatPattern_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = flatPattern_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


FlatPattern.objectType Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.objectType
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
string propertyValue = flatPattern_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPattern.parentComponent Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.parentComponent
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<Component> propertyValue = flatPattern_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version October 2022


FlatPattern.sideFaces Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the "side" faces of the flat pattern B-Rep body. These are the faces around the edge of the flat pattern that connect the top and bottom faces.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.sideFaces
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = flatPattern_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2022


FlatPattern.timelineObject Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.timelineObject
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = flatPattern_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version October 2022


FlatPattern.topFace Property

Parent Object: FlatPattern
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPattern.h>

Description

Returns the "top" face of the flat pattern B-Rep body.

Syntax

  • Python
  • C++
"flatPattern_var" is a variable referencing a FlatPattern object.

# Get the value of the property.
propertyValue = flatPattern_var.topFace
"flatPattern_var" is a variable referencing a FlatPattern object.
#include <Fusion/SheetMetal/FlatPattern.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = flatPattern_var->topFace();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version October 2022


FlatPatternComponent Object

Derived from: Component Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

This object represent the root component of a FlatPatternProduct. The flatPattern property will return a FlatPattern object that provides access to the resulting flat pattern geometry.

Methods

Name | Description
allOccurrencesByComponent | Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.
boundingBox2 | Returns the bounding box of the specified entity types within the 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().
createBRepEdgeProfile | Creates a profile based on the outside open edges of a BRepFace.
createFlatPattern | Creates a flat pattern of the sheet metal folded body. The isSheetMetal property of the BRepBody object can be used to determine if a particular body can be flattened. Creating a flat pattern will fail if a flat pattern already exists in the component. You can determine if a flat pattern already exists by checking if the flatPattern property returns a FlatPattern object or null.
createOpenProfile | Creates an open profile based on the input curve(s).
createThumbnail | Creates a thumbnail for this component. This can be a root component to get a thumbnail that represents the associated file, or it can be any sub component to get a thumbnail of a subset of the complete assembly or individual parts.
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 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

Properties

Name | Description
activeSheetMetalRule | Gets and sets the active sheet metal rule. This can return null in the case where the component has never contained any sheet metal related data.
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 flattens the assembly structure, including joint origins, when manipulating an assembly.
allAssemblyConstraints | Preview Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, 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 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 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 flattens the assembly structure, including rigid groups, when manipulating an assembly.
allTangentRelationships | Returns all tangent relationships in this component and any sub components. The tangent relationships returned are all in the context of this component so any tangent relationships in sub components will be proxies. This is primarily useful when used from the root component because Fusion flattens the assembly structure, including tangent relationships, when manipulating an assembly.
asBuiltJoints | Returns the collection of as-built joints associated with this component.
assemblyConstraints | Preview Returns the collection of assembly constraints 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. The boundingBox2 method provides greater control over which types of entities you want included in the bounding box calculation.
bRepBodies | Returns the B-Rep bodies collection associated with this component.
canvases | Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.
componentColor | Gets and sets the color associated with a component. This color is only used when the "Display Component Colors" command is enabled. Enabling the display of component colors is done through the command or API using the Application.isComponentColorsDisplayed property. When this is on, all bodies in a component will display using the color assigned to the component. Fusion randomly assigns a color to a component when it is created. This property allows you to get and change the assigned default color. Setting this property to null results in a new color being randomly assigned by Fusion. This is the equivalent of the "Cycle Component Color" command available in the context menu of a 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.
dataComponent Preview Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.
decals | Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.
description | Gets and sets the description associated with this component.
entityToken Returns a token for the Component object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same component.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
features | Returns the collection that provides access to all of the features associated with this component.
flatPattern | Gets the existing flat pattern or returns null in the case where a flat pattern doesn't exist in this component.
id Returns the persistent ID of the component. This ID is created with the component and does not change. Because this ID does not change, different revisions of the same design or copies of the design asset/file will retain this ID. If components from different designs have the same ID, it indicates they are either different revisions or a copy of the design was made. Therefore, this ID will always be unique within a single design, but may not be unique in an assembly where externally referenced designs include different revisions or copies of a design.

The ID is also the same ID used by PIM (Product Information Model).
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.
isCanvasFolderLightBulbOn | Gets and sets if the light bulb of the canvas folder as seen in the browser is on or off. This controls the visibility of all the canvases in the 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).
isDecalFolderLightBulbOn | Gets and sets whether the light bulb of the decal folder, as seen in the browser, is on or off. This controls the visibility of all the decals in the component.
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.
isLibraryItem | Gets whether the component was created from a fasteners library item."
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.
mfgdmModelId | Preview Returns the MFGDM model ID for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
orientedMinimumBoundingBox | Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the component. All other geometry types are ignored.
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 calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.
preciseBoundingBox | Returns a bounding box that tightly fits around all B-Rep bodies in the component. All other geometry types are ignored.
propertyGroups | Returns the PropertyGroups object associated with this component.
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.
tangentRelationships | Returns the collection of tangent relationships associated with this component.
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.

Version

Introduced in version October 2022


FlatPatternComponent.activeSheetMetalRule Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets the active sheet metal rule. This can return null in the case where the component has never contained any sheet metal related data.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.activeSheetMetalRule

# Set the value of the property.
flatPatternComponent_var.activeSheetMetalRule = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<SheetMetalRule> propertyValue = flatPatternComponent_var->activeSheetMetalRule();

// Set the value of the property, where value_var is a SheetMetalRule.
bool returnValue = flatPatternComponent_var->activeSheetMetalRule(value_var);

Property Value

This is a read/write property whose value is a SheetMetalRule.

Version

Introduced in version November 2022


FlatPatternComponent.allAsBuiltJoints Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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 flattens the assembly structure, including joint origins, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allAsBuiltJoints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<AsBuiltJoint>> propertyValue = flatPatternComponent_var->allAsBuiltJoints();

Property Value

This is a read only property whose value is an array of type AsBuiltJoint.

Version

Introduced in version October 2022


FlatPatternComponent.allAssemblyConstraints Property

Parent Object: FlatPatternComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allAssemblyConstraints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<AssemblyConstraint>> propertyValue = flatPatternComponent_var->allAssemblyConstraints();

Property Value

This is a read only property whose value is an array of type AssemblyConstraint.

Version

Introduced in version July 2025


FlatPatternComponent.allJointOrigins Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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 flattens the assembly structure, including as-built joints, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allJointOrigins
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<JointOrigin>> propertyValue = flatPatternComponent_var->allJointOrigins();

Property Value

This is a read only property whose value is an array of type JointOrigin.

Version

Introduced in version October 2022


FlatPatternComponent.allJoints Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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 flattens the assembly structure, including joints, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allJoints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<Joint>> propertyValue = flatPatternComponent_var->allJoints();

Property Value

This is a read only property whose value is an array of type Joint.

Version

Introduced in version October 2022


FlatPatternComponent.allOccurrences Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allOccurrences
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = flatPatternComponent_var->allOccurrences();

Property Value

This is a read only property whose value is an OccurrenceList.

Version

Introduced in version October 2022


FlatPatternComponent.allOccurrencesByComponent Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.allOccurrencesByComponent(component)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.allRigidGroups Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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 flattens the assembly structure, including rigid groups, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allRigidGroups
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<RigidGroup>> propertyValue = flatPatternComponent_var->allRigidGroups();

Property Value

This is a read only property whose value is an array of type RigidGroup.

Version

Introduced in version October 2022


FlatPatternComponent.allTangentRelationships Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns all tangent relationships in this component and any sub components. The tangent relationships returned are all in the context of this component so any tangent relationships in sub components will be proxies. This is primarily useful when used from the root component because Fusion flattens the assembly structure, including tangent relationships, when manipulating an assembly.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.allTangentRelationships
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
std::vector<Ptr<TangentRelationship>> propertyValue = flatPatternComponent_var->allTangentRelationships();

Property Value

This is a read only property whose value is an array of type TangentRelationship.

Version

Introduced in version October 2022


FlatPatternComponent.asBuiltJoints Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of as-built joints associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.asBuiltJoints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<AsBuiltJoints> propertyValue = flatPatternComponent_var->asBuiltJoints();

Property Value

This is a read only property whose value is an AsBuiltJoints.

Version

Introduced in version October 2022


FlatPatternComponent.assemblyConstraints Property

Parent Object: FlatPatternComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of assembly constraints associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.assemblyConstraints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<AssemblyConstraints> propertyValue = flatPatternComponent_var->assemblyConstraints();

Property Value

This is a read only property whose value is an AssemblyConstraints.

Version

Introduced in version July 2025


FlatPatternComponent.attributes Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.attributes
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = flatPatternComponent_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version October 2022


FlatPatternComponent.boundingBox Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the bounding box of this component. This is always in world space of the component. The boundingBox2 method provides greater control over which types of entities you want included in the bounding box calculation.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.boundingBox
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = flatPatternComponent_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version October 2022


FlatPatternComponent.boundingBox2 Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the bounding box of the specified entity types within the component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.boundingBox2(entityTypes)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_var->boundingBox2(entityTypes);

Return Value

Type | Description
BoundingBox3D | Returns a BoundingBox3D object if the calculation was successful and null in the case where there is no valid geometry and the bounding box is empty.

Parameters

Name | Type | Description
entityTypes | BoundingBoxEntityTypes | Bitwise value that specifies the types of entities to include in the calculation of the bounding box.

Version

Introduced in version January 2024


FlatPatternComponent.bRepBodies Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the B-Rep bodies collection associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.bRepBodies
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = flatPatternComponent_var->bRepBodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version October 2022


FlatPatternComponent.canvases Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the canvases collection associated with this component. This provides access to the existing canvases and supports the creation of new canvases.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.canvases
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Canvases> propertyValue = flatPatternComponent_var->canvases();

Property Value

This is a read only property whose value is a Canvases.

Version

Introduced in version July 2023


FlatPatternComponent.classType Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FlatPatternComponent.classType()
This is a static method.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = adsk::fusion::FlatPatternComponent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


FlatPatternComponent.componentColor Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets the color associated with a component. This color is only used when the "Display Component Colors" command is enabled. Enabling the display of component colors is done through the command or API using the Application.isComponentColorsDisplayed property. When this is on, all bodies in a component will display using the color assigned to the component. Fusion randomly assigns a color to a component when it is created. This property allows you to get and change the assigned default color. Setting this property to null results in a new color being randomly assigned by Fusion. This is the equivalent of the "Cycle Component Color" command available in the context menu of a component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.componentColor

# Set the value of the property.
flatPatternComponent_var.componentColor = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Color> propertyValue = flatPatternComponent_var->componentColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = flatPatternComponent_var->componentColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version May 2024


FlatPatternComponent.constructionAxes Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.constructionAxes
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionAxes> propertyValue = flatPatternComponent_var->constructionAxes();

Property Value

This is a read only property whose value is a ConstructionAxes.

Version

Introduced in version October 2022


FlatPatternComponent.constructionPlanes Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.constructionPlanes
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPlanes> propertyValue = flatPatternComponent_var->constructionPlanes();

Property Value

This is a read only property whose value is a ConstructionPlanes.

Version

Introduced in version October 2022


FlatPatternComponent.constructionPoints Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.constructionPoints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPoints> propertyValue = flatPatternComponent_var->constructionPoints();

Property Value

This is a read only property whose value is a ConstructionPoints.

Version

Introduced in version October 2022


FlatPatternComponent.createBRepEdgeProfile Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Creates a profile based on the outside open edges of a BRepFace.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.createBRepEdgeProfile(edges)

# Uses optional arguments.
returnValue = flatPatternComponent_var.createBRepEdgeProfile(edges, chainEdges)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->createBRepEdgeProfile(edges);

// Uses optional arguments.
returnValue = flatPatternComponent_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 multiple edges or a BRepLoop is input. This is an optional argument whose default value is True.

Version

Introduced in version October 2022


FlatPatternComponent.createFlatPattern Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Creates a flat pattern of the sheet metal folded body. The isSheetMetal property of the BRepBody object can be used to determine if a particular body can be flattened. Creating a flat pattern will fail if a flat pattern already exists in the component. You can determine if a flat pattern already exists by checking if the flatPattern property returns a FlatPattern object or null.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.createFlatPattern(stationaryFace)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_var->createFlatPattern(stationaryFace);

Return Value

Type | Description
FlatPattern | Returns the newly created flat pattern.

Parameters

Name | Type | Description
stationaryFace | BRepFace | A planar face in the sheet metal body that is on the top or bottom of the part and not an edge face. This face will be positioned on the X-Y plane of the flat pattern and the rest of the model will be flattened relative to this face. The face must exist on a body that is owned by this component.

Version

Introduced in version October 2022


FlatPatternComponent.createOpenProfile Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Creates an open profile based on the input curve(s).

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.createOpenProfile(curves)

# Uses optional arguments.
returnValue = flatPatternComponent_var.createOpenProfile(curves, chainCurves)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->createOpenProfile(curves);

// Uses optional arguments.
returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.createThumbnail Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Creates a thumbnail for this component. This can be a root component to get a thumbnail that represents the associated file, or it can be any sub component to get a thumbnail of a subset of the complete assembly or individual parts.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.createThumbnail()

# Uses optional arguments.
returnValue = flatPatternComponent_var.createThumbnail(width, height, imageType)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->createThumbnail();

// Uses optional arguments.
returnValue = flatPatternComponent_var->createThumbnail(width, height, imageType);

Return Value

Type | Description
DataObject | Returns a DataObject that you can use to save the thumbnail to a file or to access the binary data of the bitmap directly.

Parameters

Name | Type | Description
width | integer | Optional argument to define the width of the thumbnail in pixels. A default width of 256 pixels is used if no width is specified. This is an optional argument whose default value is 256.
height | integer | Optional argument to define the height of the thumbnail in pixels. A default height of 256 pixels is used if no height is specified. This is an optional argument whose default value is 256.
imageType | string | Optional argument to define the type of image data to create. The default of PNG is used if no type is specified. Valid types include "PNG", "JPG", "TIF", and "BMP". This is an optional argument whose default value is "PNG".

Version

Introduced in version November 2024


FlatPatternComponent.customGraphicsGroups Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the customGraphicsGroups object in this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.customGraphicsGroups
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<CustomGraphicsGroups> propertyValue = flatPatternComponent_var->customGraphicsGroups();

Property Value

This is a read only property whose value is a CustomGraphicsGroups.

Version

Introduced in version October 2022


FlatPatternComponent.dataComponent Property

Parent Object: FlatPatternComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the DataComponent associated with this component. The DataComponent provides ID information that can be used to access this component using the MFG DM API. These ID's don't exist until a component has been saved. The ID's are generated by MFG DM API on the cloud, so there will be a slight delay after saving before the ID's are available. This property returns null in the case the MFG DM API information doesn't exist yet.

When opening a design, the MFG DM API information is obtained from the cloud and as a result may not be available immediately after opening a document. Again, this property will return null in this case too. Essentially, null is returned in all cases where good ID information is not yet available.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.dataComponent
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = flatPatternComponent_var->dataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Version

Introduced in version May 2024


FlatPatternComponent.decals Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the decals collection associated with this component. This provides access to the existing decals and supports the creation of new decals.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.decals
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Decals> propertyValue = flatPatternComponent_var->decals();

Property Value

This is a read only property whose value is a Decals.

Version

Introduced in version September 2024


FlatPatternComponent.description Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets the description associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.description

# Set the value of the property.
flatPatternComponent_var.description = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = flatPatternComponent_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.entityToken Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns a token for the Component object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same component.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.entityToken
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.features Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection that provides access to all of the features associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.features
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Features> propertyValue = flatPatternComponent_var->features();

Property Value

This is a read only property whose value is a Features.

Version

Introduced in version October 2022


FlatPatternComponent.findBRepUsingPoint Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Finds all the entities of the specified type at the specified location.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.findBRepUsingPoint(point, entityType)

# Uses optional arguments.
returnValue = flatPatternComponent_var.findBRepUsingPoint(point, entityType, proximityTolerance, visibleEntitiesOnly)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->findBRepUsingPoint(point, entityType);

// Uses optional arguments.
returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.findBRepUsingRay Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.findBRepUsingRay(originPoint, rayDirection, entityType)

# Uses optional arguments.
returnValue = flatPatternComponent_var.findBRepUsingRay(originPoint, rayDirection, entityType, proximityTolerance, visibleEntitiesOnly, hitPoints)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->findBRepUsingRay(originPoint, rayDirection, entityType);

// Uses optional arguments.
returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.flatPattern Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets the existing flat pattern or returns null in the case where a flat pattern doesn't exist in this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.flatPattern
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<FlatPattern> propertyValue = flatPatternComponent_var->flatPattern();

Property Value

This is a read only property whose value is a FlatPattern.

Version

Introduced in version October 2022


FlatPatternComponent.getPhysicalProperties Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
# Uses no optional arguments.
returnValue = flatPatternComponent_var.getPhysicalProperties()

# Uses optional arguments.
returnValue = flatPatternComponent_var.getPhysicalProperties(accuracy)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Uses no optional arguments.
returnValue = flatPatternComponent_var->getPhysicalProperties();

// Uses optional arguments.
returnValue = flatPatternComponent_var->getPhysicalProperties(accuracy);

Return Value

Type | Description
PhysicalProperties | Returns a PhysicalProperties object that can be used to get the various physical property related values.

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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version October 2022


FlatPatternComponent.id Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the persistent ID of the component. This ID is created with the component and does not change. Because this ID does not change, different revisions of the same design or copies of the design asset/file will retain this ID. If components from different designs have the same ID, it indicates they are either different revisions or a copy of the design was made. Therefore, this ID will always be unique within a single design, but may not be unique in an assembly where externally referenced designs include different revisions or copies of a design.

The ID is also the same ID used by PIM (Product Information Model).

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.id
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.isBodiesFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isBodiesFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isBodiesFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isBodiesFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isBodiesFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.isCanvasFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets if the light bulb of the canvas folder as seen in the browser is on or off. This controls the visibility of all the canvases in the component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isCanvasFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isCanvasFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isCanvasFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isCanvasFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


FlatPatternComponent.isConstructionFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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).

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isConstructionFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isConstructionFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isConstructionFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isConstructionFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.isDecalFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets whether the light bulb of the decal folder, as seen in the browser, is on or off. This controls the visibility of all the decals in the component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isDecalFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isDecalFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isDecalFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isDecalFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


FlatPatternComponent.isJointsFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isJointsFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isJointsFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isJointsFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isJointsFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.isLibraryItem Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets whether the component was created from a fasteners library item."

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isLibraryItem
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isLibraryItem();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


FlatPatternComponent.isOriginFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isOriginFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isOriginFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isOriginFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isOriginFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.isSketchFolderLightBulbOn Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isSketchFolderLightBulbOn

# Set the value of the property.
flatPatternComponent_var.isSketchFolderLightBulbOn = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isSketchFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternComponent_var->isSketchFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.isValid Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.isValid
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
boolean propertyValue = flatPatternComponent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternComponent.jointOrigins Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of joint origins associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.jointOrigins
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<JointOrigins> propertyValue = flatPatternComponent_var->jointOrigins();

Property Value

This is a read only property whose value is a JointOrigins.

Version

Introduced in version October 2022


FlatPatternComponent.joints Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of joints associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.joints
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Joints> propertyValue = flatPatternComponent_var->joints();

Property Value

This is a read only property whose value is a Joints.

Version

Introduced in version October 2022


FlatPatternComponent.material Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Gets and sets the physical material assigned to this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.material

# Set the value of the property.
flatPatternComponent_var.material = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Material> propertyValue = flatPatternComponent_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = flatPatternComponent_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version October 2022


FlatPatternComponent.meshBodies Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the mesh bodies collection associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.meshBodies
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<MeshBodies> propertyValue = flatPatternComponent_var->meshBodies();

Property Value

This is a read only property whose value is a MeshBodies.

Version

Introduced in version October 2022


FlatPatternComponent.mfgdmModelId Property

Parent Object: FlatPatternComponent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the MFGDM model ID for this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.mfgdmModelId
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->mfgdmModelId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


FlatPatternComponent.modelParameters Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of model parameters in the Component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.modelParameters
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ModelParameters> propertyValue = flatPatternComponent_var->modelParameters();

Property Value

This is a read only property whose value is a ModelParameters.

Version

Introduced in version October 2022


FlatPatternComponent.name Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.name

# Set the value of the property.
flatPatternComponent_var.name = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = flatPatternComponent_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.objectType Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.objectType
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.occurrences Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.occurrences
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Occurrences> propertyValue = flatPatternComponent_var->occurrences();

Property Value

This is a read only property whose value is an Occurrences.

Version

Introduced in version October 2022


FlatPatternComponent.occurrencesByComponent Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.occurrencesByComponent(component)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.opacity Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.opacity

# Set the value of the property.
flatPatternComponent_var.opacity = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
double propertyValue = flatPatternComponent_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = flatPatternComponent_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version October 2022


FlatPatternComponent.orientedMinimumBoundingBox Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the component. All other geometry types are ignored.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.orientedMinimumBoundingBox
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<OrientedBoundingBox3D> propertyValue = flatPatternComponent_var->orientedMinimumBoundingBox();

Property Value

This is a read only property whose value is an OrientedBoundingBox3D.

Version

Introduced in version January 2024


FlatPatternComponent.originConstructionPoint Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the origin construction point.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.originConstructionPoint
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = flatPatternComponent_var->originConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version October 2022


FlatPatternComponent.parentDesign Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the parent product this component is owned by.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.parentDesign
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Design> propertyValue = flatPatternComponent_var->parentDesign();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version October 2022


FlatPatternComponent.partNumber Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.partNumber

# Set the value of the property.
flatPatternComponent_var.partNumber = propertyValue
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->partNumber();

// Set the value of the property, where value_var is a string.
bool returnValue = flatPatternComponent_var->partNumber(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.physicalProperties Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component. Property values will be calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.physicalProperties
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<PhysicalProperties> propertyValue = flatPatternComponent_var->physicalProperties();

Property Value

This is a read only property whose value is a PhysicalProperties.

Version

Introduced in version October 2022


FlatPatternComponent.preciseBoundingBox Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns a bounding box that tightly fits around all B-Rep bodies in the component. All other geometry types are ignored.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.preciseBoundingBox
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = flatPatternComponent_var->preciseBoundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version January 2024


FlatPatternComponent.propertyGroups Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the PropertyGroups object associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.propertyGroups
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<PropertyGroups> propertyValue = flatPatternComponent_var->propertyGroups();

Property Value

This is a read only property whose value is a PropertyGroups.

Version

Introduced in version January 2024


FlatPatternComponent.revisionId Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.revisionId
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
string propertyValue = flatPatternComponent_var->revisionId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternComponent.rigidGroups Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of rigid groups associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.rigidGroups
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<RigidGroups> propertyValue = flatPatternComponent_var->rigidGroups();

Property Value

This is a read only property whose value is a RigidGroups.

Version

Introduced in version October 2022


FlatPatternComponent.saveCopyAs Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Performs a Save Copy As on this component. This saves the specified component as a new document in the specified location.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.saveCopyAs(name, dataFolder, description, tag)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_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 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 October 2022


FlatPatternComponent.sketches Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the sketches collection associated with this component. This provides access to the existing sketches and supports the creation of new sketches.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.sketches
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<Sketches> propertyValue = flatPatternComponent_var->sketches();

Property Value

This is a read only property whose value is a Sketches.

Version

Introduced in version October 2022


FlatPatternComponent.tangentRelationships Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the collection of tangent relationships associated with this component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.tangentRelationships
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<TangentRelationships> propertyValue = flatPatternComponent_var->tangentRelationships();

Property Value

This is a read only property whose value is a TangentRelationships.

Version

Introduced in version October 2022


FlatPatternComponent.transformOccurrences Method

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

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 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
returnValue = flatPatternComponent_var.transformOccurrences(occurrences, transforms, ignoreJoints)
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

#include <Fusion/SheetMetal/FlatPatternComponent.h>

returnValue = flatPatternComponent_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 October 2022


FlatPatternComponent.xConstructionAxis Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the X origin construction axis.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.xConstructionAxis
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = flatPatternComponent_var->xConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version October 2022


FlatPatternComponent.xYConstructionPlane Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the XY origin construction plane.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.xYConstructionPlane
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = flatPatternComponent_var->xYConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version October 2022


FlatPatternComponent.xZConstructionPlane Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the XZ origin construction plane.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.xZConstructionPlane
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = flatPatternComponent_var->xZConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version October 2022


FlatPatternComponent.yConstructionAxis Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the Y origin construction axis.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.yConstructionAxis
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = flatPatternComponent_var->yConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version October 2022


FlatPatternComponent.yZConstructionPlane Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the YZ origin construction plane.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.yZConstructionPlane
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = flatPatternComponent_var->yZConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version October 2022


FlatPatternComponent.zConstructionAxis Property

Parent Object: FlatPatternComponent
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternComponent.h>

Description

Returns the Z origin construction axis.

Syntax

  • Python
  • C++
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.

# Get the value of the property.
propertyValue = flatPatternComponent_var.zConstructionAxis
"flatPatternComponent_var" is a variable referencing a FlatPatternComponent object.
#include <Fusion/SheetMetal/FlatPatternComponent.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = flatPatternComponent_var->zConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version October 2022


FlatPatternProduct Object

Derived from: Design Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Product that contains all of the information associated with a flat pattern.

A FlatPatternProduct object exists for each flat pattern created.

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().
computeAll | Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.
createConfiguredDesign | Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.
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.
deleteMe | Deletes this FlatPatternProduct and the flat pattern it contains.
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 flexible 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.
findEntityByToken | Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.
modifyParameters | Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.
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.
analyses | Gets the collection of design analyses associated with this design.
appearances | Returns the appearances contained in this document.
attributes | Returns the collection of attributes associated with this product.
configurationRowId | Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.
configurationTopTable | If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.
contactSets | Returns the contact sets associated with this design.
designPlasticRules | Gets the collection of plastic rules in the design.
designSheetMetalRules | Gets the collection of sheet metal rules in the design.
designType | Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.
flatPattern | Gets the flat pattern associated with this FlatPatternProduct.
fusionUnitsManager | Returns a specialized UnitsManager that can set the default length units and work with parameters.
isConfiguration | Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.
isConfiguredDesign | Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.
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 component 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.
libraryPlasticRules | Gets the collection of plastic rules in the plastic rule library.
librarySheetMetalRules | Gets the collection of sheet metal rules in the sheet metal rule library.
materials | Returns the materials contained in this document.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
renderManager | Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.
rootComponent | Returns the root Component.
rootDataComponent | Preview Get the root DataComponent in this design. This is only available for top level designs.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
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.

Version

Introduced in version October 2022


FlatPatternProduct.activateRootComponent Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.activateRootComponent()
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->activateRootComponent();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version October 2022


FlatPatternProduct.activeComponent Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the component that is current being edited. This can return the root component or another component within the design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.activeComponent
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Component> propertyValue = flatPatternProduct_var->activeComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version October 2022


FlatPatternProduct.activeEditObject Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.activeEditObject
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Base> propertyValue = flatPatternProduct_var->activeEditObject();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version October 2022


FlatPatternProduct.activeOccurrence Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.activeOccurrence
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = flatPatternProduct_var->activeOccurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version October 2022


FlatPatternProduct.allComponents Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the Components collection that provides access to existing components in a design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.allComponents
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Components> propertyValue = flatPatternProduct_var->allComponents();

Property Value

This is a read only property whose value is a Components.

Version

Introduced in version October 2022


FlatPatternProduct.allParameters Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.allParameters
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = flatPatternProduct_var->allParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version October 2022


FlatPatternProduct.analyses Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the collection of design analyses associated with this design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.analyses
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Analyses> propertyValue = flatPatternProduct_var->analyses();

Property Value

This is a read only property whose value is an Analyses.

Version

Introduced in version January 2023


FlatPatternProduct.analyzeInterference Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Calculates the interference between the input bodies and/or occurrences.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.analyzeInterference(input)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_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.

Version

Introduced in version October 2022


FlatPatternProduct.appearances Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the appearances contained in this document.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.appearances
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Appearances> propertyValue = flatPatternProduct_var->appearances();

Property Value

This is a read only property whose value is an Appearances.

Version

Introduced in version October 2022


FlatPatternProduct.areaProperties Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
# Uses no optional arguments.
returnValue = flatPatternProduct_var.areaProperties(inputs)

# Uses optional arguments.
returnValue = flatPatternProduct_var.areaProperties(inputs, accuracy)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Uses no optional arguments.
returnValue = flatPatternProduct_var->areaProperties(inputs);

// Uses optional arguments.
returnValue = flatPatternProduct_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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version October 2022


FlatPatternProduct.attributes Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the collection of attributes associated with this product.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.attributes
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = flatPatternProduct_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version October 2022


FlatPatternProduct.classType Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FlatPatternProduct.classType()
This is a static method.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = adsk::fusion::FlatPatternProduct::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


FlatPatternProduct.computeAll Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.computeAll()
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->computeAll();

Return Value

Type | Description
boolean | Returns true if the compute completed. This doesn't indicate if all the items in the timeline successfully computed or not. You need to check the health state of each item in the timeline to determine if everything successfully computed or not.

Version

Introduced in version October 2022


FlatPatternProduct.configurationRowId Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.configurationRowId
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
string propertyValue = flatPatternProduct_var->configurationRowId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


FlatPatternProduct.configurationTopTable Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.configurationTopTable
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<ConfigurationTopTable> propertyValue = flatPatternProduct_var->configurationTopTable();

Property Value

This is a read only property whose value is a ConfigurationTopTable.

Version

Introduced in version January 2024


FlatPatternProduct.contactSets Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the contact sets associated with this design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.contactSets
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<ContactSets> propertyValue = flatPatternProduct_var->contactSets();

Property Value

This is a read only property whose value is a ContactSets.

Version

Introduced in version October 2022


FlatPatternProduct.createConfiguredDesign Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.createConfiguredDesign()
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->createConfiguredDesign();

Return Value

Type | Description
ConfigurationTopTable | Returns the ConfigurationTable that defines the configurations for this design.

Version

Introduced in version January 2024


FlatPatternProduct.createInterferenceInput Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.createInterferenceInput(entities)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_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.

Version

Introduced in version October 2022


FlatPatternProduct.deleteEntities Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Deletes the specified set of entities that are associated with this product.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.deleteEntities(entities)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_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 October 2022


FlatPatternProduct.deleteMe Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Deletes this FlatPatternProduct and the flat pattern it contains.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.deleteMe()
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version October 2022


FlatPatternProduct.designPlasticRules Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the collection of plastic rules in the design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.designPlasticRules
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = flatPatternProduct_var->designPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


FlatPatternProduct.designSheetMetalRules Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the collection of sheet metal rules in the design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.designSheetMetalRules
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = flatPatternProduct_var->designSheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version November 2022


FlatPatternProduct.designType Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.designType

# Set the value of the property.
flatPatternProduct_var.designType = propertyValue
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
DesignTypes propertyValue = flatPatternProduct_var->designType();

// Set the value of the property, where value_var is a DesignTypes.
bool returnValue = flatPatternProduct_var->designType(value_var);

Property Value

This is a read/write property whose value is a DesignTypes.

Version

Introduced in version October 2022


FlatPatternProduct.exportManager Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the ExportManager for this design. You use the ExportManager to export the current design in various formats.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.exportManager
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<ExportManager> propertyValue = flatPatternProduct_var->exportManager();

Property Value

This is a read only property whose value is an ExportManager.

Version

Introduced in version October 2022


FlatPatternProduct.findAttributes Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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 flexible 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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.findAttributes(groupName, attributeName)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_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 October 2022


FlatPatternProduct.findEntityByToken Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.findEntityByToken(entityToken)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->findEntityByToken(entityToken);

Return Value

Type | Description
Base[] | Returns an array of entities associated with the provided token, or an empty array in the case where there are no matches.

Parameters

Name | Type | Description
entityToken | string | The input entity token you want to find the matching entity for.

Version

Introduced in version October 2022


FlatPatternProduct.flatPattern Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the flat pattern associated with this FlatPatternProduct.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.flatPattern
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<FlatPattern> propertyValue = flatPatternProduct_var->flatPattern();

Property Value

This is a read only property whose value is a FlatPattern.

Version

Introduced in version October 2022


FlatPatternProduct.fusionUnitsManager Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns a specialized UnitsManager that can set the default length units and work with parameters.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.fusionUnitsManager
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<FusionUnitsManager> propertyValue = flatPatternProduct_var->fusionUnitsManager();

Property Value

This is a read only property whose value is a FusionUnitsManager.

Version

Introduced in version October 2022


FlatPatternProduct.isConfiguration Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isConfiguration
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isConfiguration();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


FlatPatternProduct.isConfiguredDesign Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isConfiguredDesign
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isConfiguredDesign();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


FlatPatternProduct.isContactAnalysisEnabled Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isContactAnalysisEnabled

# Set the value of the property.
flatPatternProduct_var.isContactAnalysisEnabled = propertyValue
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isContactAnalysisEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternProduct_var->isContactAnalysisEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternProduct.isContactSetAnalysis Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isContactSetAnalysis

# Set the value of the property.
flatPatternProduct_var.isContactSetAnalysis = propertyValue
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isContactSetAnalysis();

// Set the value of the property, where value_var is a boolean.
bool returnValue = flatPatternProduct_var->isContactSetAnalysis(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternProduct.isRootComponentActive Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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 component in the browser. To activate the root component use the ActivateRootComponent method.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isRootComponentActive
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isRootComponentActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternProduct.isValid Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.isValid
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
boolean propertyValue = flatPatternProduct_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


FlatPatternProduct.libraryPlasticRules Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the collection of plastic rules in the plastic rule library.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.libraryPlasticRules
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = flatPatternProduct_var->libraryPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


FlatPatternProduct.librarySheetMetalRules Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Gets the collection of sheet metal rules in the sheet metal rule library.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.librarySheetMetalRules
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = flatPatternProduct_var->librarySheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version November 2022


FlatPatternProduct.materials Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the materials contained in this document.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.materials
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Materials> propertyValue = flatPatternProduct_var->materials();

Property Value

This is a read only property whose value is a Materials.

Version

Introduced in version October 2022


FlatPatternProduct.modifyParameters Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
returnValue = flatPatternProduct_var.modifyParameters(parameters, values)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

returnValue = flatPatternProduct_var->modifyParameters(parameters, values);

Return Value

Type | Description
boolean | Returns true if setting all of the parameters was successful. Setting multiple parameters is either all or none. If it fails to set any parameters, none of them are updated, and the method will return false.

Parameters

Name | Type | Description
parameters | Parameter[] | An array of UserParameter and ModelParameter objects that you want to change the value. The parameters must all exist within the Design object you're calling this method from. They can be in any component but must be local components owned by the Design.
values ValueInput[] An array of ValueInput objects that defines the new value for each parameter defined by the "parameters" argument. This array must be the same size as the array used for the "parameters" argument, and the items in the arrays are used in the order they exist within the arrays. For example, the parameter at index 0 will use the value at index 0.

If you use the createByString method to create the ValueInput, the expression of the parameter will be edited, and the effect is the same as interactively editing the expression.When you set the expression, you can include units, references to other parameters, and math operators and functions.For example, "(Length / 3) * cos(Angle)" is a valid expression for a distance parameter if the parameters "Length" and "Angle" already exist.

If you use the createByReal method, the value is assigned directly and is always in the internal units for the unit type associated with the parameter.For example, if the parameter is a length, the value will ALWAYS be used as centimeters. If the parameter is an angle, the value will ALWAYS be used as radians.This is because the default design unit types for length are ignored, and internal units are ALWAYS used.

Version

Introduced in version October 2022


FlatPatternProduct.namedViews Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.namedViews
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = flatPatternProduct_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version September 2023


FlatPatternProduct.objectType Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.objectType
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
string propertyValue = flatPatternProduct_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternProduct.parentDocument Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the parent Document object.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.parentDocument
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Document> propertyValue = flatPatternProduct_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version October 2022


FlatPatternProduct.physicalProperties Method

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc for a collection of 3D solid objects.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
# Uses no optional arguments.
returnValue = flatPatternProduct_var.physicalProperties(inputs)

# Uses optional arguments.
returnValue = flatPatternProduct_var.physicalProperties(inputs, accuracy)
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Uses no optional arguments.
returnValue = flatPatternProduct_var->physicalProperties(inputs);

// Uses optional arguments.
returnValue = flatPatternProduct_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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version October 2022


FlatPatternProduct.productType Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

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.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.productType
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
string propertyValue = flatPatternProduct_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


FlatPatternProduct.renderManager Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.renderManager
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<RenderManager> propertyValue = flatPatternProduct_var->renderManager();

Property Value

This is a read only property whose value is a RenderManager.

Version

Introduced in version May 2023


FlatPatternProduct.rootComponent Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the root Component.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.rootComponent
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Component> propertyValue = flatPatternProduct_var->rootComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version October 2022


FlatPatternProduct.rootDataComponent Property

Parent Object: FlatPatternProduct

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Get the root DataComponent in this design. This is only available for top level designs.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.rootDataComponent
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = flatPatternProduct_var->rootDataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Version

Introduced in version July 2025


FlatPatternProduct.selectionSets Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.selectionSets
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = flatPatternProduct_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version October 2022


FlatPatternProduct.snapshots Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.snapshots
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Snapshots> propertyValue = flatPatternProduct_var->snapshots();

Property Value

This is a read only property whose value is a Snapshots.

Version

Introduced in version October 2022


FlatPatternProduct.timeline Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the timeline associated with this design.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.timeline
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<Timeline> propertyValue = flatPatternProduct_var->timeline();

Property Value

This is a read only property whose value is a Timeline.

Version

Introduced in version October 2022


FlatPatternProduct.unitsManager Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the UnitsManager object associated with this product.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.unitsManager
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = flatPatternProduct_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Version

Introduced in version October 2022


FlatPatternProduct.userParameters Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the collection of User Parameters in a design

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.userParameters
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<UserParameters> propertyValue = flatPatternProduct_var->userParameters();

Property Value

This is a read only property whose value is a UserParameters.

Version

Introduced in version October 2022


FlatPatternProduct.workspaces Property

Parent Object: FlatPatternProduct
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/FlatPatternProduct.h>

Description

Returns the workspaces associated with this product.

Syntax

  • Python
  • C++
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.

# Get the value of the property.
propertyValue = flatPatternProduct_var.workspaces
"flatPatternProduct_var" is a variable referencing a FlatPatternProduct object.
#include <Fusion/SheetMetal/FlatPatternProduct.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = flatPatternProduct_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version October 2022


FloatParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

A parameter value that is a floating point value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
type | Get the type of the float parameter.
value | Get or set the value of the parameter.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version September 2021


FloatParameterValue.classType Method

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.FloatParameterValue.classType()
This is a static method.

#include <Cam/Operations/FloatParameterValue.h>

returnValue = adsk::cam::FloatParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


FloatParameterValue.isValid Property

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.

# Get the value of the property.
propertyValue = floatParameterValue_var.isValid
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.
#include <Cam/Operations/FloatParameterValue.h>

// Get the value of the property.
boolean propertyValue = floatParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


FloatParameterValue.objectType Property

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.

# Get the value of the property.
propertyValue = floatParameterValue_var.objectType
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.
#include <Cam/Operations/FloatParameterValue.h>

// Get the value of the property.
string propertyValue = floatParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


FloatParameterValue.parent Property

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.

# Get the value of the property.
propertyValue = floatParameterValue_var.parent
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.
#include <Cam/Operations/FloatParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = floatParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


FloatParameterValue.type Property

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

Get the type of the float parameter.

Syntax

  • Python
  • C++
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.

# Get the value of the property.
propertyValue = floatParameterValue_var.type
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.
#include <Cam/Operations/FloatParameterValue.h>

// Get the value of the property.
FloatParameterValueTypes propertyValue = floatParameterValue_var->type();

Property Value

This is a read only property whose value is a FloatParameterValueTypes.

Version

Introduced in version May 2023


FloatParameterValue.value Property

Parent Object: FloatParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/FloatParameterValue.h>

Description

Get or set the value of the parameter.

Syntax

  • Python
  • C++
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.

# Get the value of the property.
propertyValue = floatParameterValue_var.value

# Set the value of the property.
floatParameterValue_var.value = propertyValue
"floatParameterValue_var" is a variable referencing a FloatParameterValue object.
#include <Cam/Operations/FloatParameterValue.h>

// Get the value of the property.
double propertyValue = floatParameterValue_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = floatParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version September 2021


FloatProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

A float or real value property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. This is most commonly used for properties associated with materials and appearances.

Properties

Name | Description
connectedTexture | When the property is associated with an appearance, this 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 null.
hasConnectedTexture | When the property is associated with an appearance this 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. For properties not associated with an appearance, this acts as read-only and always returns false.
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.

This is most commonly used for properties associated with materials and appearances and in most cases will return false.
hasMultipleValues Gets the boolean flag that indicates if this property has multiple values or not.

This is most commonly used for properties associated with materials and appearances.
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.

This is most commonly used for properties associated with materials and appearances.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
units | Gets the units that the value of this property is returned in. The String returned is a valid Fusion unit string. An empty string indicates a unitless value.
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.

This is most commonly used for properties associated with materials and appearances.

Version

Introduced in version August 2014


FloatProperty.classType Method

Parent Object: FloatProperty
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FloatProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

When the property is associated with an appearance, this 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 null.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

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.

This is most commonly used for properties associated with materials and appearances.

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

(returnValue, hasLowLimit, lowLimit, hasHighLimit, highLimit) = floatProperty_var.getLimits()

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

When the property is associated with an appearance this 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. For properties not associated with an appearance, this acts as read-only and always returns false.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

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.

This is most commonly used for properties associated with materials and appearances and in most cases will return false.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Gets the boolean flag that indicates if this property has multiple values or not.

This is most commonly used for properties associated with materials and appearances.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

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.

This is most commonly used for properties associated with materials and appearances.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Gets the units that the value of this property is returned in. The String returned is a valid Fusion unit string. An empty string indicates a unitless value.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

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.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/FloatProperty.h>

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

This is most commonly used for properties associated with materials and appearances.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Provides a command input to get the value of a slider from the user, the value type is float.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: FloatSliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
returnValue = floatSliderCommandInput_var.deleteMe()
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

#include <Core/UserInterface/FloatSliderCommandInput.h>

returnValue = floatSliderCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


FloatSliderCommandInput.expressionOne Property

Parent Object: FloatSliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the texts of the slider if text has been defined.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets if the command input has two sliders.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Sets the text of the slider. Both the left and the right text should be set.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

Description

Gets and sets the unit type that is used when evaluating the user's input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Provides a command input to get the value of a spinner from the user, the value type is float.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: FloatSpinnerCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
returnValue = floatSpinnerCommandInput_var.deleteMe()
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

#include <Core/UserInterface/FloatSpinnerCommandInput.h>

returnValue = floatSpinnerCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


FloatSpinnerCommandInput.expression Property

Parent Object: FloatSpinnerCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the maximum allowed value of the spinner in database units.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the minimum allowed value of the spinner in database units.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

Description

Gets the unit type that is used when evaluating the user's input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FloatSpinnerCommandInput.h>

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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Provides access to a folder selection dialog to allow the user to select a folder.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 canceled without selecting a folder. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Gets or sets the initial directory displayed by the file dialog box.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Displays a modal dialog allowing the user to select a folder. The return value can be used to determine if the dialog was canceled without selecting a folder. the folder property can be used to get the selected folder.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/FolderDialog.h>

Description

Gets or sets the title displayed on the dialog.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Object that represents an existing Form feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

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.

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.entityToken Property

Parent Object: FormFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.entityToken
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
string propertyValue = formFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


FormFeature.errorOrWarningMessage Property

Parent Object: FormFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Exits from edit mode in the user-interface. If this form feature in not in edit mode, then nothing happens.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Set the user-interface so that the form body is in edit mode.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeature.h>

Description

Returns a TSplineBodies collection where you can access any existing T-Spline bodies and through it create new T-Spline bodies.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Collection that provides access to all of the existing Form features in a component.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.formFeatures

Version

Introduced in version September 2015


FormFeatures.add Method

Parent Object: FormFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Creates a new empty form feature in the parent component.

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.

Samples

Name | Description
formFeatures.add | Demonstrates the formFeatures.add method. This creates a new empty form (T-Spline) feature, which you'll see in the timeline.

Version

Introduced in version April 2019


formFeatures.add

Description

Demonstrates the formFeatures.add method. This creates a new empty form (T-Spline) feature, which you'll see in the timeline.

Code Samples

  • Python
def demo_formFeatures_add(rootComp: adsk.fusion.Component):
    formFeatures: rootComp.features.formFeatures = rootComp.features.formFeatures
    formFeature = formFeatures.add()


FormFeatures.classType Method

Parent Object: FormFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

The number of Form features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Function that returns the specified Form feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

Function that returns the specified form feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FormFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

Description

Statically creates a new FromEntityStartDefinition object. This is used as input when create a new feature and defining the starting condition.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

Description

Gets and sets the entity defining the start of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/FromEntityStartDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

Description

Defines that a Fusion Archive export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionArchiveExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

Description

Defines that a Fusion Archive import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ImportManager.createFusionArchiveImportOptions

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


FusionArchiveImportOptions.classType Method

Parent Object: FusionArchiveImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/FusionArchiveImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Fusion Default Units for Design Preferences. The following code can be used to access this object.

unitPrefs = app.preferences.defaultUnitsPreferences.itemByName('Design')

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
defaultUnitSystem | Gets and sets the default unit system when creating a new Fusion file.
distanceDisplayUnits | Gets and sets the default design units for length when creating a new Fusion file. Setting this property will have the side effect of changing the defaultUnitSystem property to custom.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
massDisplayUnits | Gets and sets the default design units for mass when creating a new Fusion file. Setting this property will have the side effect of changing the defaultUnitSystem property to custom.
name | Returns the name of this DefaultUnitPreferences object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.classType Method

Parent Object: FusionDefaultUnitsPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.defaultUnitSystem Property

Parent Object: FusionDefaultUnitsPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Gets and sets the default unit system when creating a new Fusion file.

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.defaultUnitSystem

# Set the value of the property.
fusionDefaultUnitsPreferences_var.defaultUnitSystem = propertyValue
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
UnitSystems propertyValue = fusionDefaultUnitsPreferences_var->defaultUnitSystem();

// Set the value of the property, where value_var is a UnitSystems.
bool returnValue = fusionDefaultUnitsPreferences_var->defaultUnitSystem(value_var);

Property Value

This is a read/write property whose value is a UnitSystems.

Version

Introduced in version May 2025


FusionDefaultUnitsPreferences.distanceDisplayUnits Property

Parent Object: FusionDefaultUnitsPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Gets and sets the default design units for length when creating a new Fusion file. Setting this property will have the side effect of changing the defaultUnitSystem property to custom.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.massDisplayUnits Property

Parent Object: FusionDefaultUnitsPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Gets and sets the default design units for mass when creating a new Fusion file. Setting this property will have the side effect of changing the defaultUnitSystem property to custom.

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.massDisplayUnits

# Set the value of the property.
fusionDefaultUnitsPreferences_var.massDisplayUnits = propertyValue
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
MassUnits propertyValue = fusionDefaultUnitsPreferences_var->massDisplayUnits();

// Set the value of the property, where value_var is a MassUnits.
bool returnValue = fusionDefaultUnitsPreferences_var->massDisplayUnits(value_var);

Property Value

This is a read/write property whose value is a MassUnits.

Version

Introduced in version May 2025


FusionDefaultUnitsPreferences.name Property

Parent Object: FusionDefaultUnitsPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

Returns the name of this DefaultUnitPreferences object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Object that represents a Fusion specific document.

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.
saveMilestone | Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.
updateAllReferences | Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

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.
creationId Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original document.
dataFile | Gets the DataFile that represents this document in A360.
design | Returns the design associated with this Fusion 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 external 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 This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent Application object.
products | Returns the products associated with this document.
version | Returns the Fusion version this document was last saved with.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version August 2014


FusionDocument.activate Method

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Causes this document to become the active document in the user interface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the collection of attributes associated with this document.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Closes this document.

Remarks

Closing a document is not supported within any of the Command related events. When a command is running, a transaction is open, and creating and closing documents cannot be transacted and, as a result, cannot be contained within a command transaction.

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 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
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version November 2014


FusionDocument.creationId Property

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the creation ID of this document. When a new document is created, Fusion assigns it a creation ID that will remain constant for the life of the document. The ID that is assigned is unique. However, it's possible that more than one document can have the same ID. This happens in the case where a document is copied. In this case a new document is created but an existing document is copied. It's only when a new document is created that a creation ID is generated and assigned.

Using this ID can be useful in cases where the save of a new document is started and you can use this ID to match the completion of the save operation on the cloud to the original document.

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.creationId
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
string propertyValue = fusionDocument_var->creationId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2022


FusionDocument.dataFile Property

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Gets the DataFile that represents this document in A360.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the design associated with this Fusion document.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns a collection containing the documents directly referenced by this document.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Gets if this document is the active document in the user interface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Property that indicates if the document has been modified since it was last saved.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Indicates if any external 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Gets if a currently open document is open as visible.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

This property gets and sets the name of the document. You can only set the name of a document before the document is saved for the first time. You can use the isSaved property to determine this. If the document has not been saved and the name is changed, the specified name will be the default name shown in the Save dialog, which the user can modify before saving the document.

If the file has been saved, this property behaves as read-only. Setting the name will fail because the name is controlled by the DataFile associated with this document. However, you can edit the name of the DataFile, which you can obtain by using the dataFile property of the document.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the parent Application object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the products associated with this document.

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.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version August 2014


FusionDocument.save Method

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

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.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

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 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.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version November 2014


FusionDocument.saveMilestone Method

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Saves the document as a new milestone. This method is not applicable when saving a document for the first time. In that case, you must use the SaveAs method. You can determine if a document has been saved by checking the value of the isSaved property.

Remarks

Saving a document is not supported within any of the Command related events. When a command is running, a transaction is open, and saving a document cannot be transacted and, as a result, cannot be contained within a command transaction.

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.saveMilestone(milestoneName, versionDescription)
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->saveMilestone(milestoneName, versionDescription);

Return Value

Type | Description
boolean | Returns true if saving the document as a milestone was successful.

Parameters

Name | Type | Description
milestoneName | string | The name of the milestone as seen in the data panel and Fusion web client. If an empty string is provided a default name will be used.
versionDescription | string | The description associated with the version. If an empty string is provided, a default description will be used.

Version

Introduced in version March 2024


FusionDocument.updateAllReferences Method

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Updates all out of date external references. This is equivalent to clicking the "Out of Date" button in the Quick Access Toolbar to update all out of date external references.

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.updateAllReferences()
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->updateAllReferences();

Version

Introduced in version September 2022


FusionDocument.version Property

Parent Object: FusionDocument
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionDocument.h>

Description

Returns the Fusion version this document was last saved with.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Fusion General Design Preferences

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 default modeling 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
isAllowReferencesDuringEditInPlace | Gets and sets if you can create associative references while editing external components in context.
isAutoHideSketchOnFeatureCreation | Gets and sets if the sketch should be automatically hidden whenever a feature is created from it.
isAutoLookAtSketch | Gets and sets if the view is re-oriented to view the newly created sketch.
isAutoProjectEdgesOnReference | Gets and sets if model edges should be automatically projected when creating constraints and dimensions in the active sketch when the orientation is normal to the active sketch plane.
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.
isEnableArrangeAndSimplifyTools | Gets and sets if the Arrange, Remove Features, Remove Faces, and Replace with Primitives commands should be added to the Modify menu in the Design workspace.
isFirstComponentGroundToParent
isGhostedResultBodyShown | Gets and sets the Show ghosted result body option
isJointPreviewAnimated | Gets and sets the Animate joint preview option
isSketchScaledWithFirstDimension | Gets and sets if the sketch geometry is automatically scaled when the first dimension is added.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


FusionProductPreferences.classType Method

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets the default modeling type setting

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets the Default workspace setting. (Model, Sculpt or Patch)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets the Active Component Visibility option

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.isAllowReferencesDuringEditInPlace Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if you can create associative references while editing external components in context.

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isAllowReferencesDuringEditInPlace

# Set the value of the property.
fusionProductPreferences_var.isAllowReferencesDuringEditInPlace = 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->isAllowReferencesDuringEditInPlace();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isAllowReferencesDuringEditInPlace(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


FusionProductPreferences.isAutoHideSketchOnFeatureCreation Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if the sketch should be automatically hidden whenever a feature is created from it.

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isAutoHideSketchOnFeatureCreation

# Set the value of the property.
fusionProductPreferences_var.isAutoHideSketchOnFeatureCreation = 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->isAutoHideSketchOnFeatureCreation();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isAutoHideSketchOnFeatureCreation(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


FusionProductPreferences.isAutoLookAtSketch Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if the view is re-oriented to view the newly created sketch.

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.isAutoProjectEdgesOnReference Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if model edges should be automatically projected when creating constraints and dimensions in the active sketch when the orientation is normal to the active sketch plane.

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isAutoProjectEdgesOnReference

# Set the value of the property.
fusionProductPreferences_var.isAutoProjectEdgesOnReference = 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->isAutoProjectEdgesOnReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isAutoProjectEdgesOnReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


FusionProductPreferences.isAutoProjectGeometry Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and Sets if geometry, not in the active sketch plane, is to be automatically projected.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if dimension value is edited when the dimension is created.

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.isEnableArrangeAndSimplifyTools Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if the Arrange, Remove Features, Remove Faces, and Replace with Primitives commands should be added to the Modify menu in the Design workspace.

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isEnableArrangeAndSimplifyTools

# Set the value of the property.
fusionProductPreferences_var.isEnableArrangeAndSimplifyTools = 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->isEnableArrangeAndSimplifyTools();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isEnableArrangeAndSimplifyTools(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


FusionProductPreferences.isFirstComponentGroundToParent Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isFirstComponentGroundToParent

# Set the value of the property.
fusionProductPreferences_var.isFirstComponentGroundToParent = 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->isFirstComponentGroundToParent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isFirstComponentGroundToParent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


FusionProductPreferences.isGhostedResultBodyShown Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets the Show ghosted result body option

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets the Animate joint preview option

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.isSketchScaledWithFirstDimension Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Gets and sets if the sketch geometry is automatically scaled when the first dimension is added.

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isSketchScaledWithFirstDimension

# Set the value of the property.
fusionProductPreferences_var.isSketchScaledWithFirstDimension = 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->isSketchScaledWithFirstDimension();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isSketchScaledWithFirstDimension(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


FusionProductPreferences.isValid Property

Parent Object: FusionProductPreferences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

Returns the name of this ProductPreferences object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionProductPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Utility class used to work with Values and control default design 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").

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** 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"
formatValue Given a floating point number this method evaluates it as a value of a specific unit type and returns an appropriate string. By default, the current unit settings defined in the user preferences is used, but you can set the method arguments to override the defaults to specify the formatting you want. The input value always uses internal units, which are centimeters for length, radians for angles, and mass is in kilograms.

This method is useful whenever you have a value you've gotten from Fusion or computed on your own and need to display it to the user as a string. This method does the conversion and also takes into account the units and the formatting the user has specified in their preferences.

Below are some examples of various formatting where the user preferences for general precision is four decimal places, and the angular precision is one decimal place. Also, trailing zeros are set to be hidden and the minimum precision is two decimal places when trailing zeros are turned off. The design units are specified to be "inch".

Here, only the value is supplied and the default is to assume the units are the current design length unit and use the preference settings to format it so there are four decimal places shown and the unit name is included. formatValue(1.5) -> "0.5906 in"

In this example, an angle is specified by using "deg" as the unit, and the result showing one decimal place, which is what's defined in the user preference, and it shows the unit name. formatValue(0.7853981633974483096, "deg") -> "45.0 deg"

This example converts the input value of 1.5 cm to mm where eight decimal places are shown, trailing zeros are shown, and the unit name is shown. The fourth argument of minimum precision is ignored, since it is only used when showTrailing zeros is False. formatValue(1.5, "mm", 8, BooleanOptions.TrueBooleanOption, 0, True) - > "15.00000000 mm"
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 might 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 to represent the current length unit and is affected by the preference settings that let the user choose whether abbreviations 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 determining the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.
design | Returns the parent design
distanceDisplayUnits | Gets and sets the default distance units for this design. Setting this property has the side effect of changing the unitSystem property to custom.
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.
massDisplayUnits | Gets and sets the default mass units for this design. Setting this property has the side effect of changing the unitSystem property to custom.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
product | Returns the parent Product.
unitSystem | Gets and sets the pre-defined combination of length and mass units to use for the units in the design. The distanceDisplayUnits and massDisplayUnits properties provide a way to get the current setting for distance and mass and to modify them to other values besides the predefined combinations. When a custom unit system is specified, any combination of distance and mass can be specified.

Accessed From

Design.fusionUnitsManager, FlatPatternProduct.fusionUnitsManager, WorkingModel.fusionUnitsManager

Version

Introduced in version August 2014


FusionUnitsManager.classType Method

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

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...

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

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 to represent the current length unit and is affected by the preference settings that let the user choose whether abbreviations 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 determining the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Returns the parent design

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Gets and sets the default distance units for this design. Setting this property has the side effect of changing the unitSystem property to custom.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Gets the value (in internal units) of the expression.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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"

Remarks

This property has been replaced by the formatValue method. This method does not honor the preferences for the precision, as it's supposed to. The formatValue method provides this capability and the ability to override the preference settings and specify how the value should be formatted.

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
Retired in version January 2025


FusionUnitsManager.formatUnits Method

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"

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.formatValue Method

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Given a floating point number this method evaluates it as a value of a specific unit type and returns an appropriate string. By default, the current unit settings defined in the user preferences is used, but you can set the method arguments to override the defaults to specify the formatting you want. The input value always uses internal units, which are centimeters for length, radians for angles, and mass is in kilograms.

This method is useful whenever you have a value you've gotten from Fusion or computed on your own and need to display it to the user as a string. This method does the conversion and also takes into account the units and the formatting the user has specified in their preferences.

Below are some examples of various formatting where the user preferences for general precision is four decimal places, and the angular precision is one decimal place. Also, trailing zeros are set to be hidden and the minimum precision is two decimal places when trailing zeros are turned off. The design units are specified to be "inch".

Here, only the value is supplied and the default is to assume the units are the current design length unit and use the preference settings to format it so there are four decimal places shown and the unit name is included. formatValue(1.5) -> "0.5906 in"

In this example, an angle is specified by using "deg" as the unit, and the result showing one decimal place, which is what's defined in the user preference, and it shows the unit name. formatValue(0.7853981633974483096, "deg") -> "45.0 deg"

This example converts the input value of 1.5 cm to mm where eight decimal places are shown, trailing zeros are shown, and the unit name is shown. The fourth argument of minimum precision is ignored, since it is only used when showTrailing zeros is False. formatValue(1.5, "mm", 8, BooleanOptions.TrueBooleanOption, 0, True) - > "15.00000000 mm"

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
# Uses no optional arguments.
returnValue = fusionUnitsManager_var.formatValue(value)

# Uses optional arguments.
returnValue = fusionUnitsManager_var.formatValue(value, units, precision, showTrailingZeros, minimumPrecision, showUnits)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

// Uses no optional arguments.
returnValue = fusionUnitsManager_var->formatValue(value);

// Uses optional arguments.
returnValue = fusionUnitsManager_var->formatValue(value, units, precision, showTrailingZeros, minimumPrecision, showUnits);

Return Value

Type | Description
string | Returns the formatted string or an empty string in case of an error.

Parameters

Name | Type | Description
value | double | A floating point value that is assumed to use the internal unit type, which are centimeters for length, radians for angles, and mass is in kilograms.
units | string | The units the value represents. The default value for this argument is "DefaultDistance" which means it will use the default distance units defined for the active design. This is an optional argument whose default value is "DefaultDistance".
precision | integer | This specifies the number of decimal places to display. The default value is -1 which indicates the precision specified in preferences should be used. A maximum of 9 can be used and any larger numbers will be forced to 9. This is an optional argument whose default value is -1.
showTrailingZeros | BooleanOptions | Specifies if trailing zeros should be shown or not. The default value is to use the preference setting. This is an optional argument whose default value is BooleanOptions.DefaultBooleanOption.
minimumPrecision | integer | When trailing zeros are not displayed, this specifies a minimum precision where some trailing zeros are still shown. The default value is -1 which indicates the minimum precision specified in preferences should be used. A maximum of 8 can be used, and any larger numbers will be forced to 8. This is an optional argument whose default value is -1.
showUnits | boolean | This specifies whether the unit name or symbol should be included in the result. This is an optional argument whose default value is True.

Version

Introduced in version March 2024


FusionUnitsManager.internalUnits Property

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Checks to see if the given expression is valid.

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 | The expression to validate.
units | string | The units to use when validating the expression.

Version

Introduced in version January 2015


FusionUnitsManager.massDisplayUnits Property

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Gets and sets the default mass units for this design. Setting this property has the side effect of changing the unitSystem property to custom.

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.massDisplayUnits

# Set the value of the property.
fusionUnitsManager_var.massDisplayUnits = propertyValue
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
MassUnits propertyValue = fusionUnitsManager_var->massDisplayUnits();

// Set the value of the property, where value_var is a MassUnits.
bool returnValue = fusionUnitsManager_var->massDisplayUnits(value_var);

Property Value

This is a read/write property whose value is a MassUnits.

Version

Introduced in version May 2025


FusionUnitsManager.objectType Property

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Returns the parent Product.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with might 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"

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


FusionUnitsManager.unitSystem Property

Parent Object: FusionUnitsManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/FusionUnitsManager.h>

Description

Gets and sets the pre-defined combination of length and mass units to use for the units in the design. The distanceDisplayUnits and massDisplayUnits properties provide a way to get the current setting for distance and mass and to modify them to other values besides the predefined combinations. When a custom unit system is specified, any combination of distance and mass can be specified.

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.unitSystem

# Set the value of the property.
fusionUnitsManager_var.unitSystem = propertyValue
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
UnitSystems propertyValue = fusionUnitsManager_var->unitSystem();

// Set the value of the property, where value_var is a UnitSystems.
bool returnValue = fusionUnitsManager_var->unitSystem(value_var);

Property Value

This is a read/write property whose value is a UnitSystems.

Version

Introduced in version May 2025


Future Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Future.h>

Description

The base class for futures.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
state | Returns the current state of the process associated with this future.

Derived Classes

ConfigurationFuture, DataObjectFuture

Version

Introduced in version September 2024


Future.classType Method

Parent Object: Future
Defined in namespace "adsk::core" and the header file is <Core/Application/Future.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Future.classType()
This is a static method.

#include <Core/Application/Future.h>

returnValue = adsk::core::Future::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


Future.isValid Property

Parent Object: Future
Defined in namespace "adsk::core" and the header file is <Core/Application/Future.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"future_var" is a variable referencing a Future object.

# Get the value of the property.
propertyValue = future_var.isValid
"future_var" is a variable referencing a Future object.
#include <Core/Application/Future.h>

// Get the value of the property.
boolean propertyValue = future_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Future.objectType Property

Parent Object: Future
Defined in namespace "adsk::core" and the header file is <Core/Application/Future.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"future_var" is a variable referencing a Future object.

# Get the value of the property.
propertyValue = future_var.objectType
"future_var" is a variable referencing a Future object.
#include <Core/Application/Future.h>

// Get the value of the property.
string propertyValue = future_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


Future.state Property

Parent Object: Future
Defined in namespace "adsk::core" and the header file is <Core/Application/Future.h>

Description

Returns the current state of the process associated with this future.

Syntax

  • Python
  • C++
"future_var" is a variable referencing a Future object.

# Get the value of the property.
propertyValue = future_var.state
"future_var" is a variable referencing a Future object.
#include <Core/Application/Future.h>

// Get the value of the property.
FutureStates propertyValue = future_var->state();

Property Value

This is a read only property whose value is a FutureStates.

Version

Introduced in version September 2024


GeneralPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Provides access to the general preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isDefaultMeasureShown | Gets and sets if the default measure is shown.
isGestureBasedViewNavigationUsed | Gets and sets if gesture based view navigation is used.
isHangDetectionEnabled | Gets and sets whether hang detection is enabled. This is a Windows only setting. If True, Fusion will detect when a task processes for longer than a specific time. A dialog is displayed if a hang is detected, allowing the user to continue processing or stop Fusion and send an error report.
isSkipCreationWhenLiveUpdate | Gets and sets if the creation of launch items should be skipped for live update.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offlineCachePeriod | Gets and sets the length of time, in days, that the offline cache of a document will remain.
panZoomOrbitShortcuts | Gets and sets how pan, zoom, and orbit should behave.
userInterfaceTheme | Gets and sets which color theme is used by the user interface.
userLanguage | Gets and sets the current language. Setting the language does not take effect until the next time Fusion is started.

Accessed From

Preferences.generalPreferences

Version

Introduced in version August 2014


GeneralPreferences.areAutodesk360NotificationsShown Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if Autodesk 360 notifications are shown.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if in command errors and warnings are shown.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if in command tips and tricks are shown.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if tooltips are shown.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets the interval, in minutes, for automatic versioning.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets the default for which direction is considered "up".

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Get and sets the type of orbit.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets the graphics driver used to display the graphics.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if the file is automatically saved on close.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if a version of the file is automatically saved using a background thread.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if zoom and orbit commands use camera pivot point for transition.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if the command prompt is shown.

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.isDefaultMeasureShown Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if the default measure is shown.

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isDefaultMeasureShown

# Set the value of the property.
generalPreferences_var.isDefaultMeasureShown = 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->isDefaultMeasureShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isDefaultMeasureShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


GeneralPreferences.isGestureBasedViewNavigationUsed Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if gesture based view navigation is used.

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.isHangDetectionEnabled Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets whether hang detection is enabled. This is a Windows only setting. If True, Fusion will detect when a task processes for longer than a specific time. A dialog is displayed if a hang is detected, allowing the user to continue processing or stop Fusion and send an error report.

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isHangDetectionEnabled

# Set the value of the property.
generalPreferences_var.isHangDetectionEnabled = 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->isHangDetectionEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isHangDetectionEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


GeneralPreferences.isSkipCreationWhenLiveUpdate Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if the creation of launch items should be skipped for live update.

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isSkipCreationWhenLiveUpdate

# Set the value of the property.
generalPreferences_var.isSkipCreationWhenLiveUpdate = 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->isSkipCreationWhenLiveUpdate();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isSkipCreationWhenLiveUpdate(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


GeneralPreferences.isValid Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets if the direction of the zoom is reversed.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets the length of time, in days, that the offline cache of a document will remain.

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.panZoomOrbitShortcuts Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets how pan, zoom, and orbit should behave.

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.panZoomOrbitShortcuts

# Set the value of the property.
generalPreferences_var.panZoomOrbitShortcuts = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
PanZoomOrbitShortcuts propertyValue = generalPreferences_var->panZoomOrbitShortcuts();

// Set the value of the property, where value_var is a PanZoomOrbitShortcuts.
bool returnValue = generalPreferences_var->panZoomOrbitShortcuts(value_var);

Property Value

This is a read/write property whose value is a PanZoomOrbitShortcuts.

Version

Introduced in version May 2022


GeneralPreferences.userInterfaceTheme Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets which color theme is used by the user interface.

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.userInterfaceTheme

# Set the value of the property.
generalPreferences_var.userInterfaceTheme = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
UserInterfaceThemes propertyValue = generalPreferences_var->userInterfaceTheme();

// Set the value of the property, where value_var is a UserInterfaceThemes.
bool returnValue = generalPreferences_var->userInterfaceTheme(value_var);

Property Value

This is a read/write property whose value is a UserInterfaceThemes.

Version

Introduced in version January 2025


GeneralPreferences.userLanguage Property

Parent Object: GeneralPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GeneralPreferences.h>

Description

Gets and sets the current language. Setting the language does not take effect until the next time Fusion is started.

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


GeneratedData Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedData.h>

Description

Parent class of all generated data classes. Acts like a void pointer for the entries in the OperationBase.GeneratedDataCollection property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

GeneratedDataCollection.item, GeneratedDataCollection.itemByIdentifier

Derived Classes

OptimizedOrientationResults

Version

Introduced in version July 2023


GeneratedData.classType Method

Parent Object: GeneratedData
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedData.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.GeneratedData.classType()
This is a static method.

#include <Cam/GeneratedData/GeneratedData.h>

returnValue = adsk::cam::GeneratedData::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


GeneratedData.isValid Property

Parent Object: GeneratedData
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedData.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"generatedData_var" is a variable referencing a GeneratedData object.

# Get the value of the property.
propertyValue = generatedData_var.isValid
"generatedData_var" is a variable referencing a GeneratedData object.
#include <Cam/GeneratedData/GeneratedData.h>

// Get the value of the property.
boolean propertyValue = generatedData_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


GeneratedData.objectType Property

Parent Object: GeneratedData
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedData.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"generatedData_var" is a variable referencing a GeneratedData object.

# Get the value of the property.
propertyValue = generatedData_var.objectType
"generatedData_var" is a variable referencing a GeneratedData object.
#include <Cam/GeneratedData/GeneratedData.h>

// Get the value of the property.
string propertyValue = generatedData_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


GeneratedDataCollection Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

Collection can hold multiple GeneratedData results for a particular operation, setup or folder. In the case of folders and setups, the data associated with the child operations is not added to the collection. In most cases folders and setups will not have any items in the collection, whereas most operations will only have one.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets the desired generated data at the given index.
itemByIdentifier | Gets the desired generated data. Generated result objects are unique for a given identifier, but may contain any number of child objects.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMAdditiveContainer.generatedDataCollection, CAMFolder.generatedDataCollection, CAMHoleRecognition.generatedDataCollection, CAMPattern.generatedDataCollection, NCProgram.generatedDataCollection, Operation.generatedDataCollection, OperationBase.generatedDataCollection, Setup.generatedDataCollection

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


GeneratedDataCollection.classType Method

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.GeneratedDataCollection.classType()
This is a static method.

#include <Cam/GeneratedData/GeneratedDataCollection.h>

returnValue = adsk::cam::GeneratedDataCollection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


GeneratedDataCollection.count Property

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.

# Get the value of the property.
propertyValue = generatedDataCollection_var.count
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.
#include <Cam/GeneratedData/GeneratedDataCollection.h>

// Get the value of the property.
uinteger propertyValue = generatedDataCollection_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2023


GeneratedDataCollection.isValid Property

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.

# Get the value of the property.
propertyValue = generatedDataCollection_var.isValid
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.
#include <Cam/GeneratedData/GeneratedDataCollection.h>

// Get the value of the property.
boolean propertyValue = generatedDataCollection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


GeneratedDataCollection.item Method

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

Gets the desired generated data at the given index.

Syntax

  • Python
  • C++
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.
returnValue = generatedDataCollection_var.item(index)
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.

#include <Cam/GeneratedData/GeneratedDataCollection.h>

returnValue = generatedDataCollection_var->item(index);

Parameters

Name | Type | Description
index | integer |

Version

Introduced in version July 2023


GeneratedDataCollection.itemByIdentifier Method

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

Gets the desired generated data. Generated result objects are unique for a given identifier, but may contain any number of child objects.

Syntax

  • Python
  • C++
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.
returnValue = generatedDataCollection_var.itemByIdentifier(resultType)
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.

#include <Cam/GeneratedData/GeneratedDataCollection.h>

returnValue = generatedDataCollection_var->itemByIdentifier(resultType);

Parameters

Name | Type | Description
resultType | GeneratedDataType |

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


GeneratedDataCollection.objectType Property

Parent Object: GeneratedDataCollection
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/GeneratedDataCollection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.

# Get the value of the property.
propertyValue = generatedDataCollection_var.objectType
"generatedDataCollection_var" is a variable referencing a GeneratedDataCollection object.
#include <Cam/GeneratedData/GeneratedDataCollection.h>

// Get the value of the property.
string propertyValue = generatedDataCollection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


GenerateToolpathFuture Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Used to check the state and get back the results of an operation generation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the number of operations whose generation is complete.
numberOfCompletedTasks | Returns the number of tasks of operations whose generation is complete.
numberOfOperations | Returns the number of operations that need to be generated.
numberOfTasks | Returns the number of tasks of operations that need to be generated.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operations | Returns a collection of all operations that need to be generated.

Accessed From

CAM.generateAllToolpaths, CAM.generateToolpath

Samples

Name | Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


GenerateToolpathFuture.classType Method

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns true if all operations are generated.

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
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


GenerateToolpathFuture.isValid Property

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns the number of operations whose generation is complete.

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 API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


GenerateToolpathFuture.numberOfCompletedTasks Property

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns the number of tasks of operations whose generation is complete.

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.numberOfCompletedTasks
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
integer propertyValue = generateToolpathFuture_var->numberOfCompletedTasks();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version July 2023


GenerateToolpathFuture.numberOfOperations Property

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns the number of operations that need to be generated.

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 API Sample | Demonstrates generating the toolpaths in the active document.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


GenerateToolpathFuture.numberOfTasks Property

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns the number of tasks of operations that need to be generated.

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.numberOfTasks
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
integer propertyValue = generateToolpathFuture_var->numberOfTasks();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version July 2023


GenerateToolpathFuture.objectType Property

Parent Object: GenerateToolpathFuture
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/GenerateToolpathFuture.h>

Description

Returns a collection of all operations that need to be generated.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

The base class for all geometric constraints.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraintList.item, GeometricConstraints.item

Derived Classes

CircularPatternConstraint, CoincidentConstraint, CoincidentToSurfaceConstraint, CollinearConstraint, ConcentricConstraint, EqualConstraint, HorizontalConstraint, HorizontalPointsConstraint, LineOnPlanarSurfaceConstraint, LineParallelToPlanarSurfaceConstraint, MidPointConstraint, OffsetConstraint, ParallelConstraint, PerpendicularConstraint, PerpendicularToSurfaceConstraint, PolygonConstraint, RectangularPatternConstraint, SmoothConstraint, SymmetryConstraint, TangentConstraint, VerticalConstraint, VerticalPointsConstraint

Version

Introduced in version August 2014


GeometricConstraint.addHorizontal

Description

Demonstrates the GeometricConstraint.addHorizontal method.

Code Samples

  • Python
def demo_GeometricConstraints_addHorizontal(sketch: adsk.fusion.Sketch):
    # Create a sketch line.
    line = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                            adsk.core.Point3D.create(0, 10, 0))

    # Add a horizontal constraint to the sketch line.
    constraints = sketch.geometricConstraints
    horizontalConstraint = constraints.addHorizontal(line)


GeometricConstraint.addHorizontalPoints

Description

Demonstrates the GeometricConstraint.addHorizontalPoints method.

Code Samples

  • Python
def demo_GeometricConstraints_addHorizontalPoints(sketch: adsk.fusion.Sketch):
    # Create two sketch points.
    pointOne = sketch.sketchPoints.add(adsk.core.Point3D.create(0, 0, 0))
    pointTwo = sketch.sketchPoints.add(adsk.core.Point3D.create(6, 9, 0))

    # Create a Horizontal constraint between the two points.
    constraints = sketch.geometricConstraints
    horizontalPointConstraint = constraints.addHorizontalPoints(pointOne, pointTwo)


GeometricConstraint.addMidPont

Description

Demonstrate the GeometricConstraint.addMidPont method.

Code Samples

  • Python
def demo_GeometricConstraints_addMidPoint(sketch: adsk.fusion.Sketch):
    # Create a sketch point and arc.
    point = sketch.sketchPoints.add(adsk.core.Point3D.create(15, 15, 0))
    arc = sketch.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(0, 0, 0),
                                                          adsk.core.Point3D.create(10, 5, 0),
                                                          adsk.core.Point3D.create(0, 10, 0))

    # Add a midpoint constraint between the point and arc
    constraints = sketch.geometricConstraints
    midPointConstraint = constraints.addMidPoint(point, arc)


GeometricConstraint.assemblyContext Property

Parent Object: GeometricConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: GeometricConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.entityToken
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
string propertyValue = geometricConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


GeometricConstraint.isDeletable Property

Parent Object: GeometricConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

A list of geometric constraints.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchArc.geometricConstraints, SketchCircle.geometricConstraints, SketchConicCurve.geometricConstraints, SketchControlPointSpline.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

Returns the number of constraints in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

Function that returns the specified geometry constraint using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraintList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

A collection of all of the geometric constraints in a sketch. This object also supports the methods to create new geometric constraints.

Methods

Name | Description
addCircularPattern | Creates a new circular pattern in the sketch.
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.
addCoincidentToSurface | Creates a new coincident constraint between the sketch point and surface. This forces the point to lie on the surface.
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.
addLineOnPlanarSurface | Creates a new constraint that forces the sketch line to lie on a planar surface.
addLineParallelToPlanarSurface | Creates a new parallel constraint between a sketch line and a planar surface that will constrain the line to lie on a plane parallel to the specified surface.
addMidPoint | Creates a new midpoint constraint between a point and a curve.
addOffset | **RETIRED** Creates an offset constraint, which results in creating a new set of curves that are an offset of the input curves. The returned offset constraint provides access to the created curves and the parameter controlling the offset. The offset direction is implied by the flow direction of the provided curves. For example, if two connected lines are offset, the flow direction is from line 1 to line 2. A positive offset value creates the offset curve to the "right" of the lines and a negative offset goes to the "left". Left and right are evaluated with respect to the geometry. If you are standing on line 1 looking towards line 2 your left and right are the offset left and right. For closed single curves like circles and ellipses their flow direction is always counterclockwise so a positive offset is always to the outsides.
addOffset2 | Creates an offset constraint, which results in creating a new set of curves that are an offset of the input curves. The returned offset constraint object provides access to the created curves and the parameter controlling the offset.
addParallel | Creates a new parallel constraint between two lines.
addPerpendicular | Creates a new perpendicular constraint between two lines.
addPerpendicularToSurface | Creates a new perpendicular constraint that forces the sketch curve to be perpendicular to the specified surface. Line and spline curves are supported.
addPolygon | Creates a polygon constraint on existing lines in the sketch.
addRectangularPattern | Creates a new rectangular pattern in the sketch.
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 any other type of curve.
addSymmetry | Creates a new symmetry constraint.
addTangent | Creates a new tangent constraint between two curves.
addTwoSidesOffset | Creates two offset constraints, which results in creating two new sets of curves that are an offset of the input curves on each side of the original set of curves. The returned offset constraint objects provide access to the created curves and the parameters controlling the offsets.
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().
createCircularPatternInput | Creates a CircularPatternConstraintInput 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 CircularPatternConstraintInput object.
createOffsetInput | Creates an OffsetConstraintInput object. Use properties and methods on this object to define the offset you want to create and then use the addOffset2 method, passing in the OffsetConstraintInput object, to create the offset.
createRectangularPatternInput | Creates a new RectangularPatternConstraintInput object. Use this object to define the various settings associated with a rectangular pattern in a sketch. Once the pattern is defined you can call the addRectangularPattern method and pass in the input object to create the sketch rectangular pattern.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Sketch.geometricConstraints

Samples

Name | Description
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
GeometricConstraints.addConcentric | Demonstrates the GeometricConstraints.addConcentric method.

Version

Introduced in version August 2014


GeometricConstraints.addCircularPattern Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new circular pattern in the sketch.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addCircularPattern(input)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addCircularPattern(input);

Return Value

Type | Description
CircularPatternConstraint | Returns the newly created CircularPatternConstraint object or null if the creation failed.

Parameters

Name | Type | Description
input | CircularPatternConstraintInput | A CircularPatternConstraintInput object that defines the desired circular pattern. Use the createCircularPatternInput method to create a new CircularPatternConstraintInput object and then use methods on it to define the circular pattern.

Version

Introduced in version September 2022


GeometricConstraints.addCoincident Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

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.

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.

Samples

Name | Description
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.

Version

Introduced in version August 2014


GeometricConstraints.addCoincident

Description

Demonstrates the GeometricConstraints.addCoincident method.

Code Samples

  • Python
def demo_GeometricConstraints_addCoincident(sketch: adsk.fusion.Sketch):
    # Create a sketch point and arc.
    point = sketch.sketchPoints.add(adsk.core.Point3D.create(0, 0, 0))
    arc = sketch.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(15, 14, 0),
                                                            adsk.core.Point3D.create(9, 11, 0),
                                                            adsk.core.Point3D.create(7, 13, 0))

    # Create a coincident constraint between the point and the arc.
    constraints = sketch.geometricConstraints
    coincidentConstraint = constraints.addCoincident(point, arc)


GeometricConstraints.addCoincidentToSurface Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new coincident constraint between the sketch point and surface. This forces the point to lie on the surface.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addCoincidentToSurface(point, surface)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addCoincidentToSurface(point, surface);

Return Value

Type | Description
CoincidentToSurfaceConstraint | Returns the newly created CoincidentToSurfaceConstraint object or null if the creation failed.

Parameters

Name | Type | Description
point | SketchPoint | The SketchPoint to constrain to the surface.
surface | Base | The BRepFace or ConstructionPlane the point will be coincident to.

Version

Introduced in version September 2023


GeometricConstraints.addCollinear Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new collinear constraint between two lines.

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.

Samples

Name | Description
GeometricConstraints.addCollinear | Demonstrates the GeometricConstraints.addCollinear method.

Version

Introduced in version August 2014


GeometricConstraints.addCollinear

Description

Demonstrates the GeometricConstraints.addCollinear method.

Code Samples

  • Python
def demo_GeometricConstraints_addCollinear(sketch: adsk.fusion.Sketch):
    # Create two sketch lines.
    lineOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                             adsk.core.Point3D.create(5, 0, 0))
    lineTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 10, 0),
                                                             adsk.core.Point3D.create(10, 15, 0))

    # Create a collinear constraint between the lines
    constraints = sketch.geometricConstraints
    collinearConstraint = constraints.addCollinear(lineOne, lineTwo)


GeometricConstraints.addConcentric Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new concentric constraint between two circles, arcs, ellipses, or elliptical arcs.

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.

Samples

Name | Description
GeometricConstraints.addConcentric | Demonstrates the GeometricConstraints.addConcentric method.

Version

Introduced in version August 2014


GeometricConstraints.addConcentric

Description

Demonstrates the GeometricConstraints.addConcentric method.

Code Samples

  • Python
def demo_GeometricConstraints_addConcentric(sketch: adsk.fusion.Sketch):
    # Create two sketch circles.
    entityOne = sketch.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(2, 3, 0),
                                                                    radius = 3)
    entityTwo = sketch.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(6, 12, 0),
                                                                    radius = 2)

    # Create a concentric constraint beween the circles.
    constraints = sketch.geometricConstraints
    concentricConstraint = constraints.addConcentric(entityOne, entityTwo)


GeometricConstraints.addEqual Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new equal constraint between two lines, or between arcs and circles.

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.

Samples

Name | Description
GeometricConstraints.addEqual | Demonstrates the GeometricConstraints.addEqual method.

Version

Introduced in version August 2014


GeometricConstraints.addEqual

Description

Demonstrates the GeometricConstraints.addEqual method.

Code Samples

  • Python
def demo_GeometricConstraints_addEqual(sketch: adsk.fusion.Sketch):
    # Create two sketch lines..
    curveOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                                adsk.core.Point3D.create(10, 0, 0))
    curveTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 10, 0),
                                                                adsk.core.Point3D.create(10, 10, 0))

    # Create an equal constraint between the two lines to make them equal length.
    constraints = sketch.geometricConstraints
    equalConstraint = constraints.addEqual(curveOne, curveTwo)


GeometricConstraints.addHorizontal Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new horizontal constraint on a line.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
GeometricConstraint.addHorizontal | Demonstrates the GeometricConstraint.addHorizontal method.

Version

Introduced in version August 2014


GeometricConstraints.addHorizontalPoints Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new horizontal constraint between two points.

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.

Samples

Name | Description
GeometricConstraint.addHorizontalPoints | Demonstrates the GeometricConstraint.addHorizontalPoints method.

Version

Introduced in version August 2014


GeometricConstraints.addLineOnPlanarSurface Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new constraint that forces the sketch line to lie on a planar surface.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addLineOnPlanarSurface(line, planarSurface)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addLineOnPlanarSurface(line, planarSurface);

Return Value

Type | Description
LineOnPlanarSurfaceConstraint | Returns the newly created LineOnPlanarSurfaceConstraint object or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The SketchLine to constrain to the surface.
planarSurface | Base | The planar BRepFace or CosntructionPlane the sketch line will lie on.

Version

Introduced in version September 2023


GeometricConstraints.addLineParallelToPlanarSurface Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new parallel constraint between a sketch line and a planar surface that will constrain the line to lie on a plane parallel to the specified surface.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addLineParallelToPlanarSurface(line, planarSurface)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addLineParallelToPlanarSurface(line, planarSurface);

Return Value

Type | Description
LineParallelToPlanarSurfaceConstraint | Returns the newly created LineParallelToPlanarSurfaceConstraint object or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The SketchLine to constrain to the surface.
planarSurface | Base | The planar BRepFace or CosntructionPlane the sketch line will be parallel to.

Version

Introduced in version September 2023


GeometricConstraints.addMidPoint Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new midpoint constraint between a point and a curve.

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.

Samples

Name | Description
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.

Version

Introduced in version August 2014


GeometricConstraints.addOffset Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Creates an offset constraint, which results in creating a new set of curves that are an offset of the input curves. The returned offset constraint provides access to the created curves and the parameter controlling the offset.

The offset direction is implied by the flow direction of the provided curves. For example, if two connected lines are offset, the flow direction is from line 1 to line 2. A positive offset value creates the offset curve to the "right" of the lines and a negative offset goes to the "left". Left and right are evaluated with respect to the geometry. If you are standing on line 1 looking towards line 2 your left and right are the offset left and right. For closed single curves like circles and ellipses their flow direction is always counterclockwise so a positive offset is always to the outsides.

Remarks

To access the full capabilities supported by offset, you should use the createOffsetInput and addOffset2 methods.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addOffset(curves, offset, basePoint)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addOffset(curves, offset, basePoint);

Return Value

Type | Description
OffsetConstraint | The created OffsetConstraint. You can use properties on the constraint to get information about the offset.

Parameters

Name | Type | Description
curves | SketchCurve[] | A set of end connected curves. The Sketch.FindConnectedCurves method is a convenient way to get this set of curves.
offset | ValueInput | The value that defines the offset. This is a ValueInput object so it can be a float value to define the offset in centimeters or it can be a string defining an expression that will be used by the dimension that controls the offset.
basePoint | Point3D | The location on one of the curves where the offset dimension will be created.

Version

Introduced in version September 2022
Retired in version September 2024


GeometricConstraints.addOffset2 Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates an offset constraint, which results in creating a new set of curves that are an offset of the input curves. The returned offset constraint object provides access to the created curves and the parameter controlling the offset.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addOffset2(input)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addOffset2(input);

Return Value

Type | Description
OffsetConstraint | Returns the newly created OffsetConstraint object or null if the creation failed.

Parameters

Name | Type | Description
input | OffsetConstraintInput | The OffsetConstraintInput object that defines the offset to create.

Version

Introduced in version September 2024


GeometricConstraints.addParallel Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new parallel constraint between two lines.

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.

Samples

Name | Description
GeometricConstraints.addParallel | Demonstrate the GeometricConstraints.addParallel method.

Version

Introduced in version August 2014


GeometricConstraints.addParallel

Description

Demonstrate the GeometricConstraints.addParallel method.

Code Samples

  • Python
def demo_GeometricConstraints_addParallel(sketch: adsk.fusion.Sketch):
    # Create two sketch lines.
    lineOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                             adsk.core.Point3D.create(0, 10, 0))
    lineTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(2, 5, 0),
                                                             adsk.core.Point3D.create(13, 10, 0))

    # Create a parallel constraint between the two lines.
    constraints = sketch.geometricConstraints
    parallelConstraint = constraints.addParallel(lineOne, lineTwo)


GeometricConstraints.addPerpendicular Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new perpendicular constraint between two lines.

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.

Samples

Name | Description
GeometricConstraints.addPerpendicular | Demonstrates the GeometricConstraints.addPerpendicular method.

Version

Introduced in version August 2014


GeometricConstraints.addPerpendicular

Description

Demonstrates the GeometricConstraints.addPerpendicular method.

Code Samples

  • Python
def demo_GeometricConstraints_addPerpendicular(sketch: adsk.fusion.Sketch):
    # Create two sketch lines.
    lineOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                             adsk.core.Point3D.create(0, 10, 0))
    lineTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(2, 5, 0),
                                                             adsk.core.Point3D.create(13, 10, 0))

    # Create a perpendicular constraint between the two lines.
    constraints = sketch.geometricConstraints
    parallelConstraint = constraints.addPerpendicular(lineOne, lineTwo)


GeometricConstraints.addPerpendicularToSurface Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new perpendicular constraint that forces the sketch curve to be perpendicular to the specified surface. Line and spline curves are supported.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addPerpendicularToSurface(curve, surface)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addPerpendicularToSurface(curve, surface);

Return Value

Type | Description
PerpendicularToSurfaceConstraint | Returns the newly created PerpendicularToSurfaceConstraint object or null if the creation failed.

Parameters

Name | Type | Description
curve | SketchCurve | The SketchCurve to constrain to the surface.
surface | Base | The BRepFace or ConstructionPlane the line will be perpendicular to.

Version

Introduced in version September 2023


GeometricConstraints.addPolygon Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a polygon constraint on existing lines in the sketch.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addPolygon(lines)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addPolygon(lines);

Return Value

Type | Description
PolygonConstraint | Returns the created PolygonConstraint or null if the creation failed.

Parameters

Name | Type | Description
lines | SketchLine[] | An array of existing SketchLine objects in this sketch that define a valid polygon. They must be the same length, connect at their endpoints, have the same angle between them, and define a closed shape. The order of the lines within the array does not matter.

Version

Introduced in version January 2025


GeometricConstraints.addRectangularPattern Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new rectangular pattern in the sketch.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addRectangularPattern(input)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addRectangularPattern(input);

Parameters

Name | Type | Description
input | RectangularPatternConstraintInput | A RectangularPatternConstraintInput object that defines all of inputs required to create the desired rectangular pattern. Use the createRectangularPatternInput method to create the input object.

Version

Introduced in version September 2022


GeometricConstraints.addSmooth Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

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 any other type of curve.

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 constrained to be smooth to the second curve.
curveTwo | SketchCurve | The second curve to be constrained to be smooth to the first curve.

Samples

Name | Description
GeometricConstraints.addSmooth | Demonstrate the GeometricConstraints.addSmooth method.

Version

Introduced in version August 2014


GeometricConstraints.addSmooth

Description

Demonstrate the GeometricConstraints.addSmooth method.

Code Samples

  • Python
def demo_GeometricConstraints_addSmooth(sketch: adsk.fusion.Sketch):
    # Create a sketch arc.
    arc = sketch.sketchCurves.sketchArcs.addByCenterStartSweep(adsk.core.Point3D.create(5, 5, 0),
                                                               adsk.core.Point3D.create(15, 0, 0),
                                                               -135.0)

    # Create a spline that's connected to the end point of the arc.
    points = adsk.core.ObjectCollection.create()
    points.add(arc.endSketchPoint)
    points.add(adsk.core.Point3D.create(10, 8, 0))
    points.add(adsk.core.Point3D.create(5, 6, 0))
    points.add(adsk.core.Point3D.create(0, 8, 0))
    spline = sketch.sketchCurves.sketchFittedSplines.add(points)

    # Create the smooth constraint between the arc and the spline.
    constraints = sketch.geometricConstraints
    smoothConstraint = constraints.addSmooth(arc, spline)


GeometricConstraints.addSymmetry Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new symmetry constraint.

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.

Samples

Name | Description
GeometricConstraints.addSymmetry | Demonstrates the GeometricConstraints.addSymmetry method.

Version

Introduced in version August 2014


GeometricConstraints.addSymmetry

Description

Demonstrates the GeometricConstraints.addSymmetry method.

Code Samples

  • Python
def demo_GeometricConstraints_addSymmetry(sketch: adsk.fusion.Sketch):
    # Create two sketch circles.
    leftCircle = sketch.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(2, 3, 0), 3)
    rightCircle = sketch.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(10, 5, 0), 2)

    # Create a sketch line.
    symmetryLine = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(6, 0, 0),
                                                                  adsk.core.Point3D.create(6, 7, 0))

    # Add a symmetric constraint to make the circles symmetric around the line.
    constraints = sketch.geometricConstraints
    symmetryConstraint = constraints.addSymmetry(leftCircle, rightCircle, symmetryLine)


GeometricConstraints.addTangent Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new tangent constraint between two curves.

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 API Sample | Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.
GeometricConstraints.addTangent | Demonstrates the GeometricConstraints.addTangent method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.

Version

Introduced in version August 2014


GeometricConstraints.addTangent

Description

Demonstrates the GeometricConstraints.addTangent method.

Code Samples

  • Python
def demo_GeometricConstraints_addTangent(sketch: adsk.fusion.Sketch):
   # Create a sketch line and sketch arc that is connected to the line.
    arc = sketch.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(0, 0, 0),
                                                          adsk.core.Point3D.create(10, 5, 0),
                                                          adsk.core.Point3D.create(0, 10, 0))
    line = sketch.sketchCurves.sketchLines.addByTwoPoints(arc.endSketchPoint, adsk.core.Point3D.create(-5, 12, 0))

    # Create a tangent constraint between the line and arc.
    constraints = sketch.geometricConstraints
    tangentConstraint = constraints.addTangent(arc, line)


GeometricConstraints.addTwoSidesOffset Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates two offset constraints, which results in creating two new sets of curves that are an offset of the input curves on each side of the original set of curves. The returned offset constraint objects provide access to the created curves and the parameters controlling the offsets.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addTwoSidesOffset(input, linkOffsets)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addTwoSidesOffset(input, linkOffsets);

Return Value

Type | Description
OffsetConstraint[] | Returns an array containing the two OffsetConstraint objects or errors if the creation failed.

Parameters

Name | Type | Description
input | OffsetConstraintInput | The OffsetConstraintInput object that defines the offset to create. The same definition applies to both offsets that are created.
linkOffsets | boolean | Defines if the parameter driving the offset of the second side should reference the parameter of the first side. This sets up the parameters so if the first side is edited, the second side will automatically update using the same value. A value of true will create the linked parameter.

Version

Introduced in version September 2024


GeometricConstraints.addVertical Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new vertical constraint on a line.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
GeometricConstraints.addVertical | Demonstrates the GeometricConstraints.addVertical method.

Version

Introduced in version August 2014


GeometricConstraints.addVertical

Description

Demonstrates the GeometricConstraints.addVertical method.

Code Samples

  • Python
def demo_GeometricConstraints_addVertical(sketch: adsk.fusion.Sketch):
    # Create a sketch line.
    line = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                          adsk.core.Point3D.create(0, 10, 0))

    # Add a vertical constraint to the sketch line.
    constraints = sketch.geometricConstraints
    verticalConstraint = constraints.addVertical(line)


GeometricConstraints.addVerticalPoints Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new vertical constraint between two points.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Returns the number of constraints in the sketch.

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.createCircularPatternInput Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a CircularPatternConstraintInput 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 CircularPatternConstraintInput object.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.createCircularPatternInput(inputEntities, centerPoint)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->createCircularPatternInput(inputEntities, centerPoint);

Return Value

Type | Description
CircularPatternConstraintInput | Returns the newly created CircularPatternConstraintInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | SketchEntity[] | An array of sketch entities to be patterned. All of the entities must be from the current sketch.
centerPoint | SketchPoint | A SketchPoint from the same sketch that defines the center of the pattern.

Version

Introduced in version September 2022


GeometricConstraints.createOffsetInput Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates an OffsetConstraintInput object. Use properties and methods on this object to define the offset you want to create and then use the addOffset2 method, passing in the OffsetConstraintInput object, to create the offset.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.createOffsetInput(curves, offset)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->createOffsetInput(curves, offset);

Return Value

Type | Description
OffsetConstraintInput | Returns an OffsetConstraintInput object or null in the case of invalid input.

Parameters

Name | Type | Description
curves | SketchCurve[] | A set of end connected curves. The Sketch.FindConnectedCurves method is a convenient way to get this set of curves.
offset | ValueInput | The value that defines the offset. This is a ValueInput object so it can be a float value to define the offset in centimeters or it can be a string defining an expression that will be used by the parameter controlling the offset. A positive offset value creates the offset curve to the "right" and a negative offset value goes to the "left". The flow direction of the provided curves implies the offset direction. For example, if two connected lines are offset, the flow direction is from line 1 to line 2. Left and right are evaluated relative to the input geometry. If you are standing on line 1 and looking towards line 2, the offset's left side is on your left, and the right side is to your right. Closed single curves like circles and ellipses always have a counterclockwise flow, so a positive offset is always to the outside. For closed splines, the positive direction is based on the spline's parameterization.

Version

Introduced in version September 2024


GeometricConstraints.createRectangularPatternInput Method

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Creates a new RectangularPatternConstraintInput object. Use this object to define the various settings associated with a rectangular pattern in a sketch. Once the pattern is defined you can call the addRectangularPattern method and pass in the input object to create the sketch rectangular pattern.

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.createRectangularPatternInput(entities, distanceType)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->createRectangularPatternInput(entities, distanceType);

Return Value

Type | Description
RectangularPatternConstraintInput | Returns the created RectangularPatternsConstraintInput object or null in the case of failure.

Parameters

Name | Type | Description
entities | SketchEntity[] | An array of sketch entities to pattern. These can be sketch points and curves.
distanceType | PatternDistanceType | Specifies if the distances defined for the pattern define the overall size of the pattern or the distance between the rows and columns.

Version

Introduced in version September 2022


GeometricConstraints.isValid Property

Parent Object: GeometricConstraints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

Function that returns the specified sketch constraint using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/GeometricConstraints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


GeometricRelationship Object

GeometricRelationship Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object represents a pair of entity inputs that are used when inferring a joint from geometry or for an assembly constraint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | This method deletes this geometric relationship. If the isTemporary property is True, it removes it from the input object. If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).
redefineOffsetOrAngle | This method redefines an existing geometric relationship by defining if it is a mate or angle and specifying a new value. If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Properties

Name | Description
angleReferenceEntity This property is used to define a third vector when an angle constraint is being defined. This property is ignored for mate constraints.

In some cases, when specifying entityOne and entityTwo for an angle constraint there is more than one solution. When the constraint is solved, entityOne and entityTwo each define a vector. When the reference entity is provided, the vectors need to follow the "right hand rule" with respect to the reference entity. This means the angle between the reference entity and the cross product of entityOne and entityTwo should be between 0 and 90 deg.

The reference entity can be a planar BRepFace or a linear or circular BRepedge.

This property can return and be set to null to indicate there is no reference entity.
entityOne Gets and sets the first entity in the relationship. The entity can be a BRepFace, BRepedge, BRepVertex, SketchPoint, SketchCurve, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).
entityTwo Gets and sets the second entity in the relationship. The entity can be a BRepFace, BRepedge, BRepVertex, SketchPoint, SketchCurve, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).
isFlipped Gets and sets if the directions of the entities are aligned or opposed. The natural direction is for them to be opposed, and flipping them will align them.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).
isMate | Gets and sets if this geometric relationships defines a mate or angle relationship between the two input entities. If true, it is a mate relationship.
isSuppressed | Gets and sets if this relationship is suppressed. This property is only valid when this geometric relationship is associated with an existing AssemblyConstraint. Otherwise, getting the value of this property will always return false, and setting it will be ignored.
isTemporary | Specifies if this GeometricRelationship is a child of an input object is being used to create a new Joint or AssemblyConstraint or is being used by an existing Joint or AssemblyConstraint.
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 constraint as seen in the browser. This property will only return a name when the geometric relationship is associated with an existing AssemblyConstraint or inferred Joint (the isTemporary property is false). Otherwise, it will return an empty string.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offsetOrAngle This property is used when the geometric relationship is associated with an existing joint or assembly constraint (the isTemporary property is false). It returns the parameter that controls the offset or angle of this geometric relationship. You can change the value by editing properties on the returned ModelParameter object.

If this geometric relationship is associated with a JointInput object (the isTemporary property is true), this property returns null, and you should use the offsetOrAngleValue property to get and set the value.
offsetOrAngleValue This property is used when creating a new joint or assembly constraint and defines the offset or angle associated with this geometric relationship. The value defaults to 0, but can be set with a ValueInput defining a length or angle. It can be either a real value, which will be in centimeters or radians, or a string, which is an expression whose units are length or angle.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), this property will return null and fail if set. To get and set the value in this case you should use the offsetOrAngle property to access the controlling parameter.
parent | Returns the parent AssemblyConstraint, Joint, InferredJointInput, or AssemblyConstraintInput object with which this geometric relationship is associated.

Accessed From

GeometricRelationships.add, GeometricRelationships.item

Version

Introduced in version July 2025


GeometricRelationship.angleReferenceEntity Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This property is used to define a third vector when an angle constraint is being defined. This property is ignored for mate constraints.

In some cases, when specifying entityOne and entityTwo for an angle constraint there is more than one solution. When the constraint is solved, entityOne and entityTwo each define a vector. When the reference entity is provided, the vectors need to follow the "right hand rule" with respect to the reference entity. This means the angle between the reference entity and the cross product of entityOne and entityTwo should be between 0 and 90 deg.

The reference entity can be a planar BRepFace or a linear or circular BRepedge.

This property can return and be set to null to indicate there is no reference entity.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.angleReferenceEntity

# Set the value of the property.
geometricRelationship_var.angleReferenceEntity = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = geometricRelationship_var->angleReferenceEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = geometricRelationship_var->angleReferenceEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


GeometricRelationship.classType Method

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.GeometricRelationship.classType()
This is a static method.

#include <Fusion/Components/GeometricRelationship.h>

returnValue = adsk::fusion::GeometricRelationship::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


GeometricRelationship.deleteMe Method

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This method deletes this geometric relationship.

If the isTemporary property is True, it removes it from the input object.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
returnValue = geometricRelationship_var.deleteMe()
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

#include <Fusion/Components/GeometricRelationship.h>

returnValue = geometricRelationship_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version July 2025


GeometricRelationship.entityOne Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Gets and sets the first entity in the relationship. The entity can be a BRepFace, BRepedge, BRepVertex, SketchPoint, SketchCurve, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.entityOne

# Set the value of the property.
geometricRelationship_var.entityOne = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = geometricRelationship_var->entityOne();

// Set the value of the property, where value_var is a Base.
bool returnValue = geometricRelationship_var->entityOne(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


GeometricRelationship.entityTwo Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Gets and sets the second entity in the relationship. The entity can be a BRepFace, BRepedge, BRepVertex, SketchPoint, SketchCurve, ConstructionPlane, ConstructionAxis, or ConstructionPoint object.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.entityTwo

# Set the value of the property.
geometricRelationship_var.entityTwo = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = geometricRelationship_var->entityTwo();

// Set the value of the property, where value_var is a Base.
bool returnValue = geometricRelationship_var->entityTwo(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


GeometricRelationship.isFlipped Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Gets and sets if the directions of the entities are aligned or opposed. The natural direction is for them to be opposed, and flipping them will align them.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.isFlipped

# Set the value of the property.
geometricRelationship_var.isFlipped = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
boolean propertyValue = geometricRelationship_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = geometricRelationship_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationship.isMate Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Gets and sets if this geometric relationships defines a mate or angle relationship between the two input entities. If true, it is a mate relationship.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.isMate
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
boolean propertyValue = geometricRelationship_var->isMate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationship.isSuppressed Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Gets and sets if this relationship is suppressed. This property is only valid when this geometric relationship is associated with an existing AssemblyConstraint. Otherwise, getting the value of this property will always return false, and setting it will be ignored.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.isSuppressed

# Set the value of the property.
geometricRelationship_var.isSuppressed = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
boolean propertyValue = geometricRelationship_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = geometricRelationship_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationship.isTemporary Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Specifies if this GeometricRelationship is a child of an input object is being used to create a new Joint or AssemblyConstraint or is being used by an existing Joint or AssemblyConstraint.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.isTemporary
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
boolean propertyValue = geometricRelationship_var->isTemporary();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationship.isValid Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.isValid
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
boolean propertyValue = geometricRelationship_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationship.name Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Returns the name of the constraint as seen in the browser. This property will only return a name when the geometric relationship is associated with an existing AssemblyConstraint or inferred Joint (the isTemporary property is false). Otherwise, it will return an empty string.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.name
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
string propertyValue = geometricRelationship_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


GeometricRelationship.objectType Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.objectType
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
string propertyValue = geometricRelationship_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


GeometricRelationship.offsetOrAngle Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This property is used when the geometric relationship is associated with an existing joint or assembly constraint (the isTemporary property is false). It returns the parameter that controls the offset or angle of this geometric relationship. You can change the value by editing properties on the returned ModelParameter object.

If this geometric relationship is associated with a JointInput object (the isTemporary property is true), this property returns null, and you should use the offsetOrAngleValue property to get and set the value.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.offsetOrAngle
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = geometricRelationship_var->offsetOrAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version July 2025


GeometricRelationship.offsetOrAngleValue Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This property is used when creating a new joint or assembly constraint and defines the offset or angle associated with this geometric relationship. The value defaults to 0, but can be set with a ValueInput defining a length or angle. It can be either a real value, which will be in centimeters or radians, or a string, which is an expression whose units are length or angle.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), this property will return null and fail if set. To get and set the value in this case you should use the offsetOrAngle property to access the controlling parameter.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.offsetOrAngleValue

# Set the value of the property.
geometricRelationship_var.offsetOrAngleValue = propertyValue
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = geometricRelationship_var->offsetOrAngleValue();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = geometricRelationship_var->offsetOrAngleValue(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version July 2025


GeometricRelationship.parent Property

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

Returns the parent AssemblyConstraint, Joint, InferredJointInput, or AssemblyConstraintInput object with which this geometric relationship is associated.

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

# Get the value of the property.
propertyValue = geometricRelationship_var.parent
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
#include <Fusion/Components/GeometricRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = geometricRelationship_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2025


GeometricRelationship.redefineOffsetOrAngle Method

Parent Object: GeometricRelationship

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationship.h>

Description

This method redefines an existing geometric relationship by defining if it is a mate or angle and specifying a new value.

If the GeometricRelationship is associated with an existing joint or assembly constraint (the isTemporary property is false), you need to position the timeline marker immediately before the joint or assembly constraint. This can be accomplished using the following code: thisJointOrConstraint.timelineObject.rollTo(True).

Syntax

  • Python
  • C++
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.
returnValue = geometricRelationship_var.redefineOffsetOrAngle(isMate, offsetOrAngleValue)
"geometricRelationship_var" is a variable referencing a GeometricRelationship object.

#include <Fusion/Components/GeometricRelationship.h>

returnValue = geometricRelationship_var->redefineOffsetOrAngle(isMate, offsetOrAngleValue);

Return Value

Type | Description
boolean | Returns true if the redefinition was successful.

Parameters

Name | Type | Description
isMate | boolean | This argument indicates if the geometric relationship defines a mate or an angle. A value of true indicates a mate relationship.
offsetOrAngleValue | ValueInput | This argument specifies the value associated with the geometric relationship. If isMate is true, the value is a length, and if it is a real value, then it is centimeters. If it is a string, it is an expression that must evaluate to a length. If isMate is False, the value is an angle, and if it is a real value, then it is radians. If it is a string, it is an expression that must evaluate to an angle.

Version

Introduced in version July 2025


GeometricRelationships Object

GeometricRelationships Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This object represents a set of geometry relationships. They are used when creating a new inferred joint or assembly constraint and querying an existing one.

Methods

Name | Description
add | Creates a GeometricRelationship object, which defines two entities that will be used to either infer a joint or to create an assembly constraint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 GeometricRelationship using an index into the collection.

Properties

Name | Description
count | Returns number of geometric relationships 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

AssemblyConstraint.geometricRelationships, AssemblyConstraintInput.geometricRelationships, InferredJointInput.geometricRelationships, Joint.geometricRelationships

Version

Introduced in version July 2025


GeometricRelationships.add Method

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

Creates a GeometricRelationship object, which defines two entities that will be used to either infer a joint or to create an assembly constraint.

Syntax

  • Python
  • C++
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.
# Uses no optional arguments.
returnValue = geometricRelationships_var.add(entityOne, entityTwo, isMate, value)

# Uses optional arguments.
returnValue = geometricRelationships_var.add(entityOne, entityTwo, isMate, value, biasPointOne, biasPointTwo)
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.

#include <Fusion/Components/GeometricRelationships.h>

// Uses no optional arguments.
returnValue = geometricRelationships_var->add(entityOne, entityTwo, isMate, value);

// Uses optional arguments.
returnValue = geometricRelationships_var->add(entityOne, entityTwo, isMate, value, biasPointOne, biasPointTwo);

Return Value

Type | Description
GeometricRelationship | Returns the GeometricRelationship object or null if the creation failed.

Parameters

Name | Type | Description
entityOne | Base | Specifies the entity from the first occurrence being constrained. The entity can be a BRepFace, BRepEdge, BRepVertex ,SketchLine, SketchPoint, ConstructionPlane, ConstructionAxis, or ConstructionPoint object in the component referenced by the occurrence. It must be a proxy relative to the root component of the assembly. For an inferred joint, if multiple geometric relationships are created, the entities for entityOne must all be from the same occurrence.This is because a single joint will be inferred between the two occurrences. For an assembly constraint, if multiple geometric relationships are created, the entities for entityOne must all be from the same occurrence. This is because all the geometric relationships constrain the occurrence this entity is from.
entityTwo | Base | Specifies the entity from the second occurrence being constrained. The entity can be a BRepFace, BRepEdge, BRepVertex, SketchLine, SketchPoint, ConstructionPlane, ConstructionAxis, or ConstructionPoint object in the component referenced by the occurrence. It must be a proxy relative to the root component of the assembly. For an inferred joint, if multiple geometric relationships are created, the entities for entityTwo must all be from the same occurrence. This is because a single joint will be inferred between the two occurrences. For an assembly constraint, if multiple geometric relationships are created, the entities for entityTwo must all be from the same occurrence. This is because all the geometric relationships constrain the occurrence this entity is from.
isMate | boolean | Specifies if this geometric relationship defines a mate or an angle between the two input entities. If true, it defines a mate; if false, it is an angle.
value | ValueInput | Specifies the value associated with the geometric relationship. If isMate is true, the value is a length, and a real value in centimeters. If it is a string, it is an expression that must evaluate to a length. If the isMate argument is False, the value is an angle, and a real value in radians. If it is a string, it is an expression that must evaluate to an angle.
biasPointOne | Point3D | This optional argument defines a position on the first entity that will be used when positioning the two occurrences. In the user interface, if you select two faces and create an inferred joint, the two faces will be used to mate the occurrences together. Still, there are infinite possibilities of how the occurrences can be positioned relative to one another. The location of the selection points is used to determine a single result, and the occurrences will be positioned so that the selection points are coincident. There aren't selection points in the API, but you can optionally define points that will be used, like the selection points. Fusion will calculate arbitrary points on the entities if the bias points aren't provided. The bias points are not remembered and are only used for the initial placement. This is an optional argument whose default value is null.
biasPointTwo | Point3D | See the description for biasPointOne. This is an optional argument whose default value is null.

Version

Introduced in version July 2025


GeometricRelationships.classType Method

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.GeometricRelationships.classType()
This is a static method.

#include <Fusion/Components/GeometricRelationships.h>

returnValue = adsk::fusion::GeometricRelationships::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


GeometricRelationships.count Property

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

Returns number of geometric relationships in the collection.

Syntax

  • Python
  • C++
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.

# Get the value of the property.
propertyValue = geometricRelationships_var.count
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.
#include <Fusion/Components/GeometricRelationships.h>

// Get the value of the property.
uinteger propertyValue = geometricRelationships_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2025


GeometricRelationships.isValid Property

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.

# Get the value of the property.
propertyValue = geometricRelationships_var.isValid
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.
#include <Fusion/Components/GeometricRelationships.h>

// Get the value of the property.
boolean propertyValue = geometricRelationships_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


GeometricRelationships.item Method

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

Function that returns the specified GeometricRelationship using an index into the collection.

Syntax

  • Python
  • C++
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.
returnValue = geometricRelationships_var.item(index)
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.

#include <Fusion/Components/GeometricRelationships.h>

returnValue = geometricRelationships_var->item(index);

Return Value

Type | Description
GeometricRelationship | 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 2025


GeometricRelationships.objectType Property

Parent Object: GeometricRelationships

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/GeometricRelationships.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.

# Get the value of the property.
propertyValue = geometricRelationships_var.objectType
"geometricRelationships_var" is a variable referencing a GeometricRelationships object.
#include <Fusion/Components/GeometricRelationships.h>

// Get the value of the property.
string propertyValue = geometricRelationships_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


GeometryGraphNodeProperty Object

GeometryGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that represents a link to a geometric object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
beamNetwork | Set the value of the property. The value should be a BeamNetwork object, which defines the geometry by defining vertices, beams and radii of the beams.
customSDFCallbackID | The ID of a custom Signed Distance Field callback object registered with CustomSDFCallbackRegistry. Setting this will override any CAD geometry set previously.
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property. This should be one or more CAD geometry objects, such as a BREP or mesh bodies, faces or sketch curves. Setting this will override any value set by customSDFCallbackID.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.beamNetwork Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Set the value of the property. The value should be a BeamNetwork object, which defines the geometry by defining vertices, beams and radii of the beams.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.beamNetwork

# Set the value of the property.
geometryGraphNodeProperty_var.beamNetwork = propertyValue
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
Ptr<BeamNetwork> propertyValue = geometryGraphNodeProperty_var->beamNetwork();

// Set the value of the property, where value_var is a BeamNetwork.
bool returnValue = geometryGraphNodeProperty_var->beamNetwork(value_var);

Property Value

This is a read/write property whose value is a BeamNetwork.

Version

Introduced in version July 2025


GeometryGraphNodeProperty.classType Method

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.GeometryGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

returnValue = adsk::volume::GeometryGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.customSDFCallbackID Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

The ID of a custom Signed Distance Field callback object registered with CustomSDFCallbackRegistry. Setting this will override any CAD geometry set previously.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.customSDFCallbackID

# Set the value of the property.
geometryGraphNodeProperty_var.customSDFCallbackID = propertyValue
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = geometryGraphNodeProperty_var->customSDFCallbackID();

// Set the value of the property, where value_var is a string.
bool returnValue = geometryGraphNodeProperty_var->customSDFCallbackID(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.description Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.description
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = geometryGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.isValid Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.isValid
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = geometryGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.name Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.name
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = geometryGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.objectType Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.objectType
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = geometryGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GeometryGraphNodeProperty.value Property

Parent Object: GeometryGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GeometryGraphNodeProperty.h>

Description

Get or set the value of the property. This should be one or more CAD geometry objects, such as a BREP or mesh bodies, faces or sketch curves. Setting this will override any value set by customSDFCallbackID.

Syntax

  • Python
  • C++
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.

# Get the value of the property.
propertyValue = geometryGraphNodeProperty_var.value

# Set the value of the property.
geometryGraphNodeProperty_var.value = propertyValue
"geometryGraphNodeProperty_var" is a variable referencing a GeometryGraphNodeProperty object.
#include <Volume/Volumetric/GeometryGraphNodeProperty.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = geometryGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a Base.
bool returnValue = geometryGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version May 2025


GeometrySelection Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Base parent class for all selection classes. All selections are currently restricted to B-Rep entities or sketches.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Derived Classes

ArrangeSelection, CurveSelection, MachineAvoidSelectionBase

Version

Introduced in version April 2023


GeometrySelection.classType Method

Parent Object: GeometrySelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.GeometrySelection.classType()
This is a static method.

#include <Cam/GeometrySelections/GeometrySelection.h>

returnValue = adsk::cam::GeometrySelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


GeometrySelection.error Property

Parent Object: GeometrySelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.error
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
string propertyValue = geometrySelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


GeometrySelection.hasError Property

Parent Object: GeometrySelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.hasError
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
boolean propertyValue = geometrySelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


GeometrySelection.hasWarning Property

Parent Object: GeometrySelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.hasWarning
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
boolean propertyValue = geometrySelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


GeometrySelection.isValid Property

Parent Object: GeometrySelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.isValid
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
boolean propertyValue = geometrySelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


GeometrySelection.objectType Property

Parent Object: GeometrySelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.objectType
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
string propertyValue = geometrySelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


GeometrySelection.value Property

Parent Object: GeometrySelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.value
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = geometrySelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


GeometrySelection.warning Property

Parent Object: GeometrySelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/GeometrySelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"geometrySelection_var" is a variable referencing a GeometrySelection object.

# Get the value of the property.
propertyValue = geometrySelection_var.warning
"geometrySelection_var" is a variable referencing a GeometrySelection object.
#include <Cam/GeometrySelections/GeometrySelection.h>

// Get the value of the property.
string propertyValue = geometrySelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


Graph Object

Graph Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The graph that describes the volumetric model. Possible node types: "BoxSDF", "CylinderSDF", "SphereSDF", "TorusSDF", "PlaneSDF", "ReferencedGeometrySDF", "ReferencedCurveLength", "ReferencedCurveCoords", "ReferencedFaceCoords", "GradientVector", "InvertDensity", "PerlinNoiseScalar", "VoronoiNoiseScalar", "Shell", "ConstantScalar", "ConstantColor", "ImageSamplerScalar", "ImageSamplerVector", "ImageSamplerColor", "3DImageSamplerScalar", "SphereCoords", "TorusCoords", "CylinderCoords", "HomogenousTransformCoords", "TransformCoords", "AxisBasedDeformCoords ", "TwistCoords", "ControlPointMapScalarToScalar", "ControlPointMapScalarToColor", "FalloffMapping", "VectorToColor", "CombineScalarsToVector", "CombineScalarsToColor", "SplitVectorToScalars", "SplitColorToScalars", "LengthOfVector", "NormalizeVector", "ExternalColor", "FunctionScalarToScalar", "FunctionVectorToColor", "FunctionVectorToVector", "FunctionVectorToScalar", "BinaryOperatorColor", "BinaryOperatorVector", "BinaryOperatorScalar", "MultiplyColor", "MultiplyVector", "MultiplyScalar"

Methods

Name | Description
addNode | Add a new node to the graph. Node names are unique, attempting to add two nodes with the same name produces an error.
canEvaluateGraph | Check if all the channels in the graph can be evaluated and in a good state.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
connect | Create a connection between nodes.
disconnect | Delete a connection between nodes.
getNode | Get node with the given name.
getNodeInputPinConnector | Get an upstream connection to the node's input pin.
getNodeOutputPinConnectors | Get an array of downstream connections from the node's output pin.
getOutputNode | Get one of the special graph output nodes. Every graph has one or more, the cannot be created or added. The final output pins of the graph nodes should be connected to these to make a useful graph.

Properties

Name | Description
allGraphConnectors | Get all the connectors in the graph.
allNodes | Get all the nodes in the graph, including the output nodes.
allPossibleNodeTypes | Get all the possible node types that can be used as the nodeType parameter for addNode.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

VolumetricModel.getGraph

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


Graph.addNode Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Add a new node to the graph. Node names are unique, attempting to add two nodes with the same name produces an error.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.addNode(name, nodeType)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->addNode(name, nodeType);

Return Value

Type | Description
GraphNode | The new node if it could be added, null otherwise.

Parameters

Name | Type | Description
name | string | Name of the new node.
nodeType | string | The node type string, one of the types listed in the documentation.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


Graph.allGraphConnectors Property

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get all the connectors in the graph.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.

# Get the value of the property.
propertyValue = graph_var.allGraphConnectors
"graph_var" is a variable referencing a Graph object.
#include <Volume/Volumetric/Graph.h>

// Get the value of the property.
std::vector<Ptr<GraphConnector>> propertyValue = graph_var->allGraphConnectors();

Property Value

This is a read only property whose value is an array of type GraphConnector.

Version

Introduced in version May 2025


Graph.allNodes Property

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get all the nodes in the graph, including the output nodes.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.

# Get the value of the property.
propertyValue = graph_var.allNodes
"graph_var" is a variable referencing a Graph object.
#include <Volume/Volumetric/Graph.h>

// Get the value of the property.
std::vector<Ptr<GraphNode>> propertyValue = graph_var->allNodes();

Property Value

This is a read only property whose value is an array of type GraphNode.

Version

Introduced in version May 2025


Graph.allPossibleNodeTypes Property

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get all the possible node types that can be used as the nodeType parameter for addNode.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.

# Get the value of the property.
propertyValue = graph_var.allPossibleNodeTypes
"graph_var" is a variable referencing a Graph object.
#include <Volume/Volumetric/Graph.h>

// Get the value of the property.
std::vector<string> propertyValue = graph_var->allPossibleNodeTypes();

Property Value

This is a read only property whose value is an array of type string.

Version

Introduced in version May 2025


Graph.canEvaluateGraph Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Check if all the channels in the graph can be evaluated and in a good state.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.canEvaluateGraph()
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->canEvaluateGraph();

Return Value

Type | Description
boolean | True if this graph can be evaluated, false otherwise.

Version

Introduced in version July 2025


Graph.classType Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.Graph.classType()
This is a static method.

#include <Volume/Volumetric/Graph.h>

returnValue = adsk::volume::Graph::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


Graph.connect Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Create a connection between nodes.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.connect(outputNode, outputPinIndex, inputNode, inputPinIndex)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->connect(outputNode, outputPinIndex, inputNode, inputPinIndex);

Parameters

Name | Type | Description
outputNode | GraphNode | The node where the connection starts.
outputPinIndex | uinteger | The index of the output pin on the start node.
inputNode | GraphNode | The node where the connection ends.
inputPinIndex | uinteger | The index of the input pin on the end node.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


Graph.disconnect Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Delete a connection between nodes.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.disconnect(outputNode, outputPinIndex, inputNode, inputPinIndex)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->disconnect(outputNode, outputPinIndex, inputNode, inputPinIndex);

Parameters

Name | Type | Description
outputNode | GraphNode | The node where the connection starts.
outputPinIndex | uinteger | The index of the output pin on the start node.
inputNode | GraphNode | The node where the connection ends.
inputPinIndex | uinteger | The index of the input pin on the end node.

Version

Introduced in version May 2025


Graph.getNode Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get node with the given name.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.getNode(name)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->getNode(name);

Return Value

Type | Description
GraphNode | The node if found, null otherwise.

Parameters

Name | Type | Description
name | string | Name to search for.

Version

Introduced in version May 2025


Graph.getNodeInputPinConnector Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get an upstream connection to the node's input pin.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.getNodeInputPinConnector(node, inputPinIndex)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->getNodeInputPinConnector(node, inputPinIndex);

Return Value

Type | Description
GraphConnector | An array of GraphConnector objects, one for each connection to another node.

Parameters

Name | Type | Description
node | GraphNode | The node in question.
inputPinIndex | uinteger | The index of the input pin of the node.

Version

Introduced in version May 2025


Graph.getNodeOutputPinConnectors Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get an array of downstream connections from the node's output pin.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.getNodeOutputPinConnectors(node, outputPinIndex)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->getNodeOutputPinConnectors(node, outputPinIndex);

Return Value

Type | Description
GraphConnector[] | An array of GraphConnector objects, one for each connection to another node.

Parameters

Name | Type | Description
node | GraphNode | The node in question.
outputPinIndex | uinteger | The index of the output pin of the node.

Version

Introduced in version May 2025


Graph.getOutputNode Method

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Get one of the special graph output nodes. Every graph has one or more, the cannot be created or added. The final output pins of the graph nodes should be connected to these to make a useful graph.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.
returnValue = graph_var.getOutputNode(outputNodeType)
"graph_var" is a variable referencing a Graph object.

#include <Volume/Volumetric/Graph.h>

returnValue = graph_var->getOutputNode(outputNodeType);

Return Value

Type | Description
GraphNode | The output node if present in the graph, null otherwise.

Parameters

Name | Type | Description
outputNodeType | GraphOutputNodeTypes | The type of the output graph node. Not every graph has every type; the primary graph has all four ouput node types, the cell graph only has OutputDensity.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


Graph.isValid Property

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.

# Get the value of the property.
propertyValue = graph_var.isValid
"graph_var" is a variable referencing a Graph object.
#include <Volume/Volumetric/Graph.h>

// Get the value of the property.
boolean propertyValue = graph_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


Graph.objectType Property

Parent Object: Graph

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Graph.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"graph_var" is a variable referencing a Graph object.

# Get the value of the property.
propertyValue = graph_var.objectType
"graph_var" is a variable referencing a Graph object.
#include <Volume/Volumetric/Graph.h>

// Get the value of the property.
string propertyValue = graph_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphConnector Object

GraphConnector Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A simple read-only structure that represents a connection beween two nodes' pins in the graph.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sourceGraphNode | The node on the output of which this connector starts.
sourcePinIndex | The output pin index of the start node.
targetGraphNode | The node on the input of which this connector ends.
targetPinIndex | The intput pin index of the end node.

Accessed From

Graph.allGraphConnectors, Graph.getNodeInputPinConnector, Graph.getNodeOutputPinConnectors

Version

Introduced in version May 2025


GraphConnector.classType Method

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.GraphConnector.classType()
This is a static method.

#include <Volume/Volumetric/GraphConnector.h>

returnValue = adsk::volume::GraphConnector::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


GraphConnector.isValid Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.isValid
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
boolean propertyValue = graphConnector_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


GraphConnector.objectType Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.objectType
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
string propertyValue = graphConnector_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphConnector.sourceGraphNode Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

The node on the output of which this connector starts.

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.sourceGraphNode
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
Ptr<GraphNode> propertyValue = graphConnector_var->sourceGraphNode();

Property Value

This is a read only property whose value is a GraphNode.

Version

Introduced in version May 2025


GraphConnector.sourcePinIndex Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

The output pin index of the start node.

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.sourcePinIndex
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
uinteger propertyValue = graphConnector_var->sourcePinIndex();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


GraphConnector.targetGraphNode Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

The node on the input of which this connector ends.

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.targetGraphNode
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
Ptr<GraphNode> propertyValue = graphConnector_var->targetGraphNode();

Property Value

This is a read only property whose value is a GraphNode.

Version

Introduced in version May 2025


GraphConnector.targetPinIndex Property

Parent Object: GraphConnector

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphConnector.h>

Description

The intput pin index of the end node.

Syntax

  • Python
  • C++
"graphConnector_var" is a variable referencing a GraphConnector object.

# Get the value of the property.
propertyValue = graphConnector_var.targetPinIndex
"graphConnector_var" is a variable referencing a GraphConnector object.
#include <Volume/Volumetric/GraphConnector.h>

// Get the value of the property.
uinteger propertyValue = graphConnector_var->targetPinIndex();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


GraphicsPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

The GraphicsPreferences object provides access to the various graphics related preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** This property is no longer supported and has been replaced by the isDynamic property which dynamically changes the effect settings to optimize graphics performance.
canvasEffects | Provides access to the settings that control the canvas effects.
degradedSelectionDisplayStyle Gets and sets the style of display for degraded selections. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
graphicsPreset | Gets and sets if the different graphics settings are using predefined settings to get the best performance, quality, or are custom to allow any settings. Setting this to performance or quality will result in other graphics settings changing to match the defined preset.
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. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isAnimateViewTransitions Gets and sets if the camera should be animated as it transitions from one view to another. If true, there will be an animated transition. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isDynamic Gets and sets if the value defined by minimumFramesPerSecond will be considered when processing graphics. This is the equivalent of the "Dynamic" check box in Preferences dialog. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isHighResolutionCanvasGraphicsEnabled Gets and sets if high resolution canvas graphics is enabled. A value of true indicates it is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isLimitEffectsDuringNavigation | **RETIRED** This property is no longer supported and has been replaced by the isDynamic property which dynamically changes the effect settings to optimize graphics performance.
isSurfaceNormalDisplayDisabled Gets and sets whether the surface normal display is disabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isWoodBumpEnabled Gets and sets whether the bump effect is enabled when supported by the Wood (Solid) and the graphics driver. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
minimumFramesPerSecond Gets and sets the minimum frames per second. The isDynamic property must be true for this to be considered. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
selectionDisplayStyle Gets and sets the style of display to use for selections. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset
transparencyEffects Gets and sets the style of display for transparency effects. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Accessed From

Preferences.graphicsPreferences

Version

Introduced in version August 2014


GraphicsPreferences.autoThrottleEffects Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

This function is retired. See more information in the 'Remarks' section below.

This property is no longer supported and has been replaced by the isDynamic property which dynamically changes the effect settings to optimize graphics performance.

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
Retired in version May 2025


GraphicsPreferences.canvasEffects Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Provides access to the settings that control the canvas effects.

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.canvasEffects
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
Ptr<CanvasEffects> propertyValue = graphicsPreferences_var->canvasEffects();

Property Value

This is a read only property whose value is a CanvasEffects.

Version

Introduced in version May 2025


GraphicsPreferences.classType Method

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets the style of display for degraded selections. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

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.graphicsPreset Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets if the different graphics settings are using predefined settings to get the best performance, quality, or are custom to allow any settings. Setting this to performance or quality will result in other graphics settings changing to match the defined preset.

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.graphicsPreset

# Set the value of the property.
graphicsPreferences_var.graphicsPreset = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
GraphicsPresets propertyValue = graphicsPreferences_var->graphicsPreset();

// Set the value of the property, where value_var is a GraphicsPresets.
bool returnValue = graphicsPreferences_var->graphicsPreset(value_var);

Property Value

This is a read/write property whose value is a GraphicsPresets.

Version

Introduced in version May 2025


GraphicsPreferences.hiddenEdgeDimming Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

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. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

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.isAnimateViewTransitions Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets if the camera should be animated as it transitions from one view to another. If true, there will be an animated transition. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isAnimateViewTransitions

# Set the value of the property.
graphicsPreferences_var.isAnimateViewTransitions = 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->isAnimateViewTransitions();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->isAnimateViewTransitions(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


GraphicsPreferences.isDynamic Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets if the value defined by minimumFramesPerSecond will be considered when processing graphics. This is the equivalent of the "Dynamic" check box in Preferences dialog. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isDynamic

# Set the value of the property.
graphicsPreferences_var.isDynamic = 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->isDynamic();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->isDynamic(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


GraphicsPreferences.isHighResolutionCanvasGraphicsEnabled Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets if high resolution canvas graphics is enabled. A value of true indicates it is enabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isHighResolutionCanvasGraphicsEnabled

# Set the value of the property.
graphicsPreferences_var.isHighResolutionCanvasGraphicsEnabled = 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->isHighResolutionCanvasGraphicsEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->isHighResolutionCanvasGraphicsEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


GraphicsPreferences.isLimitEffectsDuringNavigation Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

This function is retired. See more information in the 'Remarks' section below.

This property is no longer supported and has been replaced by the isDynamic property which dynamically changes the effect settings to optimize graphics performance.

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isLimitEffectsDuringNavigation

# Set the value of the property.
graphicsPreferences_var.isLimitEffectsDuringNavigation = 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->isLimitEffectsDuringNavigation();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->isLimitEffectsDuringNavigation(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022
Retired in version May 2025


GraphicsPreferences.isSurfaceNormalDisplayDisabled Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets whether the surface normal display is disabled. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isSurfaceNormalDisplayDisabled

# Set the value of the property.
graphicsPreferences_var.isSurfaceNormalDisplayDisabled = 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->isSurfaceNormalDisplayDisabled();

// Set the value of the property, where value_var is an integer.
bool returnValue = graphicsPreferences_var->isSurfaceNormalDisplayDisabled(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2022


GraphicsPreferences.isValid Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isWoodBumpEnabled Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets whether the bump effect is enabled when supported by the Wood (Solid) and the graphics driver. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isWoodBumpEnabled

# Set the value of the property.
graphicsPreferences_var.isWoodBumpEnabled = 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->isWoodBumpEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->isWoodBumpEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


GraphicsPreferences.minimumFramesPerSecond Property

Parent Object: GraphicsPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets the minimum frames per second. The isDynamic property must be true for this to be considered. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets the style of display to use for selections. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GraphicsPreferences.h>

Description

Gets and sets the style of display for transparency effects. Setting this property is only valid when the graphics preset is set to "custom" and will fail if it is set to "quality" or "performance". The graphics preset can be determined by using the graphicsPreset property, as shown below.

Application.preferences.graphicsPreferences.graphicsPreset

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


GraphNode Object

GraphNode Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

An individual node within a graph.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 graphNode and all of its connections.
getInputPinCount | How many input pins does this node have.
getInputPinName | The name of this graph node input pin describing its function.
getInputPinType | Get the type of the node input pin.
getOutputPinCount | How many output pins does this node have.
getOutputPinName | The name of this graph node input pin describing its function.
getOutputPinType | Get the type of the node output pin.
hasValidProperties | Check if the graph node properties are valid.
isInputPinOptional | Some input pins can be optional, so they do not need to be connected for the node to work.

Properties

Name | Description
description | A user readable description that explains the function of this node type.
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 this graph node as give on creation. Node names for each graph should be unique.
nodeType | Get the string node type that is was created with.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
properties | Get a collection of all node properties supported by this node.

Accessed From

Graph.addNode, Graph.allNodes, Graph.getNode, Graph.getOutputNode, GraphConnector.sourceGraphNode, GraphConnector.targetGraphNode

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


GraphNode.classType Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.GraphNode.classType()
This is a static method.

#include <Volume/Volumetric/GraphNode.h>

returnValue = adsk::volume::GraphNode::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


GraphNode.deleteMe Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Deletes the graphNode and all of its connections.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.deleteMe()
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->deleteMe();

Return Value

Type | Description
boolean | Returns true in the case where the deletion was successful. All properties and proery objects of this node will become invalid after this call. Output nodes cannot be deleted.

Version

Introduced in version May 2025


GraphNode.description Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

A user readable description that explains the function of this node type.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.description
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
string propertyValue = graphNode_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNode.getInputPinCount Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

How many input pins does this node have.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getInputPinCount()
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getInputPinCount();

Return Value

Type | Description
uinteger | Pin count.

Version

Introduced in version May 2025


GraphNode.getInputPinName Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

The name of this graph node input pin describing its function.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getInputPinName(pinIndex)
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getInputPinName(pinIndex);

Parameters

Name | Type | Description
pinIndex | uinteger | Zero based index of the pin to get. Should be less than the pin count.

Version

Introduced in version May 2025


GraphNode.getInputPinType Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Get the type of the node input pin.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getInputPinType(pinIndex)
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getInputPinType(pinIndex);

Return Value

Type | Description
NodePinTypes | The pin type enum.

Parameters

Name | Type | Description
pinIndex | uinteger | Zero based index of the pin to get. Should be less than the pin count.

Version

Introduced in version May 2025


GraphNode.getOutputPinCount Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

How many output pins does this node have.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getOutputPinCount()
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getOutputPinCount();

Return Value

Type | Description
uinteger | Pin count.

Version

Introduced in version May 2025


GraphNode.getOutputPinName Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

The name of this graph node input pin describing its function.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getOutputPinName(pinIndex)
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getOutputPinName(pinIndex);

Parameters

Name | Type | Description
pinIndex | uinteger | Zero based index of the pin to get. Should be less than the pin count.

Version

Introduced in version May 2025


GraphNode.getOutputPinType Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Get the type of the node output pin.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.getOutputPinType(pinIndex)
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->getOutputPinType(pinIndex);

Return Value

Type | Description
NodePinTypes | The pin type enum.

Parameters

Name | Type | Description
pinIndex | uinteger | Zero based index of the pin to get. Should be less than the pin count.

Version

Introduced in version May 2025


GraphNode.hasValidProperties Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Check if the graph node properties are valid.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.hasValidProperties()
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->hasValidProperties();

Return Value

Type | Description
boolean | True if the node has good inputs for its properties, false otherwise.

Version

Introduced in version July 2025


GraphNode.isInputPinOptional Method

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Some input pins can be optional, so they do not need to be connected for the node to work.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.
returnValue = graphNode_var.isInputPinOptional(pinIndex)
"graphNode_var" is a variable referencing a GraphNode object.

#include <Volume/Volumetric/GraphNode.h>

returnValue = graphNode_var->isInputPinOptional(pinIndex);

Return Value

Type | Description
boolean | True if pin is optional, false if it is required.

Parameters

Name | Type | Description
pinIndex | uinteger | Zero based index of the pin to get. Should be less than the pin count.

Version

Introduced in version May 2025


GraphNode.isValid Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.isValid
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
boolean propertyValue = graphNode_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


GraphNode.name Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

The name of this graph node as give on creation. Node names for each graph should be unique.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.name

# Set the value of the property.
graphNode_var.name = propertyValue
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
string propertyValue = graphNode_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = graphNode_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2025


GraphNode.nodeType Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Get the string node type that is was created with.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.nodeType
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
string propertyValue = graphNode_var->nodeType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNode.objectType Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.objectType
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
string propertyValue = graphNode_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNode.properties Property

Parent Object: GraphNode

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNode.h>

Description

Get a collection of all node properties supported by this node.

Syntax

  • Python
  • C++
"graphNode_var" is a variable referencing a GraphNode object.

# Get the value of the property.
propertyValue = graphNode_var.properties
"graphNode_var" is a variable referencing a GraphNode object.
#include <Volume/Volumetric/GraphNode.h>

// Get the value of the property.
Ptr<GraphNodeProperties> propertyValue = graphNode_var->properties();

Property Value

This is a read only property whose value is a GraphNodeProperties.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


GraphNodeProperties Object

GraphNodeProperties Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A collection of properties of a graph node.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property using an index into the collection.
itemByName | Returns the property with the specified internal name.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

GraphNode.properties

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


GraphNodeProperties.classType Method

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.GraphNodeProperties.classType()
This is a static method.

#include <Volume/Volumetric/GraphNodeProperties.h>

returnValue = adsk::volume::GraphNodeProperties::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


GraphNodeProperties.count Property

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.

# Get the value of the property.
propertyValue = graphNodeProperties_var.count
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.
#include <Volume/Volumetric/GraphNodeProperties.h>

// Get the value of the property.
uinteger propertyValue = graphNodeProperties_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


GraphNodeProperties.isValid Property

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.

# Get the value of the property.
propertyValue = graphNodeProperties_var.isValid
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.
#include <Volume/Volumetric/GraphNodeProperties.h>

// Get the value of the property.
boolean propertyValue = graphNodeProperties_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


GraphNodeProperties.item Method

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

Function that returns the specified property using an index into the collection.

Syntax

  • Python
  • C++
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.
returnValue = graphNodeProperties_var.item(index)
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.

#include <Volume/Volumetric/GraphNodeProperties.h>

returnValue = graphNodeProperties_var->item(index);

Return Value

Type | Description
GraphNodeProperty | 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 May 2025


GraphNodeProperties.itemByName Method

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

Returns the property with the specified internal name.

Syntax

  • Python
  • C++
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.
returnValue = graphNodeProperties_var.itemByName(propertyName)
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.

#include <Volume/Volumetric/GraphNodeProperties.h>

returnValue = graphNodeProperties_var->itemByName(propertyName);

Return Value

Type | Description
GraphNodeProperty | Returns the specified property or null in the case where there is no property with the specified id.

Parameters

Name | Type | Description
propertyName | string | The id of the property.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


GraphNodeProperties.objectType Property

Parent Object: GraphNodeProperties

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperties.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.

# Get the value of the property.
propertyValue = graphNodeProperties_var.objectType
"graphNodeProperties_var" is a variable referencing a GraphNodeProperties object.
#include <Volume/Volumetric/GraphNodeProperties.h>

// Get the value of the property.
string propertyValue = graphNodeProperties_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNodeProperty Object

GraphNodeProperty Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Class for representing a property of a graph node. These can be of many types.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

GraphNodeProperties.item, GraphNodeProperties.itemByName

Derived Classes

BooleanGraphNodeProperty, ColorControlPointMapGraphNodeProperty, ColorGraphNodeProperty, GeometryGraphNodeProperty, IntegerGraphNodeProperty, Matrix3DGraphNodeProperty, ScalarControlPointMapGraphNodeProperty, ScalarGraphNodeProperty, StringGraphNodeProperty, TransformRefGraphNodeProperty, Vector3DGraphNodeProperty

Version

Introduced in version May 2025


GraphNodeProperty.classType Method

Parent Object: GraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.GraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/GraphNodeProperty.h>

returnValue = adsk::volume::GraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


GraphNodeProperty.description Property

Parent Object: GraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.

# Get the value of the property.
propertyValue = graphNodeProperty_var.description
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.
#include <Volume/Volumetric/GraphNodeProperty.h>

// Get the value of the property.
string propertyValue = graphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNodeProperty.isValid Property

Parent Object: GraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.

# Get the value of the property.
propertyValue = graphNodeProperty_var.isValid
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.
#include <Volume/Volumetric/GraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = graphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


GraphNodeProperty.name Property

Parent Object: GraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.

# Get the value of the property.
propertyValue = graphNodeProperty_var.name
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.
#include <Volume/Volumetric/GraphNodeProperty.h>

// Get the value of the property.
string propertyValue = graphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GraphNodeProperty.objectType Property

Parent Object: GraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/GraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.

# Get the value of the property.
propertyValue = graphNodeProperty_var.objectType
"graphNodeProperty_var" is a variable referencing a GraphNodeProperty object.
#include <Volume/Volumetric/GraphNodeProperty.h>

// Get the value of the property.
string propertyValue = graphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


GridPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/GridPreferences.h>

Description

The GridPreferences object provides access to grid related preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.gridPreferences

Version

Introduced in version August 2014


GridPreferences.classType Method

Parent Object: GridPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/GridPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GridPreferences.h>

Description

Gets and sets if the layout grid lock is enabled.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GridPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/GridPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Group Command inputs organize a set of command inputs into a collapsible list within a command dialog

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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 check-box 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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: GroupCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
returnValue = groupCommandInput_var.deleteMe()
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

#include <Core/UserInterface/GroupCommandInput.h>

returnValue = groupCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


GroupCommandInput.id Property

Parent Object: GroupCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets or sets if the enabled check-box is checked or not. This is only valid when the isEnabledCheckBoxDisplayed property is true.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets or sets if this group has a check-box 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/GroupCommandInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Object that represents an existing hole feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setDistanceExtent | Defines the depth of the hole using a specific distance. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setOneSideToExtent | Sets the extent of the hole to be from the sketch plane to the specified "to" face. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPositionAtCenter | Redefines the position of the hole at the center of a circular or elliptical edge of the face. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPositionBySketchPoint | Redefines the position and orientation of the hole using a sketch point. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPositionBySketchPoints | Redefines the position and orientation of the hole using a set of points. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPositionOnEdge | Redefines the position and orientation of the hole to be on the start, end or center of an edge. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setToCounterbore | Calling this method will change the hole to a counterbore hole. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setToCountersink | Calling this method will change the hole to a countersink hole. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

If there is a thread associated with the hole the thread definition controls the diameter of the hole. Even though there is a parameter for the diameter, it's value is ignored when there is a thread.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the direction of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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.entityToken Property

Parent Object: HoleFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.entityToken
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
string propertyValue = holeFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


HoleFeature.errorOrWarningMessage Property

Parent Object: HoleFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the model parameter controlling the hole diameter. The diameter of the hole can be edited through the returned parameter object.

If there is a thread associated with the hole the thread definition controls the diameter of the hole. Even though there is a parameter for the diameter, it's value is ignored when there is a thread.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the current type of hole this feature represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Gets and sets if the hole is in the default direction or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the position of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Defines the extent of the hole to be through-all. The direction can be either positive, negative.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Defines the depth of the hole using a specific distance.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Sets the extent of the hole to be from the sketch plane to the specified "to" face.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Redefines the position of the hole at the center of a circular or elliptical edge of the face.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Redefines the position and orientation of the hole using a sketch point.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Redefines the position and orientation of the hole using a set of points.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Redefines the position and orientation of the hole to be on the start, end or center of an edge.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Calling this method will change the hole to a counterbore hole.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Calling this method will change the hole to a countersink hole.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Calling this method will change the hole to a simple hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Property that returns all of the side faces of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a hole feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Gets or sets if the hole goes in the default direction or is reversed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the extent of the hole to be through-all. The direction can be either positive, negative.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the depth of the hole using a specified distance.

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
holeFeatures.add | Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.
Hole Feature API Sample | Demonstrates creating a new hole feature.
holeFeatures.add with Counterbore | Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.
holeFeatures.add with Countersink | Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Version

Introduced in version August 2014


HoleFeatureInput.setOneSideToExtent Method

Parent Object: HoleFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Sets the extent of the hole to be from the sketch plane to the specified "to" face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the position of the hole at the center of a circular or elliptical edge of the face.

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.

Samples

Name | Description
holeFeatures.add with Countersink | Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionByPlaneAndOffsets Method

Parent Object: HoleFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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. This point is defined in the coordinate system of the native entity used for the planarEntity argument. For example, if the planarEntity argument is a proxy to a BRepFace, the point argument must be in the coordinate system of the component of the native face, not the proxy.
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.

Samples

Name | Description
holeFeatures.add | Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionByPoint Method

Parent Object: HoleFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the position and orientation of the hole using a sketch point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the position and orientation of the hole using a set of sketch points.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

Description

Defines the position and orientation of the hole to be on the start, end or center of an edge.

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.

Samples

Name | Description
holeFeatures.add with Counterbore | Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.

Version

Introduced in version August 2014


HoleFeatureInput.targetBaseFeature Property

Parent Object: HoleFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

Collection that provides access to all of the existing hole features in a component and supports the ability to create new hole features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

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.

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
holeFeatures.add | Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.
Hole Feature API Sample | Demonstrates creating a new hole feature.
holeFeatures.add with Counterbore | Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.
holeFeatures.add with Countersink | Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Version

Introduced in version August 2014


holeFeatures.add

Description

Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.

Code Samples

  • Python
def demo_holeFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the face and edges selected.
    face: adsk.fusion.BRepFace = _ui.selectEntity('Select a face', 'Faces').entity
    edge1: adsk.fusion.BRepEdge = _ui.selectEntity('Select edge 1', 'Edges').entity
    edge2: adsk.fusion.BRepEdge = _ui.selectEntity('Select edge 2', 'Edges').entity

    # Define the needed inputs.
    holeDiam = adsk.core.ValueInput.createByString('20 mm')
    holeDepth = adsk.core.ValueInput.createByReal(5)
    offset1 = adsk.core.ValueInput.createByReal(4)
    offset2 = adsk.core.ValueInput.createByReal(6)

    holeFeatures: adsk.fusion.HoleFeatures = rootComp.features.holeFeatures

    # Define as a plain hole.
    input = holeFeatures.createSimpleInput(holeDiam)
    input.setDistanceExtent(holeDepth)
    facePoint = face.pointOnFace
    input.setPositionByPlaneAndOffsets(face, facePoint, edge1, offset1, edge2, offset2)
    holeFeature = holeFeatures.add(input)


HoleFeatures.classType Method

Parent Object: HoleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

The number of hole features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

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.

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. If tap information is added to the hole using the returned HoleFeatureInput, it will override this diameter, and the hole will be the correct size for the specified tap.
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.

Samples

Name | Description
holeFeatures.add with Counterbore | Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.

Version

Introduced in version August 2014


HoleFeatures.createCountersinkInput Method

Parent Object: HoleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

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.

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. If tap information is added to the hole using the returned HoleFeatureInput, it will override this diameter, and the hole will be the correct size for the specified tap.
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.

Samples

Name | Description
holeFeatures.add with Countersink | Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Version

Introduced in version August 2014


HoleFeatures.createSimpleInput Method

Parent Object: HoleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

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.

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. If tap information is added to the hole using the returned HoleFeatureInput, it will override this diameter, and the hole will be the correct size for the specified tap.

Samples

Name | Description
holeFeatures.add | Demonstrates the holeFeatures.add method using the createSimpleInput method. To use this sample, have a design open with a box. Select the face for the hole and two edges to define the position of the hole.
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatures.isValid Property

Parent Object: HoleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

Function that returns the specified hole feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

Function that returns the specified hole feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HoleFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HolePositionDefinition.h>

Description

The base class for the classes that define how a hole can be positioned.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

HoleFeature.holePositionDefinition

Derived Classes

AtCenterHolePositionDefinition, OnEdgeHolePositionDefinition, PlaneAndOffsetsHolePositionDefinition, PointHolePositionDefinition, SketchPointHolePositionDefinition, SketchPointsHolePositionDefinition

Version

Introduced in version August 2014


HolePositionDefinition.classType Method

Parent Object: HolePositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/HolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

A horizontal constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: HorizontalConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.entityToken
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
string propertyValue = horizontalConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


HorizontalConstraint.isDeletable Property

Parent Object: HorizontalConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Returns the line being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

A horizontal constraint between two points in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: HorizontalPointsConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.entityToken
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
string propertyValue = horizontalPointsConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


HorizontalPointsConstraint.isDeletable Property

Parent Object: HorizontalPointsConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Returns the first point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/HorizontalPointsConstraint.h>

Description

Returns the second point.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

A HTMLEvent is fired when triggered from JavaScript code associated with HTML used in a palette.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.incomingFromHTML, 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

Add a handler to be notified when the event occurs.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

The HTMLEventArgs provides access to the information sent from the JavaScript that's associated with HTML being displayed within a palette.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
browserCommandInput | When the event is fired from a BrowserCommandInput object, this property returns the specific BrowserCommandInput that caused the event to fire. In all other cases this property returns null.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

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.

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.browserCommandInput Property

Parent Object: HTMLEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

When the event is fired from a BrowserCommandInput object, this property returns the specific BrowserCommandInput that caused the event to fire. In all other cases this property returns null.

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.browserCommandInput
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
Ptr<BrowserCommandInput> propertyValue = hTMLEventArgs_var->browserCommandInput();

Property Value

This is a read only property whose value is a BrowserCommandInput.

Version

Introduced in version July 2021


HTMLEventArgs.classType Method

Parent Object: HTMLEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventArgs.h>

Description

Set this property to return data back to the JavaScript that's associated with the HTML.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventHandler.h>

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.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version March 2017


HTMLEventHandler.notify Method

Parent Object: HTMLEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/HTMLEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"hTMLEventHandler_var" is a variable referencing a HTMLEventHandler object.
returnValue = hTMLEventHandler_var.notify(eventArgs)
"hTMLEventHandler_var" is a variable referencing a HTMLEventHandler object.

#include <Core/UserInterface/HTMLEventHandler.h>

returnValue = 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


HttpEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

A HttpEvent represents an event that occurs in reaction to a http request.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

HttpRequest.completed

Version

Introduced in version January 2024


HttpEvent.add Method

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

Add a handler to be notified when the event occurs.

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.
returnValue = httpEvent_var.add(handler)
"httpEvent_var" is a variable referencing a HttpEvent object.

#include <Core/Application/HttpEvent.h>

returnValue = httpEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | HttpEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version January 2024


HttpEvent.classType Method

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HttpEvent.classType()
This is a static method.

#include <Core/Application/HttpEvent.h>

returnValue = adsk::core::HttpEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


HttpEvent.isValid Property

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.

# Get the value of the property.
propertyValue = httpEvent_var.isValid
"httpEvent_var" is a variable referencing a HttpEvent object.
#include <Core/Application/HttpEvent.h>

// Get the value of the property.
boolean propertyValue = httpEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


HttpEvent.name Property

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.

# Get the value of the property.
propertyValue = httpEvent_var.name
"httpEvent_var" is a variable referencing a HttpEvent object.
#include <Core/Application/HttpEvent.h>

// Get the value of the property.
string propertyValue = httpEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


HttpEvent.objectType Property

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.

# Get the value of the property.
propertyValue = httpEvent_var.objectType
"httpEvent_var" is a variable referencing a HttpEvent object.
#include <Core/Application/HttpEvent.h>

// Get the value of the property.
string propertyValue = httpEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


HttpEvent.remove Method

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.
returnValue = httpEvent_var.remove(handler)
"httpEvent_var" is a variable referencing a HttpEvent object.

#include <Core/Application/HttpEvent.h>

returnValue = httpEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | HttpEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2024


HttpEvent.sender Property

Parent Object: HttpEvent
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"httpEvent_var" is a variable referencing a HttpEvent object.

# Get the value of the property.
propertyValue = httpEvent_var.sender
"httpEvent_var" is a variable referencing a HttpEvent object.
#include <Core/Application/HttpEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = httpEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


HttpEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

The HttpEventArgs provides information associated with a http request.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
response | Returns the response from an http request.

Version

Introduced in version January 2024


HttpEventArgs.classType Method

Parent Object: HttpEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HttpEventArgs.classType()
This is a static method.

#include <Core/Application/HttpEventArgs.h>

returnValue = adsk::core::HttpEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


HttpEventArgs.firingEvent Property

Parent Object: HttpEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.

# Get the value of the property.
propertyValue = httpEventArgs_var.firingEvent
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.
#include <Core/Application/HttpEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = httpEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2024


HttpEventArgs.isValid Property

Parent Object: HttpEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.

# Get the value of the property.
propertyValue = httpEventArgs_var.isValid
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.
#include <Core/Application/HttpEventArgs.h>

// Get the value of the property.
boolean propertyValue = httpEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


HttpEventArgs.objectType Property

Parent Object: HttpEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.

# Get the value of the property.
propertyValue = httpEventArgs_var.objectType
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.
#include <Core/Application/HttpEventArgs.h>

// Get the value of the property.
string propertyValue = httpEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


HttpEventArgs.response Property

Parent Object: HttpEventArgs
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventArgs.h>

Description

Returns the response from an http request.

Syntax

  • Python
  • C++
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.

# Get the value of the property.
propertyValue = httpEventArgs_var.response
"httpEventArgs_var" is a variable referencing a HttpEventArgs object.
#include <Core/Application/HttpEventArgs.h>

// Get the value of the property.
Ptr<HttpResponse> propertyValue = httpEventArgs_var->response();

Property Value

This is a read only property whose value is a HttpResponse.

Version

Introduced in version January 2024


HttpEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventHandler.h>

Description

The HttpEventHandler is a client implemented class that can be added as a handler to an HttpEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version January 2024


HttpEventHandler.notify Method

Parent Object: HttpEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"httpEventHandler_var" is a variable referencing a HttpEventHandler object.
returnValue = httpEventHandler_var.notify(eventArgs)
"httpEventHandler_var" is a variable referencing a HttpEventHandler object.

#include <Core/Application/HttpEventHandler.h>

returnValue = httpEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | HttpEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2024


HttpRequest Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Supports the ability to make HTTP requests.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 HttpRequest object.
execute | Execute this request asynchronously. The response will be sent to the completed event.
executeSync | Execute this request synchronously. This will block the thread until the request completes.
getHeader | Gets the value of the specified header and returns the value.
hasHeader | Gets if the request has a header with the given name. This is useful to distinguish between the case where a header is not set and the case where a header is set to an empty string.
headers | Get the request headers.
removeHeader | Removes a header from the request.
setHeader | Sets a header for the request.

Properties

Name | Description
data | Gets and sets the body data to send with this request.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
method | Gets and sets the method to use for the request.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
url | Gets and sets the URL to make the request to.

Events

Name | Description
completed | The completed event fires when the request has completed. This event will fire on successful or failure.

Accessed From

HttpRequest.create, HttpResponse.request

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.classType Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HttpRequest.classType()
This is a static method.

#include <Core/Application/HttpRequest.h>

returnValue = adsk::core::HttpRequest::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


HttpRequest.completed Event

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

The completed event fires when the request has completed. This event will fire on successful or failure.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "httpRequest_var" is a variable referencing a HttpRequest object.
# "httpRequest_completed" is the event handler function.
futil.add_handler(httpRequest_var.completed, httpRequest_completed, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the completed event.
def httpRequest_completed(args: adsk.core.HttpEventArgs):
    # Code to react to the event.
    app.log('In httpRequest_completed event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "httpRequest_var" is a variable referencing a HttpRequest object.
# "MyCompletedHandler" is the name of the class that handles the event.
onCompleted = MyCompletedHandler()
httpRequest_var.completed.add(onCompleted)
handlers.append(onCompleted)

-------- Event handler class definition ---------
# Event handler for the completed event.
class MyCompletedHandler(adsk.core.HttpEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.HttpEventArgs):
        # Code to react to the event.
        app.log('In MyCompletedHandler event handler.')
--------- Required include files. ---------
#include <Core/Application/HttpRequest.h>
#include <Core/Application/HttpEvent.h>
#include <Core/Application/HttpEventHandler.h>
#include <Core/Application/HttpEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the completed event.
class MyCompletedEventHandler : public adsk::core::HttpEventHandler
{
public:
    void notify(const Ptr<HttpEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyCompletedEventHandler event handler.");
    }
} _completed;

--------- Connect the handler to the event. ---------
// "httpRequest_var" is a variable referencing a HttpRequest object.
// Connect the handler function to the event.
Ptr<HttpEvent> completedEvent = httpRequest_var->completed();
if (!completedEvent)
    return;

bool isOk = completedEvent->add(&_completed);
if (!isOk)
    return;

Property Value

This is an event property that returns a HttpEvent.

Version

Introduced in version January 2024


HttpRequest.create Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Creates a new HttpRequest object.

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.HttpRequest.create(url)

# Uses optional arguments.
returnValue = adsk.core.HttpRequest.create(url, method)
This is a static method.

#include <Core/Application/HttpRequest.h>

// Uses no optional arguments.
returnValue = adsk::core::HttpRequest::create(url);

// Uses optional arguments.
returnValue = adsk::core::HttpRequest::create(url, method);

Return Value

Type | Description
HttpRequest | Returns the new HttpRequest object.

Parameters

Name | Type | Description
url | string | The URL to make the request to.
method | HttpMethods | The method to use for the request. The default is GetMethod. This is an optional argument whose default value is HttpMethods.GetMethod.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.data Property

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Gets and sets the body data to send with this request.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

# Get the value of the property.
propertyValue = httpRequest_var.data

# Set the value of the property.
httpRequest_var.data = propertyValue
"httpRequest_var" is a variable referencing a HttpRequest object.
#include <Core/Application/HttpRequest.h>

// Get the value of the property.
string propertyValue = httpRequest_var->data();

// Set the value of the property, where value_var is a string.
bool returnValue = httpRequest_var->data(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.execute Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Execute this request asynchronously. The response will be sent to the completed event.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.execute()
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->execute();

Return Value

Type | Description
boolean | Returns true if the request was successfully started.

Version

Introduced in version January 2024


HttpRequest.executeSync Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Execute this request synchronously. This will block the thread until the request completes.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.executeSync()
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->executeSync();

Return Value

Type | Description
HttpResponse | Returns the response from making this request, or null if an error prevents the request from starting.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.getHeader Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Gets the value of the specified header and returns the value.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.getHeader(name)
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->getHeader(name);

Return Value

Type | Description
string | Returns the value of the header, or empty if the header was not found. You can use the hasHeader method to determine if the header exists before getting it. This is especially useful in the case where the header exists but has an empty string value.

Parameters

Name | Type | Description
name | string | The case insensitive name of the header.

Version

Introduced in version January 2024


HttpRequest.hasHeader Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Gets if the request has a header with the given name. This is useful to distinguish between the case where a header is not set and the case where a header is set to an empty string.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.hasHeader(name)
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->hasHeader(name);

Return Value

Type | Description
boolean | Returns true if a header with this name was set in the response.

Parameters

Name | Type | Description
name | string | The case insensitive name of the header.

Version

Introduced in version January 2024


HttpRequest.headers Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Get the request headers.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

(returnValue, names, values) = httpRequest_var.headers()

#include <Core/Application/HttpRequest.h

// Declare the output arguments.
string[] names;
string[] values;
boolean returnValue = httpRequest_var->headers(names, values);

Return Value

Type | Description
boolean | Returns true on success or false on error.

Parameters

Name | Type | Description
names | string[] | An array of all the header key names.
values | string[] | An array of all the header values.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.isValid Property

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

# Get the value of the property.
propertyValue = httpRequest_var.isValid
"httpRequest_var" is a variable referencing a HttpRequest object.
#include <Core/Application/HttpRequest.h>

// Get the value of the property.
boolean propertyValue = httpRequest_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


HttpRequest.method Property

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Gets and sets the method to use for the request.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

# Get the value of the property.
propertyValue = httpRequest_var.method

# Set the value of the property.
httpRequest_var.method = propertyValue
"httpRequest_var" is a variable referencing a HttpRequest object.
#include <Core/Application/HttpRequest.h>

// Get the value of the property.
HttpMethods propertyValue = httpRequest_var->method();

// Set the value of the property, where value_var is a HttpMethods.
bool returnValue = httpRequest_var->method(value_var);

Property Value

This is a read/write property whose value is a HttpMethods.

Version

Introduced in version January 2024


HttpRequest.objectType Property

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

# Get the value of the property.
propertyValue = httpRequest_var.objectType
"httpRequest_var" is a variable referencing a HttpRequest object.
#include <Core/Application/HttpRequest.h>

// Get the value of the property.
string propertyValue = httpRequest_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


HttpRequest.removeHeader Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Removes a header from the request.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.removeHeader(name)
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->removeHeader(name);

Return Value

Type | Description
boolean | Returns true if the header was found and removed.

Parameters

Name | Type | Description
name | string | The case insensitive name of the header.

Version

Introduced in version January 2024


HttpRequest.setHeader Method

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Sets a header for the request.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.
returnValue = httpRequest_var.setHeader(name, value)
"httpRequest_var" is a variable referencing a HttpRequest object.

#include <Core/Application/HttpRequest.h>

returnValue = httpRequest_var->setHeader(name, value);

Return Value

Type | Description
boolean | Returns true if setting the header succeeds.

Parameters

Name | Type | Description
name | string | The name of the header value.
value | string | The header's value.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpRequest.url Property

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

Gets and sets the URL to make the request to.

Syntax

  • Python
  • C++
"httpRequest_var" is a variable referencing a HttpRequest object.

# Get the value of the property.
propertyValue = httpRequest_var.url

# Set the value of the property.
httpRequest_var.url = propertyValue
"httpRequest_var" is a variable referencing a HttpRequest object.
#include <Core/Application/HttpRequest.h>

// Get the value of the property.
string propertyValue = httpRequest_var->url();

// Set the value of the property, where value_var is a string.
bool returnValue = httpRequest_var->url(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


HttpResponse Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

An object that provides the data associated with an HTTP response.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getHeader | Gets the value of a header.
hasHeader | Gets if the response has a header with the given name. This is useful to distinguish between the case where a header is not set and the case where a header is set to an empty string.
headers | Get the response headers.

Properties

Name | Description
data | Gets the response body data.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
request | Gets the request that generated this response.
statusCode | Gets the status code of the response.

Accessed From

HttpEventArgs.response, HttpRequest.executeSync

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpResponse.classType Method

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HttpResponse.classType()
This is a static method.

#include <Core/Application/HttpResponse.h>

returnValue = adsk::core::HttpResponse::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


HttpResponse.data Property

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Gets the response body data.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

# Get the value of the property.
propertyValue = httpResponse_var.data
"httpResponse_var" is a variable referencing a HttpResponse object.
#include <Core/Application/HttpResponse.h>

// Get the value of the property.
string propertyValue = httpResponse_var->data();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


HttpResponse.getHeader Method

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Gets the value of a header.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.
returnValue = httpResponse_var.getHeader(name)
"httpResponse_var" is a variable referencing a HttpResponse object.

#include <Core/Application/HttpResponse.h>

returnValue = httpResponse_var->getHeader(name);

Return Value

Type | Description
string | Returns the value of the header, or empty if the header was not found. You can use the hasHeader method to determine if the header exists before getting it. This is especially useful in the case where the header exists but has an empty string value.

Parameters

Name | Type | Description
name | string | The case insensitive name of the header.

Version

Introduced in version January 2024


HttpResponse.hasHeader Method

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Gets if the response has a header with the given name. This is useful to distinguish between the case where a header is not set and the case where a header is set to an empty string.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.
returnValue = httpResponse_var.hasHeader(name)
"httpResponse_var" is a variable referencing a HttpResponse object.

#include <Core/Application/HttpResponse.h>

returnValue = httpResponse_var->hasHeader(name);

Return Value

Type | Description
boolean | True if a header with this name was set in the response.

Parameters

Name | Type | Description
name | string | The case insensitive name of the header.

Version

Introduced in version January 2024


HttpResponse.headers Method

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Get the response headers.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

(returnValue, names, values) = httpResponse_var.headers()

#include <Core/Application/HttpResponse.h

// Declare the output arguments.
string[] names;
string[] values;
boolean returnValue = httpResponse_var->headers(names, values);

Return Value

Type | Description
boolean | Returns true on success or false on error.

Parameters

Name | Type | Description
names | string[] | An array of all the header key names.
values | string[] | An array of all the header values.

Version

Introduced in version January 2024


HttpResponse.isValid Property

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

# Get the value of the property.
propertyValue = httpResponse_var.isValid
"httpResponse_var" is a variable referencing a HttpResponse object.
#include <Core/Application/HttpResponse.h>

// Get the value of the property.
boolean propertyValue = httpResponse_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


HttpResponse.objectType Property

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

# Get the value of the property.
propertyValue = httpResponse_var.objectType
"httpResponse_var" is a variable referencing a HttpResponse object.
#include <Core/Application/HttpResponse.h>

// Get the value of the property.
string propertyValue = httpResponse_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


HttpResponse.request Property

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Gets the request that generated this response.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

# Get the value of the property.
propertyValue = httpResponse_var.request
"httpResponse_var" is a variable referencing a HttpResponse object.
#include <Core/Application/HttpResponse.h>

// Get the value of the property.
Ptr<HttpRequest> propertyValue = httpResponse_var->request();

Property Value

This is a read only property whose value is a HttpRequest.

Version

Introduced in version January 2024


HttpResponse.statusCode Property

Parent Object: HttpResponse
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpResponse.h>

Description

Gets the status code of the response.

Syntax

  • Python
  • C++
"httpResponse_var" is a variable referencing a HttpResponse object.

# Get the value of the property.
propertyValue = httpResponse_var.statusCode
"httpResponse_var" is a variable referencing a HttpResponse object.
#include <Core/Application/HttpResponse.h>

// Get the value of the property.
integer propertyValue = httpResponse_var->statusCode();

Property Value

This is a read only property whose value is an integer.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version January 2024


IGESExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

Description

Defines that an IGES export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IGESExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

Description

Defines that an IGES import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ImportManager.createIGESImportOptions

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


IGESImportOptions.classType Method

Parent Object: IGESImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/IGESImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Provides an image command input for including an image in a command dialog.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
scaleFactor | Gets and sets the scale of the image. This defaults to 1.0, which is full-scale.
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: ImageCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
returnValue = imageCommandInput_var.deleteMe()
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

#include <Core/UserInterface/ImageCommandInput.h>

returnValue = imageCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


ImageCommandInput.id Property

Parent Object: ImageCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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.scaleFactor Property

Parent Object: ImageCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

Description

Gets and sets the scale of the image. This defaults to 1.0, which is full-scale.

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.scaleFactor

# Set the value of the property.
imageCommandInput_var.scaleFactor = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
double propertyValue = imageCommandInput_var->scaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = imageCommandInput_var->scaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version March 2024


ImageCommandInput.toolClipFilename Property

Parent Object: ImageCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ImageCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

Provides access to functionality to support importing various modeling formats into Fusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 a FusionArchiveImportOptions object that imports a design from a Fusion archive format. The 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 object supports the available options when importing from a Fusion archive format. This method only supports f3d files. For f3z files, you should use the DataFolder.uploadFile method.
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.
createSVGImportOptions | Creates a SVGImportOptions object that is used to import SVG data into a sketch. Creation of the SVGImportOptions object does not perform the import. You must pass this object to the importToTarget or importToTarget2 methods to perform the import and provide the sketch you want to import to as the target.
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 support the DXF2DImportOptions or SVGImportOptions objects. Use ImportToTarget or ImportToTarget2 for those types.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.importManager

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.classType Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version November 2015


ImportManager.createFusionArchiveImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

Creates a FusionArchiveImportOptions object that imports a design from a Fusion archive format. The 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 object supports the available options when importing from a Fusion archive format. This method only supports f3d files. For f3z files, you should use the DataFolder.uploadFile method.

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 archive file to be imported. Only f3d files can be imported. For f3z files, you should use the DataFolder.uploadFile method.

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createIGESImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSATImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSMTImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSTEPImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSVGImportOptions Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

Creates a SVGImportOptions object that is used to import SVG data into a sketch. Creation of the SVGImportOptions object does not perform the import. You must pass this object to the importToTarget or importToTarget2 methods to perform the import and provide the sketch you want to import to as the target.

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createSVGImportOptions(fullFilename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createSVGImportOptions(fullFilename);

Return Value

Type | Description
SVGImportOptions | The created SVGImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
fullFilename | string | The full filename, including the path, of the SVG file.

Version

Introduced in version October 2022


ImportManager.importToNewDocument Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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 support the DXF2DImportOptions or SVGImportOptions objects. Use ImportToTarget or ImportToTarget2 for those types.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.importToTarget Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

Remarks

There is currently a limitation with this method where it cannot be used within any of the Command related events.

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 | For most import types this will be a Component. For SVGImportOptions this is the sketch you want to import the SVG data into.

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.importToTarget2 Method

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

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.

Remarks

There is currently a limitation with this method where it cannot be used within any of the Command related events.

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 | For most import types this will be a Component. For SVGImportOptions this is the sketch you want to import the SVG data into.

Version

Introduced in version September 2017


ImportManager.isValid Property

Parent Object: ImportManager
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

DXF2DImportOptions, FusionArchiveImportOptions, IGESImportOptions, SATImportOptions, SMTImportOptions, STEPImportOptions, SVGImportOptions

Version

Introduced in version September 2015


ImportOptions.classType Method

Parent Object: ImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

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.

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 API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version May 2017


ImportOptions.objectType Property

Parent Object: ImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/ImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


InCanvasRendering Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Provides access to the in-canvas rendering capabilities of Fusion. This uses the active viewport and the user will see the rendering as it takes place.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
saveImage | Saves the image as it currently exists in the active viewport. To get the best quality, this should be called after the renderComplete event has fired.
start | Starts the process of in-canvas rendering. There are two modes when doing in-canvas rendering; advanced and fast. This is specified in the API using the isAdvanced property. When using advanced rendering, you can specify the desired quality and the rendering will stop once that quality has been reached. When using fast rendering, the rendering never stops but continues until you stop it. When using the API, it's generally best to use advanced rendering so you can easily control the final quality and get notified by the renderComplete event when it has finished. When using fast rendering, the renderComplete event is not fired and you have to use some other criteria like the number of iterations complete or the time taken to determine when to stop the rendering process.
stop | Stops the current rendering process.

Properties

Name | Description
elapsedTime | Returns the seconds spent on the current render.
isAdvanced Gets and sets if "Fast" or "Advanced" rendering should be used. If false, "Fast" rendering is used, which uses simplified lighting and materials.

There are two modes when doing in-canvas rendering; advanced and fast. When using advanced rendering, you can specify the desired quality and the rendering will stop once that quality has been reached. When using fast rendering, the rendering never stops but continues until you stop it.

When using the API, it's generally best to use advanced rendering so you can easily control the final quality and get notified by the renderComplete event when it has finished. When using fast rendering, the renderComplete event is not fired, and you have to use some other criteria like the number of iterations complete, or the time taken to determine when to stop the rendering process.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
iterations | Returns the current number of iterations the renderer has completed.
limitResolution | Sets the percentage of the full resolution to render the image. Valid values are between 20 and 100 inclusive. 100 is full resolution (100%).
lockView | Gets and sets if the view should be locked during the in-canvas render. This prohibits the user from interacting with the view, which will cause the rendering to restart.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Events

Name | Description
renderComplete | The RenderEvent event fires when the rendering has reached the quality that was specified when the rendering started. This event is only fired when using advanced rendering (the isAdvanced property is True). To save the finished rendering, use the saveImage method. You can add or remove event handlers from the RenderEvent.

Accessed From

RenderManager.inCanvasRendering

Version

Introduced in version September 2023


InCanvasRendering.classType Method

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.InCanvasRendering.classType()
This is a static method.

#include <Fusion/Render/InCanvasRendering.h>

returnValue = adsk::fusion::InCanvasRendering::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


InCanvasRendering.elapsedTime Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Returns the seconds spent on the current render.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.elapsedTime
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
integer propertyValue = inCanvasRendering_var->elapsedTime();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2023


InCanvasRendering.isAdvanced Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Gets and sets if "Fast" or "Advanced" rendering should be used. If false, "Fast" rendering is used, which uses simplified lighting and materials.

There are two modes when doing in-canvas rendering; advanced and fast. When using advanced rendering, you can specify the desired quality and the rendering will stop once that quality has been reached. When using fast rendering, the rendering never stops but continues until you stop it.

When using the API, it's generally best to use advanced rendering so you can easily control the final quality and get notified by the renderComplete event when it has finished. When using fast rendering, the renderComplete event is not fired, and you have to use some other criteria like the number of iterations complete, or the time taken to determine when to stop the rendering process.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.isAdvanced

# Set the value of the property.
inCanvasRendering_var.isAdvanced = propertyValue
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
boolean propertyValue = inCanvasRendering_var->isAdvanced();

// Set the value of the property, where value_var is a boolean.
bool returnValue = inCanvasRendering_var->isAdvanced(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


InCanvasRendering.isValid Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.isValid
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
boolean propertyValue = inCanvasRendering_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


InCanvasRendering.iterations Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Returns the current number of iterations the renderer has completed.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.iterations
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
integer propertyValue = inCanvasRendering_var->iterations();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2023


InCanvasRendering.limitResolution Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Sets the percentage of the full resolution to render the image. Valid values are between 20 and 100 inclusive. 100 is full resolution (100%).

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.limitResolution

# Set the value of the property.
inCanvasRendering_var.limitResolution = propertyValue
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
double propertyValue = inCanvasRendering_var->limitResolution();

// Set the value of the property, where value_var is a double.
bool returnValue = inCanvasRendering_var->limitResolution(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2023


InCanvasRendering.lockView Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Gets and sets if the view should be locked during the in-canvas render. This prohibits the user from interacting with the view, which will cause the rendering to restart.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.lockView

# Set the value of the property.
inCanvasRendering_var.lockView = propertyValue
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
boolean propertyValue = inCanvasRendering_var->lockView();

// Set the value of the property, where value_var is a boolean.
bool returnValue = inCanvasRendering_var->lockView(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


InCanvasRendering.objectType Property

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

# Get the value of the property.
propertyValue = inCanvasRendering_var.objectType
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
#include <Fusion/Render/InCanvasRendering.h>

// Get the value of the property.
string propertyValue = inCanvasRendering_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


InCanvasRendering.renderComplete Event

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

The RenderEvent event fires when the rendering has reached the quality that was specified when the rendering started. This event is only fired when using advanced rendering (the isAdvanced property is True). To save the finished rendering, use the saveImage method.

You can add or remove event handlers from the RenderEvent.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
# "inCanvasRendering_renderComplete" is the event handler function.
futil.add_handler(inCanvasRendering_var.renderComplete, inCanvasRendering_renderComplete, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the renderComplete event.
def inCanvasRendering_renderComplete(args: adsk.fusion.RenderEventArgs):
    # Code to react to the event.
    app.log('In inCanvasRendering_renderComplete event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
# "MyRenderCompleteHandler" is the name of the class that handles the event.
onRenderComplete = MyRenderCompleteHandler()
inCanvasRendering_var.renderComplete.add(onRenderComplete)
handlers.append(onRenderComplete)

-------- Event handler class definition ---------
# Event handler for the renderComplete event.
class MyRenderCompleteHandler(adsk.fusion.RenderEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.fusion.RenderEventArgs):
        # Code to react to the event.
        app.log('In MyRenderCompleteHandler event handler.')
--------- Required include files. ---------
#include <Fusion/Render/InCanvasRendering.h>
#include <Fusion/Render/RenderEvent.h>
#include <Fusion/Render/RenderEventHandler.h>
#include <Fusion/Render/RenderEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the renderComplete event.
class MyRenderCompleteEventHandler : public adsk::fusion::RenderEventHandler
{
public:
    void notify(const Ptr<RenderEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyRenderCompleteEventHandler event handler.");
    }
} _renderComplete;

--------- Connect the handler to the event. ---------
// "inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
// Connect the handler function to the event.
Ptr<RenderEvent> renderCompleteEvent = inCanvasRendering_var->renderComplete();
if (!renderCompleteEvent)
    return;

bool isOk = renderCompleteEvent->add(&_renderComplete);
if (!isOk)
    return;

Property Value

This is an event property that returns a RenderEvent.

Version

Introduced in version September 2023


InCanvasRendering.saveImage Method

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Saves the image as it currently exists in the active viewport. To get the best quality, this should be called after the renderComplete event has fired.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
returnValue = inCanvasRendering_var.saveImage(filename)
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

#include <Fusion/Render/InCanvasRendering.h>

returnValue = inCanvasRendering_var->saveImage(filename);

Return Value

Type | Description
boolean | Returns true if the save was successful.

Parameters

Name | Type | Description
filename | string | The filename to save the image to. This must be the full path. The file extension can be .png, .jpg, .jpeg, or .tiff and the file will be saved as that type. The size of the image is dependent on the size of the viewport and the current specified aspect ratio.

Version

Introduced in version September 2023


InCanvasRendering.start Method

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Starts the process of in-canvas rendering. There are two modes when doing in-canvas rendering; advanced and fast. This is specified in the API using the isAdvanced property. When using advanced rendering, you can specify the desired quality and the rendering will stop once that quality has been reached. When using fast rendering, the rendering never stops but continues until you stop it.

When using the API, it's generally best to use advanced rendering so you can easily control the final quality and get notified by the renderComplete event when it has finished. When using fast rendering, the renderComplete event is not fired and you have to use some other criteria like the number of iterations complete or the time taken to determine when to stop the rendering process.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
returnValue = inCanvasRendering_var.start(renderQuality)
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

#include <Fusion/Render/InCanvasRendering.h>

returnValue = inCanvasRendering_var->start(renderQuality);

Return Value

Type | Description
boolean | Returns true if the rendering was successfully started.

Parameters

Name | Type | Description
renderQuality | double | Specifies the desired quality of the rendering. The quality is specified using a value between 0 and 1, where 0.75 is the equivalent of "Excellent" and 1.0 is the same as "Final" in the user interface. This is ignored when using fast rendering (the isAdvanced property is False).

Version

Introduced in version September 2023


InCanvasRendering.stop Method

Parent Object: InCanvasRendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/InCanvasRendering.h>

Description

Stops the current rendering process.

Syntax

  • Python
  • C++
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.
returnValue = inCanvasRendering_var.stop()
"inCanvasRendering_var" is a variable referencing an InCanvasRendering object.

#include <Fusion/Render/InCanvasRendering.h>

returnValue = inCanvasRendering_var->stop();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2023


InfiniteLine3D Object

Derived from: Curve3D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
origin | Gets and sets the origin point of the line.

Accessed From

ConstructionAxis.geometry, ConstructionAxisByLineDefinition.axis, InfiniteLine3D.copy, InfiniteLine3D.create, Line3D.asInfiniteLine, Plane.intersectWithPlane, RotaryMachineAxis.rotationAxis, RotaryMachineAxisInput.rotationAxis

Version

Introduced in version August 2014


InfiniteLine3D.classType Method

Parent Object: InfiniteLine3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Creates and returns a copy of this line object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Creates a transient 3D infinite line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Gets and sets the direction of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Gets all of the data defining the infinite line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Intersect this line with a curve to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Intersect this line with a surface to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Compare this line with another to check for collinearity.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Gets and sets the origin point of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Sets all of the data defining the infinite line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/InfiniteLine3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

An event endpoint that supports the connection to client implemented InputChangedEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

Adds an event handler to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

Provides a set of arguments from a firing InputChangedEvent to a InputEventChangedEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


InputChangedEventArgs.classType Method

Parent Object: InputChangedEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

Returns the command input that has just changed.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

Returns the collection of command inputs that are associated with the command this event is being fired for.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/InputChangedEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"inputChangedEventHandler_var" is a variable referencing an InputChangedEventHandler object.
returnValue = inputChangedEventHandler_var.notify(eventArgs)
"inputChangedEventHandler_var" is a variable referencing an InputChangedEventHandler object.

#include <Core/UserInterface/InputChangedEventHandler.h>

returnValue = 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


IntegerGraphNodeProperty Object

IntegerGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is an integer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.classType Method

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.IntegerGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

returnValue = adsk::volume::IntegerGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.description Property

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.

# Get the value of the property.
propertyValue = integerGraphNodeProperty_var.description
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.
#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = integerGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.isValid Property

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.

# Get the value of the property.
propertyValue = integerGraphNodeProperty_var.isValid
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.
#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = integerGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.name Property

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.

# Get the value of the property.
propertyValue = integerGraphNodeProperty_var.name
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.
#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = integerGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.objectType Property

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.

# Get the value of the property.
propertyValue = integerGraphNodeProperty_var.objectType
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.
#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = integerGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


IntegerGraphNodeProperty.value Property

Parent Object: IntegerGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/IntegerGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.

# Get the value of the property.
propertyValue = integerGraphNodeProperty_var.value

# Set the value of the property.
integerGraphNodeProperty_var.value = propertyValue
"integerGraphNodeProperty_var" is a variable referencing an IntegerGraphNodeProperty object.
#include <Volume/Volumetric/IntegerGraphNodeProperty.h>

// Get the value of the property.
integer propertyValue = integerGraphNodeProperty_var->value();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2025


IntegerParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

A parameter value that is an integer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
value | Get or set the value of the parameter.

Version

Introduced in version September 2021


IntegerParameterValue.classType Method

Parent Object: IntegerParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.IntegerParameterValue.classType()
This is a static method.

#include <Cam/Operations/IntegerParameterValue.h>

returnValue = adsk::cam::IntegerParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


IntegerParameterValue.isValid Property

Parent Object: IntegerParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.

# Get the value of the property.
propertyValue = integerParameterValue_var.isValid
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.
#include <Cam/Operations/IntegerParameterValue.h>

// Get the value of the property.
boolean propertyValue = integerParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


IntegerParameterValue.objectType Property

Parent Object: IntegerParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.

# Get the value of the property.
propertyValue = integerParameterValue_var.objectType
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.
#include <Cam/Operations/IntegerParameterValue.h>

// Get the value of the property.
string propertyValue = integerParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


IntegerParameterValue.parent Property

Parent Object: IntegerParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.

# Get the value of the property.
propertyValue = integerParameterValue_var.parent
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.
#include <Cam/Operations/IntegerParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = integerParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


IntegerParameterValue.value Property

Parent Object: IntegerParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/IntegerParameterValue.h>

Description

Get or set the value of the parameter.

Syntax

  • Python
  • C++
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.

# Get the value of the property.
propertyValue = integerParameterValue_var.value

# Set the value of the property.
integerParameterValue_var.value = propertyValue
"integerParameterValue_var" is a variable referencing an IntegerParameterValue object.
#include <Cam/Operations/IntegerParameterValue.h>

// Get the value of the property.
integer propertyValue = integerParameterValue_var->value();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2021


IntegerProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

An integer value property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. This is most commonly used for properties associated with materials and appearances.

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.

This is most commonly used for properties associated with materials and appearances.
hasMultipleValues Gets the boolean flag that indicates if this property has multiple values or not.

This is most commonly used for properties associated with materials and appearances.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
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.

This is most commonly used for properties associated with materials and appearances.

Version

Introduced in version August 2014


IntegerProperty.classType Method

Parent Object: IntegerProperty
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.IntegerProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

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.

This is most commonly used for properties associated with materials and appearances.

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

(returnValue, hasLowLimit, lowLimit, hasHighLimit, highLimit) = integerProperty_var.getLimits()

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

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.

This is most commonly used for properties associated with materials and appearances.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Gets the boolean flag that indicates if this property has multiple values or not.

This is most commonly used for properties associated with materials and appearances.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

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.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/IntegerProperty.h>

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

This is most commonly used for properties associated with materials and appearances.

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/Application/IntegerProperty.h>

// Get the value of the property.
std::vector<integer> propertyValue = integerProperty_var->values();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerProperty_var->values(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version August 2014


IntegerSliderCommandInput Object

Derived from: SliderCommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Provides a command input to get the value of a slider from the user, the value type is integer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: IntegerSliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
returnValue = integerSliderCommandInput_var.deleteMe()
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

#include <Core/UserInterface/IntegerSliderCommandInput.h>

returnValue = integerSliderCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


IntegerSliderCommandInput.expressionOne Property

Parent Object: IntegerSliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the texts of the slider if text has been defined.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets if the command input has two sliders.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Sets the text of the slider. Both the left and the right text should be set.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets and sets the unit type that is used when evaluating the user's input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets the value list of the slider. The list is empty if this command input was not added by value list.

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<integer> propertyValue = integerSliderCommandInput_var->valueList();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version June 2015


IntegerSliderCommandInput.valueOne Property

Parent Object: IntegerSliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

Gets or sets the value associated with the first slider.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSliderCommandInput.h>

Description

If the hasTwoSliders property is true, this returns the value associated with the second slider.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Provides a command input to get the value of a spinner from the user, the value type is integer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: IntegerSpinnerCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
returnValue = integerSpinnerCommandInput_var.deleteMe()
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

returnValue = integerSpinnerCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


IntegerSpinnerCommandInput.id Property

Parent Object: IntegerSpinnerCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the maximum allowed value of the spinner.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the minimum allowed value of the spinner.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/IntegerSpinnerCommandInput.h>

Description

Gets and sets the value associated with this input.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

Description

Used to gather and define the various inputs and settings needed to calculate interference. This object is created using the Design.createInterferenceInput method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.createInterferenceInput, FlatPatternProduct.createInterferenceInput, WorkingModel.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Represents the interference between bodies and/or occurrences in an interference analysis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

InterferenceResults.item

Version

Introduced in version November 2015


InterferenceResult.classType Method

Parent Object: InterferenceResult
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Returns the first entity involved in the interference

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Returns the second entity involved in the interference

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Returns a transient BRepBody that represents the volume of interference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResult.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Transient object used to return the result of an interference analysis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 modeling.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.analyzeInterference, FlatPatternProduct.analyzeInterference, WorkingModel.analyzeInterference

Samples

Name | Description
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


InterferenceResults.classType Method

Parent Object: InterferenceResults
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Returns the number of interference results in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Creates bodies in the model that represent the interference volumes. This is not supported in parametric modeling.

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);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the bodies that were created.

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 on each InterferenceResult object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

Function that returns the specified interference result using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/InterferenceResults.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


IsoCurveAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

Provides access to any Iso Curve analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified IsoCurveAnalysis object using an index into the collection.
itemByName | A method that returns the specified IsoCurveAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of CurvatureCombAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.isoCurveAnalyses

Version

Introduced in version January 2023


IsoCurveAnalyses.classType Method

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.IsoCurveAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/IsoCurveAnalyses.h>

returnValue = adsk::fusion::IsoCurveAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


IsoCurveAnalyses.count Property

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

Returns the number of CurvatureCombAnalysis objects in the collection.

Syntax

  • Python
  • C++
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.

# Get the value of the property.
propertyValue = isoCurveAnalyses_var.count
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.
#include <Fusion/Fusion/IsoCurveAnalyses.h>

// Get the value of the property.
uinteger propertyValue = isoCurveAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


IsoCurveAnalyses.isValid Property

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.

# Get the value of the property.
propertyValue = isoCurveAnalyses_var.isValid
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.
#include <Fusion/Fusion/IsoCurveAnalyses.h>

// Get the value of the property.
boolean propertyValue = isoCurveAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


IsoCurveAnalyses.item Method

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

A method that returns the specified IsoCurveAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.
returnValue = isoCurveAnalyses_var.item(index)
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.

#include <Fusion/Fusion/IsoCurveAnalyses.h>

returnValue = isoCurveAnalyses_var->item(index);

Return Value

Type | Description
IsoCurveAnalysis | 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 2023


IsoCurveAnalyses.itemByName Method

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

A method that returns the specified IsoCurveAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.
returnValue = isoCurveAnalyses_var.itemByName(name)
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.

#include <Fusion/Fusion/IsoCurveAnalyses.h>

returnValue = isoCurveAnalyses_var->itemByName(name);

Return Value

Type | Description
IsoCurveAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the IsoCurveAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


IsoCurveAnalyses.objectType Property

Parent Object: IsoCurveAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.

# Get the value of the property.
propertyValue = isoCurveAnalyses_var.objectType
"isoCurveAnalyses_var" is a variable referencing an IsoCurveAnalyses object.
#include <Fusion/Fusion/IsoCurveAnalyses.h>

// Get the value of the property.
string propertyValue = isoCurveAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


IsoCurveAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

Represents any existing Iso Curve Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

IsoCurveAnalyses.item, IsoCurveAnalyses.itemByName

Version

Introduced in version January 2023


IsoCurveAnalysis.attributes Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.attributes
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = isoCurveAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


IsoCurveAnalysis.classType Method

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.IsoCurveAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/IsoCurveAnalysis.h>

returnValue = adsk::fusion::IsoCurveAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


IsoCurveAnalysis.deleteMe Method

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
returnValue = isoCurveAnalysis_var.deleteMe()
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

#include <Fusion/Fusion/IsoCurveAnalysis.h>

returnValue = isoCurveAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


IsoCurveAnalysis.entityToken Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.entityToken
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
string propertyValue = isoCurveAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


IsoCurveAnalysis.isLightBulbOn Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.isLightBulbOn

# Set the value of the property.
isoCurveAnalysis_var.isLightBulbOn = propertyValue
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
boolean propertyValue = isoCurveAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = isoCurveAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


IsoCurveAnalysis.isValid Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.isValid
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
boolean propertyValue = isoCurveAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


IsoCurveAnalysis.isVisible Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.isVisible
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
boolean propertyValue = isoCurveAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


IsoCurveAnalysis.name Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.name

# Set the value of the property.
isoCurveAnalysis_var.name = propertyValue
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
string propertyValue = isoCurveAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = isoCurveAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


IsoCurveAnalysis.objectType Property

Parent Object: IsoCurveAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/IsoCurveAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.

# Get the value of the property.
propertyValue = isoCurveAnalysis_var.objectType
"isoCurveAnalysis_var" is a variable referencing an IsoCurveAnalysis object.
#include <Fusion/Fusion/IsoCurveAnalysis.h>

// Get the value of the property.
string propertyValue = isoCurveAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


Joint Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

A joint in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsCylindricalJointMotion | Redefines the relationship between the two joint geometries as a cylindrical joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsPinSlotJointMotion | Redefines the relationship between the two joint geometries as a pin-slot joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsPlanarJointMotion | Redefines the relationship between the two joint geometries as a planar joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsRevoluteJointMotion | Redefines the relationship between the two joint geometries as a revolute joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsRigidJointMotion | Redefines the relationship between the two joint geometries as a rigid joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
setAsSliderJointMotion | Redefines the relationship between the two joint geometries as a slider joint. This method will fail in the case where the jointType property returns InferredJointType. To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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.

This property will return null in the case where the jointType property returns InferredJointType
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.
entityToken Returns a token for the Joint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same joint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
geometricRelationships | Preview Returns the set of geometric relationships that were used to infer this joint. This property is only valid when the jointType property returns InferredJointType. Otherwise, it returns null.
geometryOneTransform Returns the position and orientation of the joint geometry associated with the first occurrence. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

This property will return null in the case where the jointType property returns InferredJointType.
geometryOrOriginOne Gets and sets the first JointGeometry or JointOrigin for this joint.

If the JointType is InferredJointType, this property will return null when queried and will fail if it set.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
geometryOrOriginTwo Gets and sets the second JointGeometry or JointOrigin for this joint.

If the JointType is InferredJointType, this property will return null when queried and will fail if it set.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
geometryTwoTransform Returns the position and orientation of the joint geometry associated with the second occurrence. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

This property will return null in the case where the jointType property returns InferredJointType.
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).

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

The value of this property should be ignored in the case where the jointType property returns InferredJointType.
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.

This property will return null in the case where the jointType property returns InferredJointType.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

This property will return null in the case where the jointType property returns InferredJointType.
offsetX Returns the parameter controlling the offset along the primary axis (x axis) of the joint. To edit this value, get the parameter and use one of its properties to edit the value.

This property will return null in the case where the jointType property returns InferredJointType.
offsetY Returns the parameter controlling the offset along the primary axis (y axis) of the joint. To edit this value, get the parameter and use one of its properties to edit the value.

This property will return null in the case where the jointType property returns InferredJointType.
parentComponent | Returns the parent component that owns this joint.
timelineObject | Returns the timeline object associated with this joint.

Accessed From

Component.allJoints, FlatPatternComponent.allJoints, Joint.createForAssemblyContext, Joint.nativeObject, JointList.item, JointList.itemByName, Joints.add, Joints.item, Joints.itemByName

Samples

Name | Description
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

This property will return null in the case where the jointType property returns InferredJointType

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the collection of attributes associated with this joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Deletes this joint.

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.entityToken Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns a token for the Joint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same joint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.entityToken
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
string propertyValue = joint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Joint.errorOrWarningMessage Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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.geometricRelationships Property

Parent Object: Joint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the set of geometric relationships that were used to infer this joint. This property is only valid when the jointType property returns InferredJointType. Otherwise, it returns null.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.geometricRelationships
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<GeometricRelationships> propertyValue = joint_var->geometricRelationships();

Property Value

This is a read only property whose value is a GeometricRelationships.

Version

Introduced in version July 2025


Joint.geometryOneTransform Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the position and orientation of the joint geometry associated with the first occurrence. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

This property will return null in the case where the jointType property returns InferredJointType.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.geometryOneTransform
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = joint_var->geometryOneTransform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version November 2024


Joint.geometryOrOriginOne Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets and sets the first JointGeometry or JointOrigin for this joint.

If the JointType is InferredJointType, this property will return null when queried and will fail if it set.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets and sets the second JointGeometry or JointOrigin for this joint.

If the JointType is InferredJointType, this property will return null when queried and will fail if it set.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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.geometryTwoTransform Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the position and orientation of the joint geometry associated with the second occurrence. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

This property will return null in the case where the jointType property returns InferredJointType.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.geometryTwoTransform
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = joint_var->geometryTwoTransform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version November 2024


Joint.healthState Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the current health state of the joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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).

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

The value of this property should be ignored in the case where the jointType property returns InferredJointType.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets and sets if the joint is locked.

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.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.

Version

Introduced in version April 2019


Joint.isSuppressed Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets and sets if this joint is suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets whether the joint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns a JointMotion object that defines the motion relationship between the two geometries.

This property will return null in the case where the jointType property returns InferredJointType.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Gets and sets the name of the joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

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.

This property will return null in the case where the jointType property returns InferredJointType.

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.offsetX Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the parameter controlling the offset along the primary axis (x axis) of the joint. To edit this value, get the parameter and use one of its properties to edit the value.

This property will return null in the case where the jointType property returns InferredJointType.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.offsetX
"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->offsetX();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


Joint.offsetY Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the parameter controlling the offset along the primary axis (y axis) of the joint. To edit this value, get the parameter and use one of its properties to edit the value.

This property will return null in the case where the jointType property returns InferredJointType.

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.offsetY
"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->offsetY();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


Joint.parentComponent Property

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the parent component that owns this joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a ball joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a cylindrical joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a pin-slot joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a planar joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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 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


Joint.setAsRevoluteJointMotion Method

Parent Object: Joint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a revolute joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a rigid joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Redefines the relationship between the two joint geometries as a slider joint.

This method will fail in the case where the jointType property returns InferredJointType.

To use this method, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joint.h>

Description

Returns the timeline object associated with this joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
createByCylinderOrConeFace | Creates a new transient JointGeometry object based on a cylinder or cone BRepFace object.
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.
createBySphereFace | Creates a new transient JointGeometry object based on a sphere BRepFace object.
createBySplineFace | Creates a new transient JointGeometry object based on a spline BRepFace object.
createByTangentFaceEdge | Creates a new transient JointGeometry object based on a BRepFace object as well as a BRepEdge object which is on the BRepFace.
createByTorusFace | Creates a new transient JointGeometry object based on a torus BRepFace object.
createByTwoEdgeIntersection | Creates a new transient JointGeometry object that is positioned at the intersection of the two input linear BRepEdge objects.

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, JointBetweenTwoFacesGeometry or JointByTwoEdgeIntersectionGeometry.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 Z-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 X-axis of the computed coordinate system.
tangentFaceParamOne | Returns the first tangent face parameter.
tangentFaceParamTwo | Returns the second tangent face parameter.
tangentFaceType | Returns the tangent face type this JointGeometry is using.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint geometry. Conceptually, this is the Y-axis of the computed coordinate system.

Accessed From

AsBuiltJoint.geometry, AsBuiltJointInput.geometry, JointGeometry.createByBetweenTwoPlanes, JointGeometry.createByCurve, JointGeometry.createByCylinderOrConeFace, JointGeometry.createByNonPlanarFace, JointGeometry.createByPlanarFace, JointGeometry.createByPoint, JointGeometry.createByProfile, JointGeometry.createBySphereFace, JointGeometry.createBySplineFace, JointGeometry.createByTangentFaceEdge, JointGeometry.createByTorusFace, JointGeometry.createByTwoEdgeIntersection, JointOrigin.geometry, JointOriginInput.geometry

Samples

Name | Description
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a plane bisecting the two input planes.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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, CenterKeyPoint 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
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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.createByCylinderOrConeFace Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a cylinder or cone BRepFace object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByCylinderOrConeFace(face, angle, height)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByCylinderOrConeFace(face, angle, height);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in the case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The cylindrical or conical BRepFace object.
angle | JointQuadrantAngleTypes | Specifies the angle relative to the parameterization of the input face. The zero, or start angle, is where the v parameter of the cylinder is zero. This can be determined by using the getPointAtParameter method of the SurfaceEvaluator object obtained from the evaluator property of the BRepFace object. The possible values can be StartJointQuadrantAngleType, QuarterJointQuadrantAngleType, MiddleJointQuadrantAngleType or ThirdQuarterJointQuadrantAngleType.
height | JointKeyPointTypes | Specifies the vertical position relative to the bottom of the cylinder at the given angle. The possible values can be StartKeyPoint, MiddleKeyPoint or EndKeyPoint.

Version

Introduced in version May 2025


JointGeometry.createByNonPlanarFace Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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 the 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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.createBySphereFace Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a sphere BRepFace object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createBySphereFace(face, azimuthAngle, polarAngle)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createBySphereFace(face, azimuthAngle, polarAngle);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in the case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The sphere BRepFace object.
azimuthAngle | JointQuadrantAngleTypes | Specifies the azimuth angle relative to the v parameterization of the input face. The zero, or start angle, is where the v parameter of the sphere is zero. This can be determined by using the getPointAtParameter method of the SurfaceEvaluator object obtained from the evaluator property of the BRepFace object. The possible values can be StartJointQuadrantAngleType, QuarterJointQuadrantAngleType, MiddleJointQuadrantAngleType or ThirdQuarterJointQuadrantAngleType.
polarAngle | JointKeyPointTypes | Specifies the polar angle relative to the u parameterization of the input face. The zero, or start angle, is where the u parameter of the sphere is zero. This can be determined by using the getPointAtParameter method of the SurfaceEvaluator object obtained from the evaluator property of the BRepFace object. The possible values can be StartKeyPoint for the north pole, MiddleKeyPoint for points on the equator, or EndKeyPoint for the south pole.

Version

Introduced in version May 2025


JointGeometry.createBySplineFace Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a spline BRepFace object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createBySplineFace(face, paramU, paramV)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createBySplineFace(face, paramU, paramV);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in the case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The spline BRepFace object.
paramU | JointKeyPointTypes | Specifies the u parameter of the input spline face where the joint keypoint will be located. The possible values can be StartKeyPoint, MiddleKeyPoint or EndKeyPoint.
paramV | JointKeyPointTypes | Specifies the v parameter of the input spline face where the joint keypoint will be located. The possible values can be StartKeyPoint, MiddleKeyPoint or EndKeyPoint.

Version

Introduced in version May 2025


JointGeometry.createByTangentFaceEdge Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a BRepFace object as well as a BRepEdge object which is on the BRepFace.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByTangentFaceEdge(face, edge, edgePointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByTangentFaceEdge(face, edge, edgePointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in the case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The cylindrical, conical, spherical, toroidal or spline BRepFace object.
edge | BRepEdge | A BRepEdge object that is one of the edges on the selected face.
edgePointType | JointTangentFaceEdgePointTypes | Specifies the position along the edge where the joint keypoint will be located. The possible values depend on whether the edge is closed or not. For closed edge, the possible values can be StartJointTangentFaceEdgePointType, QuarterJointTangentFaceEdgePointType, MiddleJointTangentFaceEdgePointType or ThirdQuarterJointTangentFaceEdgePointType. For open edge, the possible values can be StartJointTangentFaceEdgePointType, MiddleJointTangentFaceEdgePointType, or EndJointTangentFaceEdgePointType.

Version

Introduced in version May 2025


JointGeometry.createByTorusFace Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object based on a torus BRepFace object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByTorusFace(face, azimuthAngle, sectionAngle)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByTorusFace(face, azimuthAngle, sectionAngle);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in the case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The torus BRepFace object.
azimuthAngle | JointQuadrantAngleTypes | Specifies the azimuth angle relative to the v parameterization of the input face. The zero, or start angle, is where the v parameter of the sphere is zero. This can be determined by using the getPointAtParameter method of the SurfaceEvaluator object obtained from the evaluator property of the BRepFace object. The possible values can be StartJointQuadrantAngleType, QuarterJointQuadrantAngleType, MiddleJointQuadrantAngleType or ThirdQuarterJointQuadrantAngleType.
sectionAngle | JointQuadrantAngleTypes | Specifies the angle relative to the start point of the section circle at give azimuth angle. The possible values can be StartJointQuadrantAngleType, QuarterJointQuadrantAngleType, MiddleJointQuadrantAngleType or ThirdQuarterJointQuadrantAngleType.

Version

Introduced in version May 2025


JointGeometry.createByTwoEdgeIntersection Method

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Creates a new transient JointGeometry object that is positioned at the intersection of the two input linear BRepEdge objects.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByTwoEdgeIntersection(edgeOne, edgeTwo)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByTwoEdgeIntersection(edgeOne, edgeTwo);

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
edgeOne | BRepEdge | The first linear BRepEdge object.
edgeTwo | BRepEdge | The second linear BRepEdge object. This edge must exist either on the same body as edgeOne or on a body in the same component as edgeOne. edgeOne and edgeTwo must also both lie on the same plane and must intersect, they cannot be parallel.

Version

Introduced in version September 2022


JointGeometry.entityOne Property

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

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, JointBetweenTwoFacesGeometry or JointByTwoEdgeIntersectionGeometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the type of geometry this JointGeometry object represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the keypoint type this JointGeometry is using.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the origin point that's been calculated for this joint geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the first plane for joint geometry that is defined between two planes. Returns null in all other cases.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the second plane for joint geometry that is defined between two planes. Returns null in all other cases.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the direction of the primary axis that's been calculated for this joint geometry. Conceptually, this is the Z-axis of the computed coordinate system.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the direction of the secondary axis that's been calculated for this joint geometry. Conceptually, this is the X-axis of the computed coordinate system.

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.tangentFaceParamOne Property

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the first tangent face parameter.

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.tangentFaceParamOne
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
double propertyValue = jointGeometry_var->tangentFaceParamOne();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


JointGeometry.tangentFaceParamTwo Property

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the second tangent face parameter.

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.tangentFaceParamTwo
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
double propertyValue = jointGeometry_var->tangentFaceParamTwo();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


JointGeometry.tangentFaceType Property

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the tangent face type this JointGeometry is using.

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.tangentFaceType
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
JointTangentFaceTypes propertyValue = jointGeometry_var->tangentFaceType();

Property Value

This is a read only property whose value is a JointTangentFaceTypes.

Version

Introduced in version May 2025


JointGeometry.thirdAxisVector Property

Parent Object: JointGeometry
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointGeometry.h>

Description

Returns the direction of the third axis that's been calculated for this joint geometry. Conceptually, this is the Y-axis of the computed coordinate system.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Gets and sets the first JointGeometry or JointOrigin for this joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Gets and sets the second JointGeometry or JointOrigin for this joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

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).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Returns an object derived from JointMotion that defines how the motion between the two joint geometries is defined.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a ball joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a cylindrical joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a pin-slot joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a planar joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a revolute joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a rigid joint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointInput.h>

Description

Defines the relationship between the two joint geometries as a slider joint.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Used to define limits for the range of motion of a joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Gets and sets whether the maximum joint limit is enabled or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Gets and sets whether the minimum joint limit is enabled or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Gets and sets whether the resting joint value is enabled or not.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointLimits.h>

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.

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
BallJointMotion API Sample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

A list of joints.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Occurrence.joints

Version

Introduced in version January 2016


JointList.classType Method

Parent Object: JointList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

Returns number of joints in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

Function that returns the specified joint using an index into the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

Function that returns the specified joint using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointMotion.h>

Description

The base class for the classes that represent all of the various joint types.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Represents an existing joint origin in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the JointOrigin object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same joint origin.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
geometry Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)
isFlipped Gets and sets if the joint origin direction is flipped or not.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)
isLightBulbOn | Gets and sets if the light bulb of this jointOrigin as displayed in the browser is on or off. A joint origin will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint origin still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joint origins folder light bulb is off.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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. This is conceptually the Z axis as shown by the triad representing the joint origin.
secondaryAxisVector | Returns the direction of the secondary axis that's been calculated for this joint origin. This is conceptually the X axis as shown by the triad representing the joint origin.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint origin. This is conceptually the Y axis as shown by the triad representing the joint origin.
timelineObject | Returns the timeline object associated with this joint origin.
transform Returns the position and orientation of the joint geometry associated with this joint origin. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.
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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)

Accessed From

Component.allJointOrigins, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets the parameter that controls the angle. The value can be changed using the functionality of the returned ModelParameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the collection of attributes associated with this joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Deletes this joint origin.

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.entityToken Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns a token for the JointOrigin object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same joint origin.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.entityToken
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
string propertyValue = jointOrigin_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


JointOrigin.geometry Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets and sets if the joint origin direction is flipped or not.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)

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.isLightBulbOn Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets and sets if the light bulb of this jointOrigin as displayed in the browser is on or off. A joint origin will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint origin still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joint origins folder light bulb is off.

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.isLightBulbOn

# Set the value of the property.
jointOrigin_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointOrigin_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2022


JointOrigin.isValid Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets and sets the name of this joint origin. This is the name seen by the user in the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets the parameter that controls the X offset direction. The value can be changed using the functionality of the returned ModelParameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets the parameter that controls the Y offset direction. The value can be changed using the functionality of the returned ModelParameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Gets the parameter that controls the Z offset direction. The value can be changed using the functionality of the returned ModelParameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the parent component that owns this joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the direction of the primary axis that's been calculated for this joint origin. This is conceptually the Z axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the direction of the secondary axis that's been calculated for this joint origin. This is conceptually the X axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the direction of the third axis that's been calculated for this joint origin. This is conceptually the Y axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the timeline object associated with this joint origin.

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.transform Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

Description

Returns the position and orientation of the joint geometry associated with this joint origin. This is returned as a 3D matrix which provides the origin and the X, Y, and Z axis vectors of the coordinate system.

This property is especially useful in cases where the JointGeometry cannot be obtained. This can happen when the model has been modified in a way where the geometry used to create the joint is no longer available.

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.transform
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = jointOrigin_var->transform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version November 2024


JointOrigin.xAxisEntity Property

Parent Object: JointOrigin
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigin.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: joint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
globalOrientParamOne | Gets and sets the value that defines the first global orient parameter for the joint origin. This defaults to zero if it's not specified. For Cylineder or cone, it represents the angle around the center axis. For Sphere and Torus, it represents the angle around the center axis. For Spline, it represents the U parameter.
globalOrientParamTwo | Gets and sets the value that defines the second global orient parameter for the joint origin. This defaults to zero if it's not specified. For Cylinder or cone, it is not used. For Sphere, it represents the polar angle, which is the angle between the radius line and the equator plane. For Torus, it represents the angle around the center of the section circle. For Spline, it represents the V parameter.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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. This is conceptually the Z axis as shown by the triad representing the joint origin.
secondaryAxisVector | Returns the direction of the secondary axis that's been calculated for this joint origin. This is conceptually the X axis as shown by the triad representing the joint origin.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint origin. This is conceptually the Y axis as shown by the triad representing the 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.

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.globalOrientParamOne Property

Parent Object: JointOriginInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Gets and sets the value that defines the first global orient parameter for the joint origin. This defaults to zero if it's not specified. For Cylineder or cone, it represents the angle around the center axis. For Sphere and Torus, it represents the angle around the center axis. For Spline, it represents the U parameter.

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.globalOrientParamOne

# Set the value of the property.
jointOriginInput_var.globalOrientParamOne = 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->globalOrientParamOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->globalOrientParamOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version May 2025


JointOriginInput.globalOrientParamTwo Property

Parent Object: JointOriginInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Gets and sets the value that defines the second global orient parameter for the joint origin. This defaults to zero if it's not specified. For Cylinder or cone, it is not used. For Sphere, it represents the polar angle, which is the angle between the radius line and the equator plane. For Torus, it represents the angle around the center of the section circle. For Spline, it represents the V parameter.

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.globalOrientParamTwo

# Set the value of the property.
jointOriginInput_var.globalOrientParamTwo = 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->globalOrientParamTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->globalOrientParamTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version May 2025


JointOriginInput.isFlipped Property

Parent Object: JointOriginInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Gets and sets if the joint origin direction is flipped or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Returns the direction of the primary axis that's been calculated for this joint origin. This is conceptually the Z axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Returns the direction of the secondary axis that's been calculated for this joint origin. This is conceptually the X axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

Description

Returns the direction of the third axis that's been calculated for this joint origin. This is conceptually the Y axis as shown by the triad representing the joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

A list of joint origins.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version January 2016


JointOriginList.classType Method

Parent Object: JointOriginList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

Returns number of joint origins in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

Function that returns the specified joint origin using an index into the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

Function that returns the specified joint origin using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOriginList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.jointOrigins, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Create a new joint origin.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Returns number of joint origins in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Function that returns the specified joint origin using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

Function that returns the specified joint origin using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/JointOrigins.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

The collection of joints in this component. This provides access to all existing joints and supports the ability to create new joints.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.joints, FlatPatternComponent.joints

Samples

Name | Description
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Creates a new joint.

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
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Returns number of joints in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

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.

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
BallJointMotion API Sample | 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.
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion
Planar Joint Motion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Function that returns the specified joint using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

Function that returns the specified joint using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Joints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

An event endpoint that supports the connection to client implemented KeyboardEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

Adds an event handler to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

Provides a set of arguments from a firing KeyboardEvent to a KeyboardEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


KeyboardEventArgs.classType Method

Parent Object: KeyboardEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

Gets the keyboard key.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

Gets the set of keyboard modifiers that were active. The value is the Boolean combination of KeyboardModifiers values.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/KeyboardEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"keyboardEventHandler_var" is a variable referencing a KeyboardEventHandler object.
returnValue = keyboardEventHandler_var.notify(eventArgs)
"keyboardEventHandler_var" is a variable referencing a KeyboardEventHandler object.

#include <Core/UserInterface/KeyboardEventHandler.h>

returnValue = 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


KinematicsMachineElement Object

Derived from: MachineElement Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Machine element representing the machine's kinematics tree.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
staticTypeId | Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Properties

Name | Description
elementId | Identifier for this element. Unique within an element 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parts | Get the root parts collection.
typeId | Identifier for this type of machine element.

Version

Introduced in version April 2023


KinematicsMachineElement.classType Method

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.KinematicsMachineElement.classType()
This is a static method.

#include <Cam/Machine/KinematicsMachineElement.h>

returnValue = adsk::cam::KinematicsMachineElement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


KinematicsMachineElement.elementId Property

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.

# Get the value of the property.
propertyValue = kinematicsMachineElement_var.elementId
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.
#include <Cam/Machine/KinematicsMachineElement.h>

// Get the value of the property.
string propertyValue = kinematicsMachineElement_var->elementId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


KinematicsMachineElement.isValid Property

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.

# Get the value of the property.
propertyValue = kinematicsMachineElement_var.isValid
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.
#include <Cam/Machine/KinematicsMachineElement.h>

// Get the value of the property.
boolean propertyValue = kinematicsMachineElement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


KinematicsMachineElement.objectType Property

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.

# Get the value of the property.
propertyValue = kinematicsMachineElement_var.objectType
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.
#include <Cam/Machine/KinematicsMachineElement.h>

// Get the value of the property.
string propertyValue = kinematicsMachineElement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


KinematicsMachineElement.parts Property

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Get the root parts collection.

Syntax

  • Python
  • C++
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.

# Get the value of the property.
propertyValue = kinematicsMachineElement_var.parts
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.
#include <Cam/Machine/KinematicsMachineElement.h>

// Get the value of the property.
Ptr<MachineParts> propertyValue = kinematicsMachineElement_var->parts();

Property Value

This is a read only property whose value is a MachineParts.

Version

Introduced in version April 2023


KinematicsMachineElement.staticTypeId Method

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.KinematicsMachineElement.staticTypeId()
This is a static method.

#include <Cam/Machine/KinematicsMachineElement.h>

returnValue = adsk::cam::KinematicsMachineElement::staticTypeId();

Return Value

Type | Description
string | Returns identifier of this type.

Version

Introduced in version April 2023


KinematicsMachineElement.typeId Property

Parent Object: KinematicsMachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/KinematicsMachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.

# Get the value of the property.
propertyValue = kinematicsMachineElement_var.typeId
"kinematicsMachineElement_var" is a variable referencing a KinematicsMachineElement object.
#include <Cam/Machine/KinematicsMachineElement.h>

// Get the value of the property.
string propertyValue = kinematicsMachineElement_var->typeId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Line2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Returns a NURBS curve that is geometrically identical to the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Creates and returns a copy of this line object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Creates a transient line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Gets and sets the end point of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Gets all of the data defining the line segment.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Sets all of the data defining the line segment.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Gets and sets the start point of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Creates an equivalent InfiniteLine3D.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Returns a NURBS curve that is geometrically identical to the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Creates and returns a copy of this line object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Creates a transient line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Gets and sets the end point of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Gets all of the data defining the line segment.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Intersect this line with a curve to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Intersect this line with a surface to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Compare this line with another to check for collinearity

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Sets all of the data defining the line segment.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Gets and sets the start point of the line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Line3D.h>

Description

Transforms this curve in 3D space.

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


LinearMachineAxis Object

Derived from: MachineAxis Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Object that represents an axis with linear motion (e.g. X, Y, and Z).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis.
direction | The unit vector that represents the direction along which the axis will move.
hasLimits | Does this axis have a limited range of motion.
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.
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 this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Version

Introduced in version April 2023


LinearMachineAxis.axisType Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

The type of axis.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.axisType
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
MachineAxisTypes propertyValue = linearMachineAxis_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


LinearMachineAxis.classType Method

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.LinearMachineAxis.classType()
This is a static method.

#include <Cam/Machine/LinearMachineAxis.h>

returnValue = adsk::cam::LinearMachineAxis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


LinearMachineAxis.direction Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

The unit vector that represents the direction along which the axis will move.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.direction

# Set the value of the property.
linearMachineAxis_var.direction = propertyValue
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = linearMachineAxis_var->direction();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = linearMachineAxis_var->direction(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version April 2023


LinearMachineAxis.hasLimits Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Does this axis have a limited range of motion.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.hasLimits
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
boolean propertyValue = linearMachineAxis_var->hasLimits();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


LinearMachineAxis.homePosition Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.homePosition

# Set the value of the property.
linearMachineAxis_var.homePosition = propertyValue
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
double propertyValue = linearMachineAxis_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxis_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


LinearMachineAxis.isValid Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.isValid
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
boolean propertyValue = linearMachineAxis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


LinearMachineAxis.name Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

The name of this axis.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.name

# Set the value of the property.
linearMachineAxis_var.name = propertyValue
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
string propertyValue = linearMachineAxis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = linearMachineAxis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxis.objectType Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.objectType
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
string propertyValue = linearMachineAxis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxis.physicalRange Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.physicalRange

# Set the value of the property.
linearMachineAxis_var.physicalRange = propertyValue
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = linearMachineAxis_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = linearMachineAxis_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


LinearMachineAxis.toolChangePosition Property

Parent Object: LinearMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxis.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Syntax

  • Python
  • C++
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.

# Get the value of the property.
propertyValue = linearMachineAxis_var.toolChangePosition

# Set the value of the property.
linearMachineAxis_var.toolChangePosition = propertyValue
"linearMachineAxis_var" is a variable referencing a LinearMachineAxis object.
#include <Cam/Machine/LinearMachineAxis.h>

// Get the value of the property.
double propertyValue = linearMachineAxis_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxis_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


LinearMachineAxisConfiguration Object

Derived from: MachineAxisConfiguration Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

A MachineAxisConfiguration holding settings specific to linear axes. This class currently has no members.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Delete this axis configuration from the controller configuration.

Properties

Name | Description
coordinate | Coordinate to use for post processing.
isReversed | Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxNormalSpeed | Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
maxRapidSpeed | Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
partId | ID of the part in the KinematicsMachineElement that this axis configuration modifies.
type | The type of this axis configuration. Use this to inform a cast to the derived types.

Accessed From

MachineAxisConfigurations.addLinear

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.classType Method

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.LinearMachineAxisConfiguration.classType()
This is a static method.

#include <Cam/Machine/LinearMachineAxisConfiguration.h>

returnValue = adsk::cam::LinearMachineAxisConfiguration::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.coordinate Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Coordinate to use for post processing.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.coordinate

# Set the value of the property.
linearMachineAxisConfiguration_var.coordinate = propertyValue
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisCoordinates propertyValue = linearMachineAxisConfiguration_var->coordinate();

// Set the value of the property, where value_var is a MachineAxisCoordinates.
bool returnValue = linearMachineAxisConfiguration_var->coordinate(value_var);

Property Value

This is a read/write property whose value is a MachineAxisCoordinates.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.deleteMe Method

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Delete this axis configuration from the controller configuration.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
returnValue = linearMachineAxisConfiguration_var.deleteMe()
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

#include <Cam/Machine/LinearMachineAxisConfiguration.h>

returnValue = linearMachineAxisConfiguration_var->deleteMe();

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.isReversed Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.isReversed

# Set the value of the property.
linearMachineAxisConfiguration_var.isReversed = propertyValue
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = linearMachineAxisConfiguration_var->isReversed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = linearMachineAxisConfiguration_var->isReversed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.isValid Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.isValid
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = linearMachineAxisConfiguration_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.maxNormalSpeed Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.maxNormalSpeed

# Set the value of the property.
linearMachineAxisConfiguration_var.maxNormalSpeed = propertyValue
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = linearMachineAxisConfiguration_var->maxNormalSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxisConfiguration_var->maxNormalSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.maxRapidSpeed Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.maxRapidSpeed

# Set the value of the property.
linearMachineAxisConfiguration_var.maxRapidSpeed = propertyValue
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = linearMachineAxisConfiguration_var->maxRapidSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxisConfiguration_var->maxRapidSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.objectType Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.objectType
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = linearMachineAxisConfiguration_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.partId Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

ID of the part in the KinematicsMachineElement that this axis configuration modifies.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.partId
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = linearMachineAxisConfiguration_var->partId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxisConfiguration.type Property

Parent Object: LinearMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisConfiguration.h>

Description

The type of this axis configuration. Use this to inform a cast to the derived types.

Syntax

  • Python
  • C++
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = linearMachineAxisConfiguration_var.type
"linearMachineAxisConfiguration_var" is a variable referencing a LinearMachineAxisConfiguration object.
#include <Cam/Machine/LinearMachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisTypes propertyValue = linearMachineAxisConfiguration_var->type();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


LinearMachineAxisInput Object

Derived from: MachineAxisInput Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Object that defines the properties required to create a new linear machine axis object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.
direction | The unit vector that represents the direction along which the linear axis will move. This vector is in the machine's coordinate system (e.g. the X axis is always (1,0,0)).
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.
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 user facing name of this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Version

Introduced in version April 2023


LinearMachineAxisInput.axisType Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.axisType
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
MachineAxisTypes propertyValue = linearMachineAxisInput_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


LinearMachineAxisInput.classType Method

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.LinearMachineAxisInput.classType()
This is a static method.

#include <Cam/Machine/LinearMachineAxisInput.h>

returnValue = adsk::cam::LinearMachineAxisInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


LinearMachineAxisInput.direction Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

The unit vector that represents the direction along which the linear axis will move. This vector is in the machine's coordinate system (e.g. the X axis is always (1,0,0)).

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.direction

# Set the value of the property.
linearMachineAxisInput_var.direction = propertyValue
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = linearMachineAxisInput_var->direction();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = linearMachineAxisInput_var->direction(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version April 2023


LinearMachineAxisInput.homePosition Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.homePosition

# Set the value of the property.
linearMachineAxisInput_var.homePosition = propertyValue
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
double propertyValue = linearMachineAxisInput_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxisInput_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


LinearMachineAxisInput.isValid Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.isValid
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
boolean propertyValue = linearMachineAxisInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


LinearMachineAxisInput.name Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

The user facing name of this axis.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.name

# Set the value of the property.
linearMachineAxisInput_var.name = propertyValue
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
string propertyValue = linearMachineAxisInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = linearMachineAxisInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxisInput.objectType Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.objectType
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
string propertyValue = linearMachineAxisInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


LinearMachineAxisInput.physicalRange Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.physicalRange

# Set the value of the property.
linearMachineAxisInput_var.physicalRange = propertyValue
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = linearMachineAxisInput_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = linearMachineAxisInput_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


LinearMachineAxisInput.toolChangePosition Property

Parent Object: LinearMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/LinearMachineAxisInput.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.

# Get the value of the property.
propertyValue = linearMachineAxisInput_var.toolChangePosition

# Set the value of the property.
linearMachineAxisInput_var.toolChangePosition = propertyValue
"linearMachineAxisInput_var" is a variable referencing a LinearMachineAxisInput object.
#include <Cam/Machine/LinearMachineAxisInput.h>

// Get the value of the property.
double propertyValue = linearMachineAxisInput_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = linearMachineAxisInput_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


LinearMarkingMenu Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

Description

Represents the linear marking menu which is the vertical menu that's displayed when the user right-clicks within Fusion. This supports customizing the contents of the context menu.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 controls. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MarkingMenuEventArgs.linearMarkingMenu

Version

Introduced in version January 2017


LinearMarkingMenu.classType Method

Parent Object: LinearMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

Description

Completely clears the contents of the context menu. If left in this state, the context menu will not be displayed.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


LinearMarkingMenu.controls Property

Parent Object: LinearMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

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 controls. You can remove and add controls to customize the contents of the context menu.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


LinearMarkingMenu.isValid Property

Parent Object: LinearMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/LinearMarkingMenu.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


LineOnPlanarSurfaceConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

A sketch constraint defining that a line that lies on a planar face or construction plane.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 SketchLine object that is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
planarSurface | Returns the planar BRepFace or ConstructionPlane the line is constrained to lie on.

Accessed From

GeometricConstraints.addLineOnPlanarSurface, LineOnPlanarSurfaceConstraint.createForAssemblyContext, LineOnPlanarSurfaceConstraint.nativeObject

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.assemblyContext Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.assemblyContext
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = lineOnPlanarSurfaceConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.attributes Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.attributes
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = lineOnPlanarSurfaceConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.classType Method

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LineOnPlanarSurfaceConstraint.classType()
This is a static method.

#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

returnValue = adsk::fusion::LineOnPlanarSurfaceConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.createForAssemblyContext Method

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
returnValue = lineOnPlanarSurfaceConstraint_var.createForAssemblyContext(occurrence)
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

returnValue = lineOnPlanarSurfaceConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
LineOnPlanarSurfaceConstraint | 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 2023


LineOnPlanarSurfaceConstraint.deleteMe Method

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
returnValue = lineOnPlanarSurfaceConstraint_var.deleteMe()
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

returnValue = lineOnPlanarSurfaceConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.entityToken Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.entityToken
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = lineOnPlanarSurfaceConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.isDeletable Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Indicates if this constraint is deletable.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.isDeletable
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = lineOnPlanarSurfaceConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.isValid Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.isValid
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = lineOnPlanarSurfaceConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.line Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Returns the SketchLine object that is constrained.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.line
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = lineOnPlanarSurfaceConstraint_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.nativeObject Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.nativeObject
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<LineOnPlanarSurfaceConstraint> propertyValue = lineOnPlanarSurfaceConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a LineOnPlanarSurfaceConstraint.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.objectType Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.objectType
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = lineOnPlanarSurfaceConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.parentSketch Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.parentSketch
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = lineOnPlanarSurfaceConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


LineOnPlanarSurfaceConstraint.planarSurface Property

Parent Object: LineOnPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

Description

Returns the planar BRepFace or ConstructionPlane the line is constrained to lie on.

Syntax

  • Python
  • C++
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineOnPlanarSurfaceConstraint_var.planarSurface
"lineOnPlanarSurfaceConstraint_var" is a variable referencing a LineOnPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineOnPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Base> propertyValue = lineOnPlanarSurfaceConstraint_var->planarSurface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

A sketch constraint defining that a line is parallel to a planar face or construction plane.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 SketchLine object that is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
planarSurface | Returns the planar BRepFace or ConstructionPlane the line is parallel to.

Accessed From

GeometricConstraints.addLineParallelToPlanarSurface, LineParallelToPlanarSurfaceConstraint.createForAssemblyContext, LineParallelToPlanarSurfaceConstraint.nativeObject

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.assemblyContext Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.assemblyContext
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = lineParallelToPlanarSurfaceConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.attributes Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.attributes
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = lineParallelToPlanarSurfaceConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.classType Method

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LineParallelToPlanarSurfaceConstraint.classType()
This is a static method.

#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

returnValue = adsk::fusion::LineParallelToPlanarSurfaceConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.createForAssemblyContext Method

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
returnValue = lineParallelToPlanarSurfaceConstraint_var.createForAssemblyContext(occurrence)
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

returnValue = lineParallelToPlanarSurfaceConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
LineParallelToPlanarSurfaceConstraint | 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 2023


LineParallelToPlanarSurfaceConstraint.deleteMe Method

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
returnValue = lineParallelToPlanarSurfaceConstraint_var.deleteMe()
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

returnValue = lineParallelToPlanarSurfaceConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.entityToken Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.entityToken
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = lineParallelToPlanarSurfaceConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.isDeletable Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Indicates if this constraint is deletable.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.isDeletable
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = lineParallelToPlanarSurfaceConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.isValid Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.isValid
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = lineParallelToPlanarSurfaceConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.line Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Returns the SketchLine object that is constrained.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.line
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = lineParallelToPlanarSurfaceConstraint_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.nativeObject Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.nativeObject
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<LineParallelToPlanarSurfaceConstraint> propertyValue = lineParallelToPlanarSurfaceConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a LineParallelToPlanarSurfaceConstraint.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.objectType Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.objectType
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = lineParallelToPlanarSurfaceConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.parentSketch Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.parentSketch
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = lineParallelToPlanarSurfaceConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


LineParallelToPlanarSurfaceConstraint.planarSurface Property

Parent Object: LineParallelToPlanarSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

Description

Returns the planar BRepFace or ConstructionPlane the line is parallel to.

Syntax

  • Python
  • C++
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.

# Get the value of the property.
propertyValue = lineParallelToPlanarSurfaceConstraint_var.planarSurface
"lineParallelToPlanarSurfaceConstraint_var" is a variable referencing a LineParallelToPlanarSurfaceConstraint object.
#include <Fusion/Sketch/LineParallelToPlanarSurfaceConstraint.h>

// Get the value of the property.
Ptr<Base> propertyValue = lineParallelToPlanarSurfaceConstraint_var->planarSurface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


ListControlDefinition Object

Derived from: ControlDefinition Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


ListControlDefinition.classType Method

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

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.

Version

Introduced in version August 2014


ListControlDefinition.isValid Property

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

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.

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.

Version

Introduced in version August 2014


ListControlDefinition.lastSelected Property

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Gets how this list control will be displayed; as a standard list, a list of check boxes, or a list of radio buttons.

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.

Version

Introduced in version August 2014


ListControlDefinition.listItems Property

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Gets the associated ListControlItems collection through which you can add and modify items in the list.

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.

Version

Introduced in version January 2015


ListControlDefinition.name Property

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

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.

Version

Introduced in version August 2014


ListControlDefinition.objectType Property

Parent Object: ListControlDefinition
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListControlDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Represents a single item in a check box list or a drop-down command input.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. In cases where there is the concept of active item in the list, like with a DropDownCommandInput, this method will fail if the item you're attempting to delete is currently active. You need to make another item active first, and then you can delete the item.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

Version

Introduced in version January 2015


ListItem.classType Method

Parent Object: ListItem
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Deletes this item from the list. In cases where there is the concept of active item in the list, like with a DropDownCommandInput, this method will fail if the item you're attempting to delete is currently active. You need to make another item active first, and then you can delete the item.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Gets the index position within the list of this item.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

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.

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.

Version

Introduced in version January 2015


ListItem.isSeparator Property

Parent Object: ListItem
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Gets if this control is a separator.

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.

Version

Introduced in version June 2015


ListItem.isValid Property

Parent Object: ListItem
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

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.

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.

Version

Introduced in version January 2015


ListItem.objectType Property

Parent Object: ListItem
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItem.h>

Description

Gets the parent CheckBoxListControlDefinition or object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.

Version

Introduced in version January 2015


ListItems.add Method

Parent Object: ListItems
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Adds a new item to the list.

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 folder containing the image files to use for the icon. This is an optional argument but is required in the case of ButtonRowCommandInput objects. It is optional in the case of a DropDownCommandInput whose style is LabeledIconDropDownStyle and for ListControlType whose type is not RadioButtonListType. In other cases it is not used and is ignored. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization. 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Adds a separator to the list. This is not supported for button rows.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Clears all of the items from the list.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Gets the number of items in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

Returns the specified check box list item using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ListItems.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Represent a centerline or a single rail used by a loft feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
edgeCondition Gets and sets the edge condition for this rail. This value is only applicable when a BRepEdge is used as the rail entity. If sketch geometry is used, this value is ignored. The property defaults to G0LoftRailEdgeCondition.

If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entity Gets and sets the entity that defines the centerline or rail. This can be a single sketch entity, a single BRepEdge, a Path, or a Profile.

If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

LoftCenterLineOrRails.addCenterLine, LoftCenterLineOrRails.addRail, LoftCenterLineOrRails.item

Version

Introduced in version August 2016


LoftCenterLineOrRail.classType Method

Parent Object: LoftCenterLineOrRail
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Deletes the centerline or rail.

If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.edgeCondition Property

Parent Object: LoftCenterLineOrRail
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Gets and sets the edge condition for this rail. This value is only applicable when a BRepEdge is used as the rail entity. If sketch geometry is used, this value is ignored. The property defaults to G0LoftRailEdgeCondition.

If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

# Get the value of the property.
propertyValue = loftCenterLineOrRail_var.edgeCondition

# Set the value of the property.
loftCenterLineOrRail_var.edgeCondition = propertyValue
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
#include <Fusion/Features/LoftCenterLineOrRail.h>

// Get the value of the property.
LoftRailEdgeConditions propertyValue = loftCenterLineOrRail_var->edgeCondition();

// Set the value of the property, where value_var is a LoftRailEdgeConditions.
bool returnValue = loftCenterLineOrRail_var->edgeCondition(value_var);

Property Value

This is a read/write property whose value is a LoftRailEdgeConditions.

Version

Introduced in version November 2022


LoftCenterLineOrRail.entity Property

Parent Object: LoftCenterLineOrRail
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Gets and sets the entity that defines the centerline or rail. This can be a single sketch entity, a single BRepEdge, a Path, or a Profile.

If this LoftCenterLineOrRail object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Indicates if this object is a loft centerline (true) or a rail (false).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRail.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Defines a single centerline or one or more rails for a loft feature.

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. If this LoftCenterLineOrRails object is associated with a created feature,
addRail | Add a rail to the loft definition. Multiple rails can be defined, so each call of this method adds a new rail. If this LoftCenterLineOrRails object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

LoftFeature.centerLineOrRails, LoftFeatureInput.centerLineOrRails

Version

Introduced in version August 2016


LoftCenterLineOrRails.addCenterLine Method

Parent Object: LoftCenterLineOrRails
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

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.

If this LoftCenterLineOrRails object is associated with a created feature,

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Add a rail to the loft definition. Multiple rails can be defined, so each call of this method adds a new rail.

If this LoftCenterLineOrRails object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

The number of centerlines or rails in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Indicates if a centerline or rails are currently defined.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

Function that returns the specified LoftCenterLineOrRail using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftCenterLineOrRails.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

Description

Represents a "Direction" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftDirectionEndCondition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftEndCondition.h>

Description

The base class for all loft end conditions.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Object that represents an existing loft feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
endLoftEdgeAlignment | Specifies the end edge alignment option for the loft feature. The default is Free Edges.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isClosed | Specifies if the loft closes back on itself. In other words, the first section is also used as the last section.
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.
isTangentEdgesMerged | Specifies if the loft will keep or merge tangent edges. These are edges between tangent faces in the resulting loft surface. If true, the faces will be merged so the connecting edge no longer exists
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the type of operation performed by the extrusion.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.
startLoftEdgeAlignment | Specifies the start edge alignment option for the loft feature. The default is Free Edges.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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.endLoftEdgeAlignment Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Specifies the end edge alignment option for the loft feature. The default is Free Edges.

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.endLoftEdgeAlignment

# Set the value of the property.
loftFeature_var.endLoftEdgeAlignment = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
LoftEdgeAlignments propertyValue = loftFeature_var->endLoftEdgeAlignment();

// Set the value of the property, where value_var is a LoftEdgeAlignments.
bool returnValue = loftFeature_var->endLoftEdgeAlignment(value_var);

Property Value

This is a read/write property whose value is a LoftEdgeAlignments.

Version

Introduced in version September 2024


LoftFeature.entityToken Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.entityToken
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
string propertyValue = loftFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


LoftFeature.errorOrWarningMessage Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the current health state of the feature.

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.isClosed Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Specifies if the loft closes back on itself. In other words, the first section is also used as the last section.

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isClosed

# Set the value of the property.
loftFeature_var.isClosed = 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->isClosed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeature_var->isClosed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2022


LoftFeature.isParametric Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Indicates if this feature was initially created as a solid or a surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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.isTangentEdgesMerged Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Specifies if the loft will keep or merge tangent edges. These are edges between tangent faces in the resulting loft surface. If true, the faces will be merged so the connecting edge no longer exists

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isTangentEdgesMerged

# Set the value of the property.
loftFeature_var.isTangentEdgesMerged = 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->isTangentEdgesMerged();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeature_var->isTangentEdgesMerged(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2022


LoftFeature.isValid Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the set of sections that the loft passes through.

This property returns null in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Gets and sets the type of operation performed by the extrusion.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Property that returns all of the side faces (i.e. those running through the sections) of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

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.

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.startLoftEdgeAlignment Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Specifies the start edge alignment option for the loft feature. The default is Free Edges.

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.startLoftEdgeAlignment

# Set the value of the property.
loftFeature_var.startLoftEdgeAlignment = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
LoftEdgeAlignments propertyValue = loftFeature_var->startLoftEdgeAlignment();

// Set the value of the property, where value_var is a LoftEdgeAlignments.
bool returnValue = loftFeature_var->startLoftEdgeAlignment(value_var);

Property Value

This is a read/write property whose value is a LoftEdgeAlignments.

Version

Introduced in version September 2024


LoftFeature.timelineObject Property

Parent Object: LoftFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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 LoftFeatures.add method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
endLoftEdgeAlignment | Specifies the end edge alignment option for the loft feature. The default is Free Edges.
isClosed | Specifies if the loft closes back on itself. In other words, the first section is also used as the last section and the connection is smooth. This property defaults to false.
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.
isTangentEdgesMerged | Specifies if the loft will keep or merge tangent edges. These are edges between tangent faces in the resulting loft surface. If true, the faces will be merged so the connecting edge no longer exists
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
startLoftEdgeAlignment | Specifies the start edge alignment option for the loft feature. The default is Free Edges.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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

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.endLoftEdgeAlignment Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Specifies the end edge alignment option for the loft feature. The default is Free Edges.

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.endLoftEdgeAlignment

# Set the value of the property.
loftFeatureInput_var.endLoftEdgeAlignment = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
LoftEdgeAlignments propertyValue = loftFeatureInput_var->endLoftEdgeAlignment();

// Set the value of the property, where value_var is a LoftEdgeAlignments.
bool returnValue = loftFeatureInput_var->endLoftEdgeAlignment(value_var);

Property Value

This is a read/write property whose value is a LoftEdgeAlignments.

Version

Introduced in version September 2024


LoftFeatureInput.isClosed Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Specifies if the loft closes back on itself. In other words, the first section is also used as the last section and the connection is smooth. This property defaults to false.

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.isClosed

# Set the value of the property.
loftFeatureInput_var.isClosed = 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->isClosed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeatureInput_var->isClosed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2022


LoftFeatureInput.isSolid Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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.

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatureInput.isTangentEdgesMerged Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Specifies if the loft will keep or merge tangent edges. These are edges between tangent faces in the resulting loft surface. If true, the faces will be merged so the connecting edge no longer exists

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.isTangentEdgesMerged

# Set the value of the property.
loftFeatureInput_var.isTangentEdgesMerged = 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->isTangentEdgesMerged();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeatureInput_var->isTangentEdgesMerged(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2022


LoftFeatureInput.isValid Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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.

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatureInput.objectType Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Gets and sets the type of operation performed by the loft.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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.

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.startLoftEdgeAlignment Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

Description

Specifies the start edge alignment option for the loft feature. The default is Free Edges.

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.startLoftEdgeAlignment

# Set the value of the property.
loftFeatureInput_var.startLoftEdgeAlignment = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
LoftEdgeAlignments propertyValue = loftFeatureInput_var->startLoftEdgeAlignment();

// Set the value of the property, where value_var is a LoftEdgeAlignments.
bool returnValue = loftFeatureInput_var->startLoftEdgeAlignment(value_var);

Property Value

This is a read/write property whose value is a LoftEdgeAlignments.

Version

Introduced in version September 2024


LoftFeatureInput.targetBaseFeature Property

Parent Object: LoftFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Collection that provides access to all of the existing loft features in a design.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Creates a new loft feature.

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


loftFeatures.add

Description

Demonstrates the loftFeatures.add method.

Code Samples

  • Python
def demo_loftFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    profileOne: adsk.fusion.BRepFaces = _ui.selectEntity('Select a profile or face.', 'Profiles, Faces').entity
    profileTwo: adsk.fusion.BRepFaces = _ui.selectEntity('Select a profile or face', 'Profiles, Faces').entity

    # Define the needed input.
    loftFeatures = rootComp.features.loftFeatures
    input = loftFeatures.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
    loftSections = input.loftSections
    loftSections.add(profileOne)
    loftSections.add(profileTwo)
    input.isSolid = True

    # Create the loft.
    loftFeature = loftFeatures.add(input)


LoftFeatures.classType Method

Parent Object: LoftFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

The number of loft features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

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.

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatures.isValid Property

Parent Object: LoftFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Function that returns the specified loft feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

Function that returns the specified loft feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFreeEndCondition.h>

Description

Represents a "Free" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentLoftSection | Returns the parent loft section.

Version

Introduced in version August 2016


LoftFreeEndCondition.classType Method

Parent Object: LoftFreeEndCondition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFreeEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFreeEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFreeEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftFreeEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointSharpEndCondition.h>

Description

Represents a "Point Sharp" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentLoftSection | Returns the parent loft section.

Version

Introduced in version August 2016


LoftPointSharpEndCondition.classType Method

Parent Object: LoftPointSharpEndCondition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointSharpEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointSharpEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointSharpEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointSharpEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

Description

Represents a "Point Tangent" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftPointTangentEndCondition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

A single loft section.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
reorder | Repositions this section so that it has the new index specified. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setDirectionEndCondition | Sets the end condition to be defined by a direction and weight. This is valid for sections defined with sketch curves. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPointSharpEndCondition | Sets the end condition to be sharp where the section is a point. This is the default condition for a point section. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setPointTangentEndCondition | Set the end condition to a tangent condition in the case where the section is a point. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Deletes this LoftSection.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Repositions this section so that it has the new index specified.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Sets the end condition to be defined by a direction and weight.

This is valid for sections defined with sketch curves.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Sets the end condition to be sharp where the section is a point. This is the default condition for a point section.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

Description

Set the end condition to a tangent condition in the case where the section is a point.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSection.h>

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.

If this LoftSection object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

Description

The set of two or more sections used to define the shape of the loft.

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. If this LoftSections object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

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.

If this LoftSections object is associated with a created feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
loftFeatures.add | Demonstrates the loftFeatures.add method.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftSections.classType Method

Parent Object: LoftSections
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

Description

The number of LoftSections in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSections.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

Description

Represents a "Smooth" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftSmoothEndCondition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

Description

Represents a "Tangent" loft end condition.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

Description

Returns the parent loft section.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/LoftTangentEndCondition.h>

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.

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


Machine Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Object that represents a machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 machine from a "MachineInput" input object
equivalentTo | Checks if the machine is equivalent to this one.

Properties

Name | Description
capabilities | Gets the capabilities of the machine.
description | Gets and sets the description of the machine.
elements | Gets the list of elements that make up this machine.
hasPost | Checks if the machine has a post.
hasSimulationModel | Preview Returns true if the machine has a simulation model attached.
id | Gets the unique identifier of the machine. Can be used for comparing machines within the document.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
model | Gets and sets the model name of the machine.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
postURL | Gets or sets the URL of the post assigned to the machine.
vendor | Gets and sets the vendor name of the machine.

Accessed From

CAM.allMachines, Machine.create, MachineLibrary.childMachines, MachineLibrary.machineAtURL, MachineQuery.execute, NCProgram.machine, PrintSettingQuery.machine, Setup.machine, SetupInput.machine

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


Machine.capabilities Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets the capabilities of the machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.capabilities
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
Ptr<MachineCapabilities> propertyValue = machine_var->capabilities();

Property Value

This is a read only property whose value is a MachineCapabilities.

Version

Introduced in version April 2023


Machine.classType Method

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Machine.classType()
This is a static method.

#include <Cam/Machine/Machine.h>

returnValue = adsk::cam::Machine::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


Machine.create Method

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Creates a machine from a "MachineInput" input object

Remarks

"MachineFromFileInput" and "MachineFromLibraryInput" can be used to create valid input objects.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Machine.create(machineInput)
This is a static method.

#include <Cam/Machine/Machine.h>

returnValue = adsk::cam::Machine::create(machineInput);

Return Value

Type | Description
Machine | Returns the newly created machine in a valid state.

Parameters

Name | Type | Description
machineInput | MachineInput | Input object that is used to hold the details needed for creating a machine.

Version

Introduced in version April 2023


Machine.description Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets and sets the description of the machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.description

# Set the value of the property.
machine_var.description = propertyValue
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
string propertyValue = machine_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = machine_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


Machine.elements Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets the list of elements that make up this machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.elements
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
Ptr<MachineElements> propertyValue = machine_var->elements();

Property Value

This is a read only property whose value is a MachineElements.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version April 2023


Machine.equivalentTo Method

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Checks if the machine is equivalent to this one.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.
returnValue = machine_var.equivalentTo(machine)
"machine_var" is a variable referencing a Machine object.

#include <Cam/Machine/Machine.h>

returnValue = machine_var->equivalentTo(machine);

Return Value

Type | Description
boolean | True if the machines are equivalent

Parameters

Name | Type | Description
machine | Machine | The machine to compare this one to

Version

Introduced in version April 2023


Machine.hasPost Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Checks if the machine has a post.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.hasPost
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
boolean propertyValue = machine_var->hasPost();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Machine.hasSimulationModel Property

Parent Object: Machine

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Returns true if the machine has a simulation model attached.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.hasSimulationModel
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
boolean propertyValue = machine_var->hasSimulationModel();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


Machine.id Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets the unique identifier of the machine. Can be used for comparing machines within the document.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.id
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
string propertyValue = machine_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Machine.isValid Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.isValid
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
boolean propertyValue = machine_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Machine.model Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets and sets the model name of the machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.model

# Set the value of the property.
machine_var.model = propertyValue
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
string propertyValue = machine_var->model();

// Set the value of the property, where value_var is a string.
bool returnValue = machine_var->model(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


Machine.objectType Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.objectType
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
string propertyValue = machine_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Machine.postURL Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets or sets the URL of the post assigned to the machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.postURL

# Set the value of the property.
machine_var.postURL = propertyValue
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
Ptr<URL> propertyValue = machine_var->postURL();

// Set the value of the property, where value_var is a URL.
bool returnValue = machine_var->postURL(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version April 2023


Machine.vendor Property

Parent Object: Machine
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/Machine.h>

Description

Gets and sets the vendor name of the machine.

Syntax

  • Python
  • C++
"machine_var" is a variable referencing a Machine object.

# Get the value of the property.
propertyValue = machine_var.vendor

# Set the value of the property.
machine_var.vendor = propertyValue
"machine_var" is a variable referencing a Machine object.
#include <Cam/Machine/Machine.h>

// Get the value of the property.
string propertyValue = machine_var->vendor();

// Set the value of the property, where value_var is a string.
bool returnValue = machine_var->vendor(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineAvoidDefaultSelection Object

Derived from: MachineAvoidSelectionBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Machine/avoid default selection class. Represents a group of selections that are parameter driven. Provides access to the stored selections.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axialOffset | Axial offset - sets the corresponding axial offset value based on the machine mode
combinedOffset | Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get the value of the input geometry.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
machineMode | Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radialOffset | Radial offset - sets the corresponding radial offset value based on the machine mode
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.axialOffset Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Axial offset - sets the corresponding axial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.axialOffset

# Set the value of the property.
machineAvoidDefaultSelection_var.axialOffset = propertyValue
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDefaultSelection_var->axialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDefaultSelection_var->axialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.classType Method

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAvoidDefaultSelection.classType()
This is a static method.

#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

returnValue = adsk::cam::MachineAvoidDefaultSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.combinedOffset Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.combinedOffset

# Set the value of the property.
machineAvoidDefaultSelection_var.combinedOffset = propertyValue
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDefaultSelection_var->combinedOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDefaultSelection_var->combinedOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.error Property

Parent Object: MachineAvoidDefaultSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.error
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDefaultSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.hasError Property

Parent Object: MachineAvoidDefaultSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.hasError
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDefaultSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.hasWarning Property

Parent Object: MachineAvoidDefaultSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.hasWarning
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDefaultSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.inputGeometry Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Get the value of the input geometry.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.inputGeometry
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = machineAvoidDefaultSelection_var->inputGeometry();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.isValid Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.isValid
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDefaultSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.machineMode Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.machineMode

# Set the value of the property.
machineAvoidDefaultSelection_var.machineMode = propertyValue
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
MachiningMode propertyValue = machineAvoidDefaultSelection_var->machineMode();

// Set the value of the property, where value_var is a MachiningMode.
bool returnValue = machineAvoidDefaultSelection_var->machineMode(value_var);

Property Value

This is a read/write property whose value is a MachiningMode.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.objectType Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.objectType
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDefaultSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.radialOffset Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Radial offset - sets the corresponding radial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.radialOffset

# Set the value of the property.
machineAvoidDefaultSelection_var.radialOffset = propertyValue
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDefaultSelection_var->radialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDefaultSelection_var->radialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.value Property

Parent Object: MachineAvoidDefaultSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.value
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = machineAvoidDefaultSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version September 2024


MachineAvoidDefaultSelection.warning Property

Parent Object: MachineAvoidDefaultSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.

# Get the value of the property.
propertyValue = machineAvoidDefaultSelection_var.warning
"machineAvoidDefaultSelection_var" is a variable referencing a MachineAvoidDefaultSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDefaultSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDefaultSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidDirectSelection Object

Derived from: MachineAvoidSelectionBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Machine/avoid direct selection class. Represents a group of direct selections that the users can make (faces, bodies, components and higher level entities). Provides access to the stored selections.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axialOffset | Axial offset - sets the corresponding axial offset value based on the machine mode
combinedOffset | Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
machineMode | Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radialOffset | Radial offset - sets the corresponding radial offset value based on the machine mode
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

MachineAvoidGroups.createNewMachineAvoidDirectSelectionGroup

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.axialOffset Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Axial offset - sets the corresponding axial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.axialOffset

# Set the value of the property.
machineAvoidDirectSelection_var.axialOffset = propertyValue
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDirectSelection_var->axialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDirectSelection_var->axialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.classType Method

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAvoidDirectSelection.classType()
This is a static method.

#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

returnValue = adsk::cam::MachineAvoidDirectSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.combinedOffset Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.combinedOffset

# Set the value of the property.
machineAvoidDirectSelection_var.combinedOffset = propertyValue
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDirectSelection_var->combinedOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDirectSelection_var->combinedOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.error Property

Parent Object: MachineAvoidDirectSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.error
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDirectSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.hasError Property

Parent Object: MachineAvoidDirectSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.hasError
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDirectSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.hasWarning Property

Parent Object: MachineAvoidDirectSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.hasWarning
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDirectSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.inputGeometry Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Get or set the value of the input geometry.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.inputGeometry

# Set the value of the property.
machineAvoidDirectSelection_var.inputGeometry = propertyValue
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = machineAvoidDirectSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = machineAvoidDirectSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.isValid Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.isValid
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
boolean propertyValue = machineAvoidDirectSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.machineMode Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.machineMode

# Set the value of the property.
machineAvoidDirectSelection_var.machineMode = propertyValue
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
MachiningMode propertyValue = machineAvoidDirectSelection_var->machineMode();

// Set the value of the property, where value_var is a MachiningMode.
bool returnValue = machineAvoidDirectSelection_var->machineMode(value_var);

Property Value

This is a read/write property whose value is a MachiningMode.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.objectType Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.objectType
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDirectSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.radialOffset Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Radial offset - sets the corresponding radial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.radialOffset

# Set the value of the property.
machineAvoidDirectSelection_var.radialOffset = propertyValue
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
double propertyValue = machineAvoidDirectSelection_var->radialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidDirectSelection_var->radialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.value Property

Parent Object: MachineAvoidDirectSelection
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.value
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = machineAvoidDirectSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version September 2024


MachineAvoidDirectSelection.warning Property

Parent Object: MachineAvoidDirectSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.

# Get the value of the property.
propertyValue = machineAvoidDirectSelection_var.warning
"machineAvoidDirectSelection_var" is a variable referencing a MachineAvoidDirectSelection object.
#include <Cam/MachineAvoidSelections/MachineAvoidDirectSelection.h>

// Get the value of the property.
string propertyValue = machineAvoidDirectSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidGroups Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Collection of all the mutually exclusive surface groups to be passed to a toolpath with stock to leave and avoid clearances associated to them. This is a read-only container that gets passed to CadMachineAvoidGroupsParameterValue object. It returns the groups associated with the parent parameter value object, but does not write to it. To apply changes done to the collection and the selections it contains, CadMachineAvoidGroupsParameterValue.applyMachineAvoidGroups() needs to be called.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 entries.
createNewMachineAvoidDirectSelectionGroup | Creates a new machine avoid group and adds it to the end of the collection.
defaultGroup | Function that returns the specified machine/avoid default group selection object using the group type. Default groups contain surfaces that have a specific meaning within the toolpath operation, for example Model, Fixture, Drive etc.
item | Function that returns the specified machine/avoid group selection object using an index into the collection.
remove | Function that removes the specified group object using an index in the collection.
removeByObject | Function that removes the specified group object from the collection.
sync | Function that synchronizes the selections and properties of the default groups from the current operation. This is needed when there are changes made to parameters that drive the default groups (e.g. Setup model or fixture selection changes to be reflected in the MachineAvoidGroups object on the API side). WARNING: This function must not be called before applyMachineAvoidGroups, because temporary group settings and selections will not have been stored in the operation object and will be overwritten.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CadMachineAvoidGroupsParameterValue.getMachineAvoidGroups

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version September 2024


MachineAvoidGroups.classType Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAvoidGroups.classType()
This is a static method.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = adsk::cam::MachineAvoidGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MachineAvoidGroups.clear Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Clears all entries.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.clear()
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->clear();

Version

Introduced in version September 2024


MachineAvoidGroups.count Property

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

# Get the value of the property.
propertyValue = machineAvoidGroups_var.count
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

// Get the value of the property.
uinteger propertyValue = machineAvoidGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2024


MachineAvoidGroups.createNewMachineAvoidDirectSelectionGroup Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Creates a new machine avoid group and adds it to the end of the collection.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.createNewMachineAvoidDirectSelectionGroup()
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->createNewMachineAvoidDirectSelectionGroup();

Return Value

Type | Description
MachineAvoidDirectSelection | Returns newly created MachineAvoidDirectSelection.

Version

Introduced in version September 2024


MachineAvoidGroups.defaultGroup Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Function that returns the specified machine/avoid default group selection object using the group type. Default groups contain surfaces that have a specific meaning within the toolpath operation, for example Model, Fixture, Drive etc.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.defaultGroup(type)
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->defaultGroup(type);

Return Value

Type | Description
MachineAvoidSelectionBase | Returns the specified item or null if there isn't a group of the specified type

Parameters

Name | Type | Description
type | DefaultGroupType | The type of the default group within the collection to return. There can be only one default group of a given type

Version

Introduced in version September 2024


MachineAvoidGroups.isValid Property

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

# Get the value of the property.
propertyValue = machineAvoidGroups_var.isValid
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

// Get the value of the property.
boolean propertyValue = machineAvoidGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidGroups.item Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Function that returns the specified machine/avoid group selection object using an index into the collection.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.item(index)
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->item(index);

Return Value

Type | Description
MachineAvoidSelectionBase | 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 2024


MachineAvoidGroups.objectType Property

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

# Get the value of the property.
propertyValue = machineAvoidGroups_var.objectType
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

// Get the value of the property.
string propertyValue = machineAvoidGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidGroups.remove Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Function that removes the specified group object using an index in the collection.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.remove(index)
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->remove(index);

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to remove. The first item in the collection has an index of 0.

Version

Introduced in version September 2024


MachineAvoidGroups.removeByObject Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Function that removes the specified group object from the collection.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.removeByObject(group)
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->removeByObject(group);

Parameters

Name | Type | Description
group | MachineAvoidSelectionBase |

Version

Introduced in version September 2024


MachineAvoidGroups.sync Method

Parent Object: MachineAvoidGroups
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

Description

Function that synchronizes the selections and properties of the default groups from the current operation. This is needed when there are changes made to parameters that drive the default groups (e.g. Setup model or fixture selection changes to be reflected in the MachineAvoidGroups object on the API side). WARNING: This function must not be called before applyMachineAvoidGroups, because temporary group settings and selections will not have been stored in the operation object and will be overwritten.

Syntax

  • Python
  • C++
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.
returnValue = machineAvoidGroups_var.sync()
"machineAvoidGroups_var" is a variable referencing a MachineAvoidGroups object.

#include <Cam/MachineAvoidSelections/MachineAvoidGroups.h>

returnValue = machineAvoidGroups_var->sync();

Version

Introduced in version September 2024


MachineAvoidSelectionBase Object

Derived from: GeometrySelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Base parent class for all machine/avoid selection classes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axialOffset | Axial offset - sets the corresponding axial offset value based on the machine mode
combinedOffset | Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
machineMode | Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
radialOffset | Radial offset - sets the corresponding radial offset value based on the machine mode
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

MachineAvoidGroups.defaultGroup, MachineAvoidGroups.item

Derived Classes

MachineAvoidDefaultSelection, MachineAvoidDirectSelection

Version

Introduced in version September 2024


MachineAvoidSelectionBase.axialOffset Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Axial offset - sets the corresponding axial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.axialOffset

# Set the value of the property.
machineAvoidSelectionBase_var.axialOffset = propertyValue
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
double propertyValue = machineAvoidSelectionBase_var->axialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidSelectionBase_var->axialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.classType Method

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAvoidSelectionBase.classType()
This is a static method.

#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

returnValue = adsk::cam::MachineAvoidSelectionBase::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.combinedOffset Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Combined offset - clearance and stock to leave based on the machine mode This only applies to strategies that use a single offset value (Advanced Swarf, Multi-Axis Clearing, Multi-Axis Finishing, Deburr and Geodesic)

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.combinedOffset

# Set the value of the property.
machineAvoidSelectionBase_var.combinedOffset = propertyValue
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
double propertyValue = machineAvoidSelectionBase_var->combinedOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidSelectionBase_var->combinedOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.error Property

Parent Object: MachineAvoidSelectionBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.error
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
string propertyValue = machineAvoidSelectionBase_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.hasError Property

Parent Object: MachineAvoidSelectionBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.hasError
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
boolean propertyValue = machineAvoidSelectionBase_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.hasWarning Property

Parent Object: MachineAvoidSelectionBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.hasWarning
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
boolean propertyValue = machineAvoidSelectionBase_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.isValid Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.isValid
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
boolean propertyValue = machineAvoidSelectionBase_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.machineMode Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Desired machining mode. The default is Avoid. The current machining mode will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset methods will read/set the stock to leave parameter. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the relative fixture clearance value.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.machineMode

# Set the value of the property.
machineAvoidSelectionBase_var.machineMode = propertyValue
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
MachiningMode propertyValue = machineAvoidSelectionBase_var->machineMode();

// Set the value of the property, where value_var is a MachiningMode.
bool returnValue = machineAvoidSelectionBase_var->machineMode(value_var);

Property Value

This is a read/write property whose value is a MachiningMode.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.objectType Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.objectType
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
string propertyValue = machineAvoidSelectionBase_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.radialOffset Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Radial offset - sets the corresponding radial offset value based on the machine mode

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.radialOffset

# Set the value of the property.
machineAvoidSelectionBase_var.radialOffset = propertyValue
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
double propertyValue = machineAvoidSelectionBase_var->radialOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAvoidSelectionBase_var->radialOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.value Property

Parent Object: MachineAvoidSelectionBase
Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.value
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = machineAvoidSelectionBase_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version September 2024


MachineAvoidSelectionBase.warning Property

Parent Object: MachineAvoidSelectionBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.

# Get the value of the property.
propertyValue = machineAvoidSelectionBase_var.warning
"machineAvoidSelectionBase_var" is a variable referencing a MachineAvoidSelectionBase object.
#include <Cam/MachineAvoidSelections/MachineAvoidSelectionBase.h>

// Get the value of the property.
string propertyValue = machineAvoidSelectionBase_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MachineAxis Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Abstract base class representing a single machine axis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis.
hasLimits | Does this axis have a limited range of motion.
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.
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 this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Accessed From

MachinePart.axis

Derived Classes

LinearMachineAxis, RotaryMachineAxis

Version

Introduced in version April 2023


MachineAxis.axisType Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

The type of axis.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.axisType
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
MachineAxisTypes propertyValue = machineAxis_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


MachineAxis.classType Method

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxis.classType()
This is a static method.

#include <Cam/Machine/MachineAxis.h>

returnValue = adsk::cam::MachineAxis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineAxis.hasLimits Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Does this axis have a limited range of motion.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.hasLimits
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
boolean propertyValue = machineAxis_var->hasLimits();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxis.homePosition Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.homePosition

# Set the value of the property.
machineAxis_var.homePosition = propertyValue
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
double propertyValue = machineAxis_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxis_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineAxis.isValid Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.isValid
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
boolean propertyValue = machineAxis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxis.name Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

The name of this axis.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.name

# Set the value of the property.
machineAxis_var.name = propertyValue
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
string propertyValue = machineAxis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = machineAxis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineAxis.objectType Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.objectType
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
string propertyValue = machineAxis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineAxis.physicalRange Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.physicalRange

# Set the value of the property.
machineAxis_var.physicalRange = propertyValue
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = machineAxis_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = machineAxis_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


MachineAxis.toolChangePosition Property

Parent Object: MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxis.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Syntax

  • Python
  • C++
"machineAxis_var" is a variable referencing a MachineAxis object.

# Get the value of the property.
propertyValue = machineAxis_var.toolChangePosition

# Set the value of the property.
machineAxis_var.toolChangePosition = propertyValue
"machineAxis_var" is a variable referencing a MachineAxis object.
#include <Cam/Machine/MachineAxis.h>

// Get the value of the property.
double propertyValue = machineAxis_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxis_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineAxisConfiguration Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

MachineAxisConfiguration holds controller settings that differ for each axis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Delete this axis configuration from the controller configuration.

Properties

Name | Description
coordinate | Coordinate to use for post processing.
isReversed | Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxNormalSpeed | Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
maxRapidSpeed | Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
partId | ID of the part in the KinematicsMachineElement that this axis configuration modifies.
type | The type of this axis configuration. Use this to inform a cast to the derived types.

Accessed From

MachineAxisConfigurations.item, MachineAxisConfigurations.itemById

Derived Classes

LinearMachineAxisConfiguration, RotaryMachineAxisConfiguration

Version

Introduced in version April 2023


MachineAxisConfiguration.classType Method

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisConfiguration.classType()
This is a static method.

#include <Cam/Machine/MachineAxisConfiguration.h>

returnValue = adsk::cam::MachineAxisConfiguration::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineAxisConfiguration.coordinate Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Coordinate to use for post processing.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.coordinate

# Set the value of the property.
machineAxisConfiguration_var.coordinate = propertyValue
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisCoordinates propertyValue = machineAxisConfiguration_var->coordinate();

// Set the value of the property, where value_var is a MachineAxisCoordinates.
bool returnValue = machineAxisConfiguration_var->coordinate(value_var);

Property Value

This is a read/write property whose value is a MachineAxisCoordinates.

Version

Introduced in version April 2023


MachineAxisConfiguration.deleteMe Method

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Delete this axis configuration from the controller configuration.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
returnValue = machineAxisConfiguration_var.deleteMe()
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

#include <Cam/Machine/MachineAxisConfiguration.h>

returnValue = machineAxisConfiguration_var->deleteMe();

Version

Introduced in version April 2023


MachineAxisConfiguration.isReversed Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.isReversed

# Set the value of the property.
machineAxisConfiguration_var.isReversed = propertyValue
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = machineAxisConfiguration_var->isReversed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineAxisConfiguration_var->isReversed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisConfiguration.isValid Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.isValid
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = machineAxisConfiguration_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisConfiguration.maxNormalSpeed Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.maxNormalSpeed

# Set the value of the property.
machineAxisConfiguration_var.maxNormalSpeed = propertyValue
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = machineAxisConfiguration_var->maxNormalSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxisConfiguration_var->maxNormalSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineAxisConfiguration.maxRapidSpeed Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.maxRapidSpeed

# Set the value of the property.
machineAxisConfiguration_var.maxRapidSpeed = propertyValue
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = machineAxisConfiguration_var->maxRapidSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxisConfiguration_var->maxRapidSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineAxisConfiguration.objectType Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.objectType
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = machineAxisConfiguration_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineAxisConfiguration.partId Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

ID of the part in the KinematicsMachineElement that this axis configuration modifies.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.partId
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = machineAxisConfiguration_var->partId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineAxisConfiguration.type Property

Parent Object: MachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfiguration.h>

Description

The type of this axis configuration. Use this to inform a cast to the derived types.

Syntax

  • Python
  • C++
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.

# Get the value of the property.
propertyValue = machineAxisConfiguration_var.type
"machineAxisConfiguration_var" is a variable referencing a MachineAxisConfiguration object.
#include <Cam/Machine/MachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisTypes propertyValue = machineAxisConfiguration_var->type();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


MachineAxisConfigurations Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Collection of axis configuration objects.

Methods

Name | Description
addLinear | Add a new linear axis configuration for a kinematics part.
addRotary | Add a new rotary axis configuration for a kinematics part.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Get the configuration at index in this collection
itemById | Get the configuration with the given ID

Properties

Name | Description
count | Get the number of configurations 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ControllerConfigurationMachineElement.axisConfigurations

Version

Introduced in version April 2023


MachineAxisConfigurations.addLinear Method

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Add a new linear axis configuration for a kinematics part.

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
returnValue = machineAxisConfigurations_var.addLinear(partId)
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

#include <Cam/Machine/MachineAxisConfigurations.h>

returnValue = machineAxisConfigurations_var->addLinear(partId);

Return Value

Type | Description
LinearMachineAxisConfiguration | Returns the newly created LinearMachineAxisConfiguration or null if creation failed.

Parameters

Name | Type | Description
partId | string | ID used to label this axis configuration and link to a part in the kinematics tree. partID must match a part of type AxisMachinePartType in the kinematics tree and the part must be a linear axis.

Version

Introduced in version April 2023


MachineAxisConfigurations.addRotary Method

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Add a new rotary axis configuration for a kinematics part.

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
returnValue = machineAxisConfigurations_var.addRotary(partId)
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

#include <Cam/Machine/MachineAxisConfigurations.h>

returnValue = machineAxisConfigurations_var->addRotary(partId);

Return Value

Type | Description
RotaryMachineAxisConfiguration | Returns the newly created RotaryMachineAxisConfiguration or null if creation failed.

Parameters

Name | Type | Description
partId | string | ID used to label this axis configuration and link to a part in the kinematics tree. partID must match a part of type AxisMachinePartType in the kinematics tree and the part must be a rotary axis.

Version

Introduced in version April 2023


MachineAxisConfigurations.classType Method

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisConfigurations.classType()
This is a static method.

#include <Cam/Machine/MachineAxisConfigurations.h>

returnValue = adsk::cam::MachineAxisConfigurations::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineAxisConfigurations.count Property

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Get the number of configurations in the collection.

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

# Get the value of the property.
propertyValue = machineAxisConfigurations_var.count
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
#include <Cam/Machine/MachineAxisConfigurations.h>

// Get the value of the property.
uinteger propertyValue = machineAxisConfigurations_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


MachineAxisConfigurations.isValid Property

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

# Get the value of the property.
propertyValue = machineAxisConfigurations_var.isValid
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
#include <Cam/Machine/MachineAxisConfigurations.h>

// Get the value of the property.
boolean propertyValue = machineAxisConfigurations_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisConfigurations.item Method

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Get the configuration at index in this collection

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
returnValue = machineAxisConfigurations_var.item(index)
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

#include <Cam/Machine/MachineAxisConfigurations.h>

returnValue = machineAxisConfigurations_var->item(index);

Return Value

Type | Description
MachineAxisConfiguration | Returns the MachineAxisConfiguration at index.

Parameters

Name | Type | Description
index | integer | Index of configuration.

Version

Introduced in version April 2023


MachineAxisConfigurations.itemById Method

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

Get the configuration with the given ID

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
returnValue = machineAxisConfigurations_var.itemById(id)
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

#include <Cam/Machine/MachineAxisConfigurations.h>

returnValue = machineAxisConfigurations_var->itemById(id);

Return Value

Type | Description
MachineAxisConfiguration | Return the MachineAxisConfiguration with the given ID, or null if the given ID does not match any configuration in the collection.

Parameters

Name | Type | Description
id | string | The ID for the configuration to get.

Version

Introduced in version April 2023


MachineAxisConfigurations.objectType Property

Parent Object: MachineAxisConfigurations
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisConfigurations.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.

# Get the value of the property.
propertyValue = machineAxisConfigurations_var.objectType
"machineAxisConfigurations_var" is a variable referencing a MachineAxisConfigurations object.
#include <Cam/Machine/MachineAxisConfigurations.h>

// Get the value of the property.
string propertyValue = machineAxisConfigurations_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineAxisInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Object that defines the properties required to create a machine axis object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.
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 user facing name of this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Accessed From

MachinePartInput.axisInput, MachinePartInput.createAxisInput

Derived Classes

LinearMachineAxisInput, RotaryMachineAxisInput

Version

Introduced in version April 2023


MachineAxisInput.axisType Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.axisType
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
MachineAxisTypes propertyValue = machineAxisInput_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


MachineAxisInput.classType Method

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisInput.classType()
This is a static method.

#include <Cam/Machine/MachineAxisInput.h>

returnValue = adsk::cam::MachineAxisInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineAxisInput.homePosition Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.homePosition

# Set the value of the property.
machineAxisInput_var.homePosition = propertyValue
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
double propertyValue = machineAxisInput_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxisInput_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineAxisInput.isValid Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.isValid
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
boolean propertyValue = machineAxisInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisInput.name Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

The user facing name of this axis.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.name

# Set the value of the property.
machineAxisInput_var.name = propertyValue
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
string propertyValue = machineAxisInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = machineAxisInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineAxisInput.objectType Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.objectType
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
string propertyValue = machineAxisInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineAxisInput.physicalRange Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.physicalRange

# Set the value of the property.
machineAxisInput_var.physicalRange = propertyValue
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = machineAxisInput_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = machineAxisInput_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


MachineAxisInput.toolChangePosition Property

Parent Object: MachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisInput.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.

# Get the value of the property.
propertyValue = machineAxisInput_var.toolChangePosition

# Set the value of the property.
machineAxisInput_var.toolChangePosition = propertyValue
"machineAxisInput_var" is a variable referencing a MachineAxisInput object.
#include <Cam/Machine/MachineAxisInput.h>

// Get the value of the property.
double propertyValue = machineAxisInput_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = machineAxisInput_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineAxisRange Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Class representing limits of motion for a machine axis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 range object with limited extents. Requires min to be less than or equal to max. Types of the fields depend on where this range is being used. Centimeters are used for distances and radians for angles.
createInfinite | Creates a new unbounded range object.

Properties

Name | Description
isInfinite | Is the range infinite.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
max | Maximum value of range Type depends on where this range is being used. Centimeters are used for distances and radians for angles. Returns infinity if this range is infinite.
min | Minimum value of range. Type depends on where this range is being used. Centimeters are used for distances and radians for angles. Returns -infinity if this range is infinite.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

LinearMachineAxis.physicalRange, LinearMachineAxisInput.physicalRange, MachineAxis.physicalRange, MachineAxisInput.physicalRange, MachineAxisRange.create, MachineAxisRange.createInfinite, RotaryMachineAxis.physicalRange, RotaryMachineAxisConfiguration.wrapAroundAtRange, RotaryMachineAxisInput.physicalRange

Version

Introduced in version April 2023


MachineAxisRange.classType Method

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisRange.classType()
This is a static method.

#include <Cam/Machine/MachineAxisRange.h>

returnValue = adsk::cam::MachineAxisRange::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineAxisRange.create Method

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Creates a new range object with limited extents. Requires min to be less than or equal to max. Types of the fields depend on where this range is being used. Centimeters are used for distances and radians for angles.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisRange.create(min, max)
This is a static method.

#include <Cam/Machine/MachineAxisRange.h>

returnValue = adsk::cam::MachineAxisRange::create(min, max);

Return Value

Type | Description
MachineAxisRange | A new range object. Returns null if validation fails.

Parameters

Name | Type | Description
min | double | New minimum value for range.
max | double | New maximum value for range.

Version

Introduced in version April 2023


MachineAxisRange.createInfinite Method

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Creates a new unbounded range object.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineAxisRange.createInfinite()
This is a static method.

#include <Cam/Machine/MachineAxisRange.h>

returnValue = adsk::cam::MachineAxisRange::createInfinite();

Return Value

Type | Description
MachineAxisRange | A new range object.

Version

Introduced in version April 2023


MachineAxisRange.isInfinite Property

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Is the range infinite.

Syntax

  • Python
  • C++
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.

# Get the value of the property.
propertyValue = machineAxisRange_var.isInfinite
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.
#include <Cam/Machine/MachineAxisRange.h>

// Get the value of the property.
boolean propertyValue = machineAxisRange_var->isInfinite();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisRange.isValid Property

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.

# Get the value of the property.
propertyValue = machineAxisRange_var.isValid
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.
#include <Cam/Machine/MachineAxisRange.h>

// Get the value of the property.
boolean propertyValue = machineAxisRange_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineAxisRange.max Property

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Maximum value of range Type depends on where this range is being used. Centimeters are used for distances and radians for angles. Returns infinity if this range is infinite.

Syntax

  • Python
  • C++
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.

# Get the value of the property.
propertyValue = machineAxisRange_var.max
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.
#include <Cam/Machine/MachineAxisRange.h>

// Get the value of the property.
double propertyValue = machineAxisRange_var->max();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version April 2023


MachineAxisRange.min Property

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

Minimum value of range. Type depends on where this range is being used. Centimeters are used for distances and radians for angles. Returns -infinity if this range is infinite.

Syntax

  • Python
  • C++
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.

# Get the value of the property.
propertyValue = machineAxisRange_var.min
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.
#include <Cam/Machine/MachineAxisRange.h>

// Get the value of the property.
double propertyValue = machineAxisRange_var->min();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version April 2023


MachineAxisRange.objectType Property

Parent Object: MachineAxisRange
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineAxisRange.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.

# Get the value of the property.
propertyValue = machineAxisRange_var.objectType
"machineAxisRange_var" is a variable referencing a MachineAxisRange object.
#include <Cam/Machine/MachineAxisRange.h>

// Get the value of the property.
string propertyValue = machineAxisRange_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineCapabilities Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Object that represents the capabilities of the machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
additiveTechnology | Gets which additive technology the machine supports. Return "NA" if the machine does not support Additive
isAdditiveSupported | Gets and sets if the machine is capable of additive operations.
isCuttingSupported | Gets and sets if the machine is capable of subtractive cutting.
isMillingSupported | Gets and sets if the machine is capable of subtractive milling.
isTurningSupported | Gets and sets if the machine is capable of subtractive turning.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Machine.capabilities

Version

Introduced in version April 2023


MachineCapabilities.additiveTechnology Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Gets which additive technology the machine supports. Return "NA" if the machine does not support Additive

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.additiveTechnology
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
AdditiveTechnologies propertyValue = machineCapabilities_var->additiveTechnology();

Property Value

This is a read only property whose value is an AdditiveTechnologies.

Version

Introduced in version April 2023


MachineCapabilities.classType Method

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineCapabilities.classType()
This is a static method.

#include <Cam/Machine/MachineCapabilities.h>

returnValue = adsk::cam::MachineCapabilities::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineCapabilities.isAdditiveSupported Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Gets and sets if the machine is capable of additive operations.

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.isAdditiveSupported

# Set the value of the property.
machineCapabilities_var.isAdditiveSupported = propertyValue
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
boolean propertyValue = machineCapabilities_var->isAdditiveSupported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineCapabilities_var->isAdditiveSupported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineCapabilities.isCuttingSupported Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Gets and sets if the machine is capable of subtractive cutting.

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.isCuttingSupported

# Set the value of the property.
machineCapabilities_var.isCuttingSupported = propertyValue
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
boolean propertyValue = machineCapabilities_var->isCuttingSupported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineCapabilities_var->isCuttingSupported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineCapabilities.isMillingSupported Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Gets and sets if the machine is capable of subtractive milling.

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.isMillingSupported

# Set the value of the property.
machineCapabilities_var.isMillingSupported = propertyValue
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
boolean propertyValue = machineCapabilities_var->isMillingSupported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineCapabilities_var->isMillingSupported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineCapabilities.isTurningSupported Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Gets and sets if the machine is capable of subtractive turning.

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.isTurningSupported

# Set the value of the property.
machineCapabilities_var.isTurningSupported = propertyValue
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
boolean propertyValue = machineCapabilities_var->isTurningSupported();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineCapabilities_var->isTurningSupported(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineCapabilities.isValid Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.isValid
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
boolean propertyValue = machineCapabilities_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineCapabilities.objectType Property

Parent Object: MachineCapabilities
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineCapabilities.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.

# Get the value of the property.
propertyValue = machineCapabilities_var.objectType
"machineCapabilities_var" is a variable referencing a MachineCapabilities object.
#include <Cam/Machine/MachineCapabilities.h>

// Get the value of the property.
string propertyValue = machineCapabilities_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineElement Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

Base class for objects that compose a machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
elementId | Identifier for this element. Unique within an element 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
typeId | Identifier for this type of machine element.

Accessed From

MachineElements.defaultItemByType, MachineElements.item, MachineElements.itemById, MachineElements.itemsByType

Derived Classes

AdditiveFFFLimitsMachineElement, AdditivePlatformMachineElement, ControllerConfigurationMachineElement, KinematicsMachineElement, PostProcessingMachineElement

Version

Introduced in version April 2023


MachineElement.classType Method

Parent Object: MachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineElement.classType()
This is a static method.

#include <Cam/Machine/MachineElement.h>

returnValue = adsk::cam::MachineElement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineElement.elementId Property

Parent Object: MachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"machineElement_var" is a variable referencing a MachineElement object.

# Get the value of the property.
propertyValue = machineElement_var.elementId
"machineElement_var" is a variable referencing a MachineElement object.
#include <Cam/Machine/MachineElement.h>

// Get the value of the property.
string propertyValue = machineElement_var->elementId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineElement.isValid Property

Parent Object: MachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineElement_var" is a variable referencing a MachineElement object.

# Get the value of the property.
propertyValue = machineElement_var.isValid
"machineElement_var" is a variable referencing a MachineElement object.
#include <Cam/Machine/MachineElement.h>

// Get the value of the property.
boolean propertyValue = machineElement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineElement.objectType Property

Parent Object: MachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineElement_var" is a variable referencing a MachineElement object.

# Get the value of the property.
propertyValue = machineElement_var.objectType
"machineElement_var" is a variable referencing a MachineElement object.
#include <Cam/Machine/MachineElement.h>

// Get the value of the property.
string propertyValue = machineElement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineElement.typeId Property

Parent Object: MachineElement
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"machineElement_var" is a variable referencing a MachineElement object.

# Get the value of the property.
propertyValue = machineElement_var.typeId
"machineElement_var" is a variable referencing a MachineElement object.
#include <Cam/Machine/MachineElement.h>

// Get the value of the property.
string propertyValue = machineElement_var->typeId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineElements Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Collection of machine elements. These elements contain the properties that define the machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
countByType | Number of elements of specified type.
defaultItemByType | Returns the default item of the given type. In most cases this will be the element with an element ID of "default".
item | Get the element at a particular index in the collection.
itemById | Gets an element of a specific type by ID.
itemsByType | Gets the element of specified type.

Properties

Name | Description
count | Total number of elements in 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Machine.elements

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version April 2023


MachineElements.classType Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineElements.classType()
This is a static method.

#include <Cam/Machine/MachineElements.h>

returnValue = adsk::cam::MachineElements::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineElements.count Property

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Total number of elements in collection.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.

# Get the value of the property.
propertyValue = machineElements_var.count
"machineElements_var" is a variable referencing a MachineElements object.
#include <Cam/Machine/MachineElements.h>

// Get the value of the property.
uinteger propertyValue = machineElements_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


MachineElements.countByType Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Number of elements of specified type.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.
returnValue = machineElements_var.countByType(typeId)
"machineElements_var" is a variable referencing a MachineElements object.

#include <Cam/Machine/MachineElements.h>

returnValue = machineElements_var->countByType(typeId);

Return Value

Type | Description
uinteger | Returns the number of elements of the requested type. Returns zero if no elements match the specified type ID.

Parameters

Name | Type | Description
typeId | string | Element typeId to filter. See staticTypeId for the desired element type.

Version

Introduced in version April 2023


MachineElements.defaultItemByType Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Returns the default item of the given type. In most cases this will be the element with an element ID of "default".

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.
returnValue = machineElements_var.defaultItemByType(typeId)
"machineElements_var" is a variable referencing a MachineElements object.

#include <Cam/Machine/MachineElements.h>

returnValue = machineElements_var->defaultItemByType(typeId);

Return Value

Type | Description
MachineElement | Returns the specified Element or null if no matching type ID is found.

Parameters

Name | Type | Description
typeId | string | Element typeId to get the default for. See staticTypeId for the desired element type.

Version

Introduced in version April 2023


MachineElements.isValid Property

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.

# Get the value of the property.
propertyValue = machineElements_var.isValid
"machineElements_var" is a variable referencing a MachineElements object.
#include <Cam/Machine/MachineElements.h>

// Get the value of the property.
boolean propertyValue = machineElements_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineElements.item Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Get the element at a particular index in the collection.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.
returnValue = machineElements_var.item(index)
"machineElements_var" is a variable referencing a MachineElements object.

#include <Cam/Machine/MachineElements.h>

returnValue = machineElements_var->item(index);

Return Value

Type | Description
MachineElement | Returns the element at the given index.

Parameters

Name | Type | Description
index | integer | Index of element.

Version

Introduced in version April 2023


MachineElements.itemById Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Gets an element of a specific type by ID.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.
returnValue = machineElements_var.itemById(typeId, elementId)
"machineElements_var" is a variable referencing a MachineElements object.

#include <Cam/Machine/MachineElements.h>

returnValue = machineElements_var->itemById(typeId, elementId);

Return Value

Type | Description
MachineElement | Returns an element of the desired type with the specified ID or null in the case where no match is found.

Parameters

Name | Type | Description
typeId | string | Element typeId to filter. See staticTypeId for the desired element type.
elementId | string | Element ID to select.

Version

Introduced in version April 2023


MachineElements.itemsByType Method

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

Gets the element of specified type.

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.
returnValue = machineElements_var.itemsByType(typeId)
"machineElements_var" is a variable referencing a MachineElements object.

#include <Cam/Machine/MachineElements.h>

returnValue = machineElements_var->itemsByType(typeId);

Return Value

Type | Description
MachineElement[] | Returns a list of elements filtered to the specified type or an empty array if there is no match with the specified typeId.

Parameters

Name | Type | Description
typeId | string | Element typeId to filter. See staticTypeId for the desired element type.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version April 2023


MachineElements.objectType Property

Parent Object: MachineElements
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineElements.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineElements_var" is a variable referencing a MachineElements object.

# Get the value of the property.
propertyValue = machineElements_var.objectType
"machineElements_var" is a variable referencing a MachineElements object.
#include <Cam/Machine/MachineElements.h>

// Get the value of the property.
string propertyValue = machineElements_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineFromFileInput Object

Derived from: MachineInput Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

Object used as input to create a machine from a local file. It is used by the Machine.create method. The object holds the data needed to create a machine from a local machine file.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 MachineFromFileInput object to be used as input for Machine.create method.

Properties

Name | Description
filePath | The path to a file to act as a base for creating a machine from. The filePath is expected to be an absolute path to the local machine file.
ignoreSimulationModel | Whether or not to ignore the simulation model when creating/loading the machine. If set to true the simulation model will not be set on the new machine.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MachineFromFileInput.create

Version

Introduced in version April 2023


MachineFromFileInput.classType Method

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromFileInput.classType()
This is a static method.

#include <Cam/Machine/MachineFromFileInput.h>

returnValue = adsk::cam::MachineFromFileInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineFromFileInput.create Method

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

Creates a MachineFromFileInput object to be used as input for Machine.create method.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromFileInput.create(filePath)
This is a static method.

#include <Cam/Machine/MachineFromFileInput.h>

returnValue = adsk::cam::MachineFromFileInput::create(filePath);

Return Value

Type | Description
MachineFromFileInput | The newly created "MachineFromFileInput" object in a valid state.

Parameters

Name | Type | Description
filePath | string | The path to a machine file to be processed. The filePath is expected to be an absolute path to the machine file on disk.

Version

Introduced in version April 2023


MachineFromFileInput.filePath Property

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

The path to a file to act as a base for creating a machine from. The filePath is expected to be an absolute path to the local machine file.

Syntax

  • Python
  • C++
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.

# Get the value of the property.
propertyValue = machineFromFileInput_var.filePath
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.
#include <Cam/Machine/MachineFromFileInput.h>

// Get the value of the property.
string propertyValue = machineFromFileInput_var->filePath();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineFromFileInput.ignoreSimulationModel Property

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

Whether or not to ignore the simulation model when creating/loading the machine. If set to true the simulation model will not be set on the new machine.

Remarks

This can be useful if you don't have write access to the simulation machine. This can be the case if:

- The simulation machine is not in your local library.

- The simulation machine is not saved in your hub.

- You don't have write access to the hub or location where it was saved.

Syntax

  • Python
  • C++
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.

# Get the value of the property.
propertyValue = machineFromFileInput_var.ignoreSimulationModel

# Set the value of the property.
machineFromFileInput_var.ignoreSimulationModel = propertyValue
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.
#include <Cam/Machine/MachineFromFileInput.h>

// Get the value of the property.
boolean propertyValue = machineFromFileInput_var->ignoreSimulationModel();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineFromFileInput_var->ignoreSimulationModel(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineFromFileInput.isValid Property

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.

# Get the value of the property.
propertyValue = machineFromFileInput_var.isValid
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.
#include <Cam/Machine/MachineFromFileInput.h>

// Get the value of the property.
boolean propertyValue = machineFromFileInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineFromFileInput.objectType Property

Parent Object: MachineFromFileInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromFileInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.

# Get the value of the property.
propertyValue = machineFromFileInput_var.objectType
"machineFromFileInput_var" is a variable referencing a MachineFromFileInput object.
#include <Cam/Machine/MachineFromFileInput.h>

// Get the value of the property.
string propertyValue = machineFromFileInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineFromLibraryInput Object

Derived from: MachineInput Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

Object used as input to create a machine from library URL. Used by "Machine.create(MachineInput)" method. The object holds the data needed to create a machine from the specified library URL

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 MachineFromLibraryInput object to be used as input for Machine.create method, in order to create a machine from a library location.

Properties

Name | Description
ignoreSimulationModel | Gets and sets whether or not to ignore the simulation model when creating or loading the machine. If set to true the simulation model will not be set on the new machine.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
url | The URL path to the library machine.

Accessed From

MachineFromLibraryInput.create

Version

Introduced in version April 2023


MachineFromLibraryInput.classType Method

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromLibraryInput.classType()
This is a static method.

#include <Cam/Machine/MachineFromLibraryInput.h>

returnValue = adsk::cam::MachineFromLibraryInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineFromLibraryInput.create Method

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

Creates a MachineFromLibraryInput object to be used as input for Machine.create method, in order to create a machine from a library location.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromLibraryInput.create(url)
This is a static method.

#include <Cam/Machine/MachineFromLibraryInput.h>

returnValue = adsk::cam::MachineFromLibraryInput::create(url);

Return Value

Type | Description
MachineFromLibraryInput | Returns newly created MachineFromLibraryInput object in a valid state.

Parameters

Name | Type | Description
url | URL | The URL path to the library machine.

Version

Introduced in version April 2023


MachineFromLibraryInput.ignoreSimulationModel Property

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

Gets and sets whether or not to ignore the simulation model when creating or loading the machine. If set to true the simulation model will not be set on the new machine.

Remarks

This can be useful if you don't have write access to the simulation machine. This can be the case if:

- The simulation machine is not in your local library.

- The simulation machine is not saved in your hub.

- You don't have write access to the hub or location where it was saved.

Syntax

  • Python
  • C++
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.

# Get the value of the property.
propertyValue = machineFromLibraryInput_var.ignoreSimulationModel

# Set the value of the property.
machineFromLibraryInput_var.ignoreSimulationModel = propertyValue
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.
#include <Cam/Machine/MachineFromLibraryInput.h>

// Get the value of the property.
boolean propertyValue = machineFromLibraryInput_var->ignoreSimulationModel();

// Set the value of the property, where value_var is a boolean.
bool returnValue = machineFromLibraryInput_var->ignoreSimulationModel(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


MachineFromLibraryInput.isValid Property

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.

# Get the value of the property.
propertyValue = machineFromLibraryInput_var.isValid
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.
#include <Cam/Machine/MachineFromLibraryInput.h>

// Get the value of the property.
boolean propertyValue = machineFromLibraryInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineFromLibraryInput.objectType Property

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.

# Get the value of the property.
propertyValue = machineFromLibraryInput_var.objectType
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.
#include <Cam/Machine/MachineFromLibraryInput.h>

// Get the value of the property.
string propertyValue = machineFromLibraryInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineFromLibraryInput.url Property

Parent Object: MachineFromLibraryInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromLibraryInput.h>

Description

The URL path to the library machine.

Syntax

  • Python
  • C++
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.

# Get the value of the property.
propertyValue = machineFromLibraryInput_var.url
"machineFromLibraryInput_var" is a variable referencing a MachineFromLibraryInput object.
#include <Cam/Machine/MachineFromLibraryInput.h>

// Get the value of the property.
Ptr<URL> propertyValue = machineFromLibraryInput_var->url();

Property Value

This is a read only property whose value is a URL.

Version

Introduced in version April 2023


MachineFromTemplateInput Object

Derived from: MachineInput Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

Object used as input to create a machine from a given template. Used by "Machine.create(MachineInput)" method. The object holds the data needed to create a machine based on the specified template.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Create a "MachineFromTemplateInput" object to be used as input for "Machine.create(MachineInput)" method.

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.
machineTemplate | Machine template identifier used to generate a certain type of machine.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MachineFromTemplateInput.create

Version

Introduced in version April 2023


MachineFromTemplateInput.classType Method

Parent Object: MachineFromTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromTemplateInput.classType()
This is a static method.

#include <Cam/Machine/MachineFromTemplateInput.h>

returnValue = adsk::cam::MachineFromTemplateInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineFromTemplateInput.create Method

Parent Object: MachineFromTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

Create a "MachineFromTemplateInput" object to be used as input for "Machine.create(MachineInput)" method.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineFromTemplateInput.create(machineTemplate)
This is a static method.

#include <Cam/Machine/MachineFromTemplateInput.h>

returnValue = adsk::cam::MachineFromTemplateInput::create(machineTemplate);

Return Value

Type | Description
MachineFromTemplateInput | The newly created "MachineFromTemplateInput" object in a valid state.

Parameters

Name | Type | Description
machineTemplate | MachineTemplate | The template to act as a base for creating a machine from.

Version

Introduced in version April 2023


MachineFromTemplateInput.isValid Property

Parent Object: MachineFromTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.

# Get the value of the property.
propertyValue = machineFromTemplateInput_var.isValid
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.
#include <Cam/Machine/MachineFromTemplateInput.h>

// Get the value of the property.
boolean propertyValue = machineFromTemplateInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineFromTemplateInput.machineTemplate Property

Parent Object: MachineFromTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

Machine template identifier used to generate a certain type of machine.

Syntax

  • Python
  • C++
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.

# Get the value of the property.
propertyValue = machineFromTemplateInput_var.machineTemplate
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.
#include <Cam/Machine/MachineFromTemplateInput.h>

// Get the value of the property.
MachineTemplate propertyValue = machineFromTemplateInput_var->machineTemplate();

Property Value

This is a read only property whose value is a MachineTemplate.

Version

Introduced in version April 2023


MachineFromTemplateInput.objectType Property

Parent Object: MachineFromTemplateInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineFromTemplateInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.

# Get the value of the property.
propertyValue = machineFromTemplateInput_var.objectType
"machineFromTemplateInput_var" is a variable referencing a MachineFromTemplateInput object.
#include <Cam/Machine/MachineFromTemplateInput.h>

// Get the value of the property.
string propertyValue = machineFromTemplateInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineInput.h>

Description

Base abstract class for inputs to be used when creating machines. Used by Machine.create(MachineInput) method. Implemented by "MachineFromFileInput" and "MachineFromLibraryinput" classes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Derived Classes

MachineFromFileInput, MachineFromLibraryInput, MachineFromTemplateInput

Version

Introduced in version April 2023


MachineInput.classType Method

Parent Object: MachineInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineInput.classType()
This is a static method.

#include <Cam/Machine/MachineInput.h>

returnValue = adsk::cam::MachineInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineInput.isValid Property

Parent Object: MachineInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineInput_var" is a variable referencing a MachineInput object.

# Get the value of the property.
propertyValue = machineInput_var.isValid
"machineInput_var" is a variable referencing a MachineInput object.
#include <Cam/Machine/MachineInput.h>

// Get the value of the property.
boolean propertyValue = machineInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineInput.objectType Property

Parent Object: MachineInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineInput_var" is a variable referencing a MachineInput object.

# Get the value of the property.
propertyValue = machineInput_var.objectType
"machineInput_var" is a variable referencing a MachineInput object.
#include <Cam/Machine/MachineInput.h>

// Get the value of the property.
string propertyValue = machineInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineLibrary Object

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

The MachineLibrary provides access to machines. Using this object you can import machines and get existing machines using either URL or query to find specific Machines.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
childMachines | Get all machines by the given parent folder URL. Returns null, if the URL does not exist.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
createQuery | Creates a new MachineQuery that is used to query the library for machines matching the query.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importMachine | Import a given machine at a specific location. The machine will be stored in the library. Throws an error, if the given URL is read-only.
machineAtURL | Get a specific machine by the given URL. Returns null, if the URL does not exist.
updateMachine | Update a machine in the library. The library overrides the URL by given machine. Throws an error if the URL does not already point to an existing machine.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.machineLibrary

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


MachineLibrary.assetTypeName Property

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.

# Get the value of the property.
propertyValue = machineLibrary_var.assetTypeName
"machineLibrary_var" is a variable referencing a MachineLibrary object.
#include <Cam/Machine/MachineLibrary.h>

// Get the value of the property.
string propertyValue = machineLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineLibrary.childAssetURLs Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.childAssetURLs(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


MachineLibrary.childFolderURLs Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.childFolderURLs(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


MachineLibrary.childMachines Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get all machines by the given parent folder URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.childMachines(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->childMachines(url);

Return Value

Type | Description
Machine[] | Returns the machine for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL of the folder to get machines from.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


MachineLibrary.classType Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineLibrary.classType()
This is a static method.

#include <Cam/Machine/MachineLibrary.h>

returnValue = adsk::cam::MachineLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineLibrary.createFolder Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.createFolder(parentUrl, folderName)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


MachineLibrary.createQuery Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Creates a new MachineQuery that is used to query the library for machines matching the query.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
# Uses no optional arguments.
returnValue = machineLibrary_var.createQuery(location)

# Uses optional arguments.
returnValue = machineLibrary_var.createQuery(location, vendor, model)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

// Uses no optional arguments.
returnValue = machineLibrary_var->createQuery(location);

// Uses optional arguments.
returnValue = machineLibrary_var->createQuery(location, vendor, model);

Return Value

Type | Description
MachineQuery | Returns a new MachineQuery. The query is predefined by given parameter.

Parameters

Name | Type | Description
location | LibraryLocations | The location specifies the LibraryLocations where to search for in the machine library.
vendor | string | The vendor specifies the vendor of the machine. The default empty vendor applies to all machines. This is an optional argument whose default value is "".
model | string | The model specifies the model of the machine. The default empty model applies to all machines. This is an optional argument whose default value is "".

Version

Introduced in version April 2023


MachineLibrary.deleteAsset Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.deleteAsset(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


MachineLibrary.deleteFolder Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.deleteFolder(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


MachineLibrary.displayName Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.displayName(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


MachineLibrary.importMachine Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Import a given machine at a specific location. The machine will be stored in the library. Throws an error, if the given URL is read-only.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.importMachine(machine, destinationUrl, machineName)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->importMachine(machine, destinationUrl, machineName);

Return Value

Type | Description
URL | Returns the URL of the newly imported machine, or null if the import failed.

Parameters

Name | Type | Description
machine | Machine | The machine that should be imported.
destinationUrl | URL | The URL to the folder where to save the machine.
machineName | string | The name of the machine that should be created due to the import. The name can be extended if the asset already exists at given location to ensure a unique name.

Version

Introduced in version April 2023


MachineLibrary.isValid Property

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.

# Get the value of the property.
propertyValue = machineLibrary_var.isValid
"machineLibrary_var" is a variable referencing a MachineLibrary object.
#include <Cam/Machine/MachineLibrary.h>

// Get the value of the property.
boolean propertyValue = machineLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineLibrary.machineAtURL Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get a specific machine by the given URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.machineAtURL(url)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->machineAtURL(url);

Return Value

Type | Description
Machine | Returns the machine for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the machine to be loaded.

Version

Introduced in version April 2023


MachineLibrary.objectType Property

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.

# Get the value of the property.
propertyValue = machineLibrary_var.objectType
"machineLibrary_var" is a variable referencing a MachineLibrary object.
#include <Cam/Machine/MachineLibrary.h>

// Get the value of the property.
string propertyValue = machineLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineLibrary.updateMachine Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Update a machine in the library. The library overrides the URL by given machine. Throws an error if the URL does not already point to an existing machine.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.updateMachine(url, machine)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->updateMachine(url, machine);

Return Value

Type | Description
boolean | Returns true if asset was updated successfully, false otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the existing asset in the library that should be updated.
machine | Machine | The machine that should be persisted.

Version

Introduced in version April 2023


MachineLibrary.urlByLocation Method

Parent Object: MachineLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"machineLibrary_var" is a variable referencing a MachineLibrary object.
returnValue = machineLibrary_var.urlByLocation(location)
"machineLibrary_var" is a variable referencing a MachineLibrary object.

#include <Cam/Machine/MachineLibrary.h>

returnValue = machineLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


MachinePart Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Object representing some part of a machine, such as the static base of the machine, an axis, or the attachment points for tools and fixtures.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Delete this part and its children from the kinematics tree.

Properties

Name | Description
axis | Get the axis object for this part used to reference this part for other operations. Only valid when partType is Axis, otherwise returns null
children | Get the collection of child parts.
id | Get the internal ID of the part. This is unique with respect to other MachineParts in the Machine.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get or set the parent of this part. Setting the parent will add this part to the end of the parent's children collection. Setting the parent will throw an error if the new parent is this part or a child of this part.
partType | Get the type of this part.
spindle | Get the spindle object for this part used to reference this part for other operations. Will return null if the part has no spindle assigned.
toolStation | Get the tool station object for this part. Will return null if the part has no tool station assigned.

Accessed From

MachinePart.parent, MachineParts.add, MachineParts.item, MachineParts.itemById

Version

Introduced in version April 2023


MachinePart.axis Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the axis object for this part used to reference this part for other operations. Only valid when partType is Axis, otherwise returns null

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.axis
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
Ptr<MachineAxis> propertyValue = machinePart_var->axis();

Property Value

This is a read only property whose value is a MachineAxis.

Version

Introduced in version April 2023


MachinePart.children Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the collection of child parts.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.children
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
Ptr<MachineParts> propertyValue = machinePart_var->children();

Property Value

This is a read only property whose value is a MachineParts.

Version

Introduced in version April 2023


MachinePart.classType Method

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachinePart.classType()
This is a static method.

#include <Cam/Machine/MachinePart.h>

returnValue = adsk::cam::MachinePart::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachinePart.deleteMe Method

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Delete this part and its children from the kinematics tree.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.
returnValue = machinePart_var.deleteMe()
"machinePart_var" is a variable referencing a MachinePart object.

#include <Cam/Machine/MachinePart.h>

returnValue = machinePart_var->deleteMe();

Version

Introduced in version April 2023


MachinePart.id Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the internal ID of the part. This is unique with respect to other MachineParts in the Machine.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.id
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
string propertyValue = machinePart_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachinePart.isValid Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.isValid
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
boolean propertyValue = machinePart_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachinePart.objectType Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.objectType
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
string propertyValue = machinePart_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachinePart.parent Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get or set the parent of this part. Setting the parent will add this part to the end of the parent's children collection. Setting the parent will throw an error if the new parent is this part or a child of this part.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.parent

# Set the value of the property.
machinePart_var.parent = propertyValue
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
Ptr<MachinePart> propertyValue = machinePart_var->parent();

// Set the value of the property, where value_var is a MachinePart.
bool returnValue = machinePart_var->parent(value_var);

Property Value

This is a read/write property whose value is a MachinePart.

Version

Introduced in version April 2023


MachinePart.partType Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the type of this part.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.partType
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
MachinePartTypes propertyValue = machinePart_var->partType();

Property Value

This is a read only property whose value is a MachinePartTypes.

Version

Introduced in version April 2023


MachinePart.spindle Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the spindle object for this part used to reference this part for other operations. Will return null if the part has no spindle assigned.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.spindle
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
Ptr<MachineSpindle> propertyValue = machinePart_var->spindle();

Property Value

This is a read only property whose value is a MachineSpindle.

Version

Introduced in version April 2023


MachinePart.toolStation Property

Parent Object: MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePart.h>

Description

Get the tool station object for this part. Will return null if the part has no tool station assigned.

Syntax

  • Python
  • C++
"machinePart_var" is a variable referencing a MachinePart object.

# Get the value of the property.
propertyValue = machinePart_var.toolStation
"machinePart_var" is a variable referencing a MachinePart object.
#include <Cam/Machine/MachinePart.h>

// Get the value of the property.
Ptr<MachineToolStation> propertyValue = machinePart_var->toolStation();

Property Value

This is a read only property whose value is a MachineToolStation.

Version

Introduced in version July 2025


MachinePartInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Object representing the set of inputs required to create a new MachinePart. Set an MachineAxisInput object on this object's axisInput parameter to create a new MachineAxis with this part.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createAxisInput | Creates a new MachineAxisInput object to be used to create a new MachineAxis. Set this object on to an axis type MachinePartInput to create a new MachineAxis with that part.
createSpindleInput | Creates a new MachineSpindleInput object to be used to create a new MachineSpindle.
createToolStationInput | Creates a new MachineToolStationInput object to be used to create a new MachineToolStation.

Properties

Name | Description
axisInput | Gets or sets an axis input object to create a new MachineAxis with this part. Only valid when partType is Axis.
id | Gets or sets the internal ID of the part, used to reference this part for other operations. This ID can be any string. This must be unique with respect to other MachineParts in the Machine.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
partType | Get the type of part this input will create.
spindleInput | Gets or sets an spindle input object to create a new MachineSpindle with this part. Only valid when partType is not Axis.
toolStationInput | Gets or sets an tool station input object to create a new MachineToolStation with this part. Only valid when partType is not Axis.

Accessed From

MachineParts.createPartInput

Version

Introduced in version April 2023


MachinePartInput.axisInput Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Gets or sets an axis input object to create a new MachineAxis with this part. Only valid when partType is Axis.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.axisInput

# Set the value of the property.
machinePartInput_var.axisInput = propertyValue
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
Ptr<MachineAxisInput> propertyValue = machinePartInput_var->axisInput();

// Set the value of the property, where value_var is a MachineAxisInput.
bool returnValue = machinePartInput_var->axisInput(value_var);

Property Value

This is a read/write property whose value is a MachineAxisInput.

Version

Introduced in version April 2023


MachinePartInput.classType Method

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachinePartInput.classType()
This is a static method.

#include <Cam/Machine/MachinePartInput.h>

returnValue = adsk::cam::MachinePartInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachinePartInput.createAxisInput Method

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Creates a new MachineAxisInput object to be used to create a new MachineAxis. Set this object on to an axis type MachinePartInput to create a new MachineAxis with that part.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.
returnValue = machinePartInput_var.createAxisInput(axisType)
"machinePartInput_var" is a variable referencing a MachinePartInput object.

#include <Cam/Machine/MachinePartInput.h>

returnValue = machinePartInput_var->createAxisInput(axisType);

Return Value

Type | Description
MachineAxisInput | Returns a LinearMachineAxisInput or RotaryMachineAxisInput, or null if the creation failed.

Parameters

Name | Type | Description
axisType | MachineAxisTypes | The type of MachineAxisInput to create.

Version

Introduced in version April 2023


MachinePartInput.createSpindleInput Method

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Creates a new MachineSpindleInput object to be used to create a new MachineSpindle.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.
returnValue = machinePartInput_var.createSpindleInput()
"machinePartInput_var" is a variable referencing a MachinePartInput object.

#include <Cam/Machine/MachinePartInput.h>

returnValue = machinePartInput_var->createSpindleInput();

Return Value

Type | Description
MachineSpindleInput | Returns new MachineSpindleInput object.

Version

Introduced in version April 2023


MachinePartInput.createToolStationInput Method

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Creates a new MachineToolStationInput object to be used to create a new MachineToolStation.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.
returnValue = machinePartInput_var.createToolStationInput()
"machinePartInput_var" is a variable referencing a MachinePartInput object.

#include <Cam/Machine/MachinePartInput.h>

returnValue = machinePartInput_var->createToolStationInput();

Return Value

Type | Description
MachineToolStationInput | Returns new MachineToolStationInput object.

Version

Introduced in version July 2025


MachinePartInput.id Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Gets or sets the internal ID of the part, used to reference this part for other operations. This ID can be any string. This must be unique with respect to other MachineParts in the Machine.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.id

# Set the value of the property.
machinePartInput_var.id = propertyValue
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
string propertyValue = machinePartInput_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = machinePartInput_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachinePartInput.isValid Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.isValid
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
boolean propertyValue = machinePartInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachinePartInput.objectType Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.objectType
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
string propertyValue = machinePartInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachinePartInput.partType Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Get the type of part this input will create.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.partType
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
MachinePartTypes propertyValue = machinePartInput_var->partType();

Property Value

This is a read only property whose value is a MachinePartTypes.

Version

Introduced in version April 2023


MachinePartInput.spindleInput Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Gets or sets an spindle input object to create a new MachineSpindle with this part. Only valid when partType is not Axis.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.spindleInput

# Set the value of the property.
machinePartInput_var.spindleInput = propertyValue
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
Ptr<MachineSpindleInput> propertyValue = machinePartInput_var->spindleInput();

// Set the value of the property, where value_var is a MachineSpindleInput.
bool returnValue = machinePartInput_var->spindleInput(value_var);

Property Value

This is a read/write property whose value is a MachineSpindleInput.

Version

Introduced in version April 2023


MachinePartInput.toolStationInput Property

Parent Object: MachinePartInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachinePartInput.h>

Description

Gets or sets an tool station input object to create a new MachineToolStation with this part. Only valid when partType is not Axis.

Syntax

  • Python
  • C++
"machinePartInput_var" is a variable referencing a MachinePartInput object.

# Get the value of the property.
propertyValue = machinePartInput_var.toolStationInput

# Set the value of the property.
machinePartInput_var.toolStationInput = propertyValue
"machinePartInput_var" is a variable referencing a MachinePartInput object.
#include <Cam/Machine/MachinePartInput.h>

// Get the value of the property.
Ptr<MachineToolStationInput> propertyValue = machinePartInput_var->toolStationInput();

// Set the value of the property, where value_var is a MachineToolStationInput.
bool returnValue = machinePartInput_var->toolStationInput(value_var);

Property Value

This is a read/write property whose value is a MachineToolStationInput.

Version

Introduced in version July 2025


MachineParts Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Object that represents a collection of machine parts. These parts are the children of another part or the collection of base parts from MachineKinematics.

Methods

Name | Description
add | Add a new part to this collection. The part's parent will be set to the owner of this collection, or null if this is the root parts collection. If the passed MachinePartInput has a MachineAxisInput a new MachineAxis will be created.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createPartInput | Create a new MachinePartInput.
item | Get the part at index in this collection.
itemById | Get the part with the given ID.

Properties

Name | Description
count | Get the number of parts 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

KinematicsMachineElement.parts, MachinePart.children

Version

Introduced in version April 2023


MachineParts.add Method

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Add a new part to this collection. The part's parent will be set to the owner of this collection, or null if this is the root parts collection.

If the passed MachinePartInput has a MachineAxisInput a new MachineAxis will be created.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.
returnValue = machineParts_var.add(partInput)
"machineParts_var" is a variable referencing a MachineParts object.

#include <Cam/Machine/MachineParts.h>

returnValue = machineParts_var->add(partInput);

Return Value

Type | Description
MachinePart | Returns the newly created MachinePart or null if creation failed.

Parameters

Name | Type | Description
partInput | MachinePartInput | Part input object used to create the new MachinePart.

Version

Introduced in version April 2023


MachineParts.classType Method

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineParts.classType()
This is a static method.

#include <Cam/Machine/MachineParts.h>

returnValue = adsk::cam::MachineParts::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineParts.count Property

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Get the number of parts in this collection.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.

# Get the value of the property.
propertyValue = machineParts_var.count
"machineParts_var" is a variable referencing a MachineParts object.
#include <Cam/Machine/MachineParts.h>

// Get the value of the property.
uinteger propertyValue = machineParts_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


MachineParts.createPartInput Method

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Create a new MachinePartInput.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.
returnValue = machineParts_var.createPartInput(partType)
"machineParts_var" is a variable referencing a MachineParts object.

#include <Cam/Machine/MachineParts.h>

returnValue = machineParts_var->createPartInput(partType);

Return Value

Type | Description
MachinePartInput | Returns the new MachinePartInput or null if creation failed.

Parameters

Name | Type | Description
partType | MachinePartTypes | The type of part to create. When this parameter is Axis, you must set a value for axisInput.

Version

Introduced in version April 2023


MachineParts.isValid Property

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.

# Get the value of the property.
propertyValue = machineParts_var.isValid
"machineParts_var" is a variable referencing a MachineParts object.
#include <Cam/Machine/MachineParts.h>

// Get the value of the property.
boolean propertyValue = machineParts_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineParts.item Method

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Get the part at index in this collection.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.
returnValue = machineParts_var.item(index)
"machineParts_var" is a variable referencing a MachineParts object.

#include <Cam/Machine/MachineParts.h>

returnValue = machineParts_var->item(index);

Return Value

Type | Description
MachinePart | The MachinePart at index.

Parameters

Name | Type | Description
index | integer | The index of the part.

Version

Introduced in version April 2023


MachineParts.itemById Method

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

Get the part with the given ID.

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.
returnValue = machineParts_var.itemById(id)
"machineParts_var" is a variable referencing a MachineParts object.

#include <Cam/Machine/MachineParts.h>

returnValue = machineParts_var->itemById(id);

Return Value

Type | Description
MachinePart | Returns the MachinePart with the given ID, or null if the given ID does not match any part in the collection.

Parameters

Name | Type | Description
id | string | The ID for the part to get.

Version

Introduced in version April 2023


MachineParts.objectType Property

Parent Object: MachineParts
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineParts.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineParts_var" is a variable referencing a MachineParts object.

# Get the value of the property.
propertyValue = machineParts_var.objectType
"machineParts_var" is a variable referencing a MachineParts object.
#include <Cam/Machine/MachineParts.h>

// Get the value of the property.
string propertyValue = machineParts_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineQuery Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

MachineQuery defines the query to access Machines.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
execute | Preview Executes the query for specific machines based on the query's properties.

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.
location | The location specifies the location to search in the machine library. Setting the location clears any previous specified URL.
model | The case-insensitive model specifies the model of the machine. The default empty model applies to all machines.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
url | The URL specifies the location and folder to search for in the machine library. Setting the URL updates the location.
vendor | The case-insensitive vendor specifies the vendor of the machine. The default empty vendor applies to all machines.

Accessed From

MachineLibrary.createQuery

Version

Introduced in version April 2023


MachineQuery.classType Method

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineQuery.classType()
This is a static method.

#include <Cam/Machine/MachineQuery.h>

returnValue = adsk::cam::MachineQuery::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineQuery.execute Method

Parent Object: MachineQuery

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

Executes the query for specific machines based on the query's properties.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.
returnValue = machineQuery_var.execute()
"machineQuery_var" is a variable referencing a MachineQuery object.

#include <Cam/Machine/MachineQuery.h>

returnValue = machineQuery_var->execute();

Return Value

Type | Description
Machine[] | Returns a list of `Machine`. Each returned machine matches this query.

Version

Introduced in version May 2023


MachineQuery.isValid Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.isValid
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
boolean propertyValue = machineQuery_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineQuery.location Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

The location specifies the location to search in the machine library. Setting the location clears any previous specified URL.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.location

# Set the value of the property.
machineQuery_var.location = propertyValue
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
LibraryLocations propertyValue = machineQuery_var->location();

// Set the value of the property, where value_var is a LibraryLocations.
bool returnValue = machineQuery_var->location(value_var);

Property Value

This is a read/write property whose value is a LibraryLocations.

Version

Introduced in version April 2023


MachineQuery.model Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

The case-insensitive model specifies the model of the machine. The default empty model applies to all machines.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.model

# Set the value of the property.
machineQuery_var.model = propertyValue
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
string propertyValue = machineQuery_var->model();

// Set the value of the property, where value_var is a string.
bool returnValue = machineQuery_var->model(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineQuery.objectType Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.objectType
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
string propertyValue = machineQuery_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineQuery.url Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

The URL specifies the location and folder to search for in the machine library. Setting the URL updates the location.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.url

# Set the value of the property.
machineQuery_var.url = propertyValue
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
Ptr<URL> propertyValue = machineQuery_var->url();

// Set the value of the property, where value_var is a URL.
bool returnValue = machineQuery_var->url(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version April 2023


MachineQuery.vendor Property

Parent Object: MachineQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineQuery.h>

Description

The case-insensitive vendor specifies the vendor of the machine. The default empty vendor applies to all machines.

Syntax

  • Python
  • C++
"machineQuery_var" is a variable referencing a MachineQuery object.

# Get the value of the property.
propertyValue = machineQuery_var.vendor

# Set the value of the property.
machineQuery_var.vendor = propertyValue
"machineQuery_var" is a variable referencing a MachineQuery object.
#include <Cam/Machine/MachineQuery.h>

// Get the value of the property.
string propertyValue = machineQuery_var->vendor();

// Set the value of the property, where value_var is a string.
bool returnValue = machineQuery_var->vendor(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineSpindle Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Object representing a spindle on the machine

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | The description of this spindle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxSpeed | Specifies the maximum speed (rpm) for this spindle.
minSpeed | Specifies the minimum speed (rpm) for this spindle.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
peakTorque | Specifies the peak torque (Nm) for this spindle.
peakTorqueSpeed | Specifies the speed (rpm) at which this spindle reaches peak torque (Nm).
power | Specifies the power (kW) for this spindle.

Accessed From

MachinePart.spindle

Version

Introduced in version April 2023


MachineSpindle.classType Method

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineSpindle.classType()
This is a static method.

#include <Cam/Machine/MachineSpindle.h>

returnValue = adsk::cam::MachineSpindle::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineSpindle.description Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

The description of this spindle.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.description

# Set the value of the property.
machineSpindle_var.description = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
string propertyValue = machineSpindle_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = machineSpindle_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineSpindle.isValid Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.isValid
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
boolean propertyValue = machineSpindle_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineSpindle.maxSpeed Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Specifies the maximum speed (rpm) for this spindle.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.maxSpeed

# Set the value of the property.
machineSpindle_var.maxSpeed = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
double propertyValue = machineSpindle_var->maxSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindle_var->maxSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineSpindle.minSpeed Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Specifies the minimum speed (rpm) for this spindle.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.minSpeed

# Set the value of the property.
machineSpindle_var.minSpeed = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
double propertyValue = machineSpindle_var->minSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindle_var->minSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineSpindle.objectType Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.objectType
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
string propertyValue = machineSpindle_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineSpindle.peakTorque Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Specifies the peak torque (Nm) for this spindle.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.peakTorque

# Set the value of the property.
machineSpindle_var.peakTorque = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
double propertyValue = machineSpindle_var->peakTorque();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindle_var->peakTorque(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineSpindle.peakTorqueSpeed Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Specifies the speed (rpm) at which this spindle reaches peak torque (Nm).

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.peakTorqueSpeed

# Set the value of the property.
machineSpindle_var.peakTorqueSpeed = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
double propertyValue = machineSpindle_var->peakTorqueSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindle_var->peakTorqueSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineSpindle.power Property

Parent Object: MachineSpindle
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindle.h>

Description

Specifies the power (kW) for this spindle.

Syntax

  • Python
  • C++
"machineSpindle_var" is a variable referencing a MachineSpindle object.

# Get the value of the property.
propertyValue = machineSpindle_var.power

# Set the value of the property.
machineSpindle_var.power = propertyValue
"machineSpindle_var" is a variable referencing a MachineSpindle object.
#include <Cam/Machine/MachineSpindle.h>

// Get the value of the property.
double propertyValue = machineSpindle_var->power();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindle_var->power(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineSpindleInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Object representing the set of inputs required to create a new MachineSpindle.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | The description of this spindle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxSpeed | Specifies the maximum speed (rpm) for this spindle.
minSpeed | Specifies the minimum speed (rpm) for this spindle.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
peakTorque | Specifies the peak torque for this spindle.
peakTorqueSpeed | Specifies the peak torque speed for this spindle.
power | Specifies the power for this spindle.

Accessed From

MachinePartInput.createSpindleInput, MachinePartInput.spindleInput

Version

Introduced in version April 2023


MachineSpindleInput.classType Method

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineSpindleInput.classType()
This is a static method.

#include <Cam/Machine/MachineSpindleInput.h>

returnValue = adsk::cam::MachineSpindleInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


MachineSpindleInput.description Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

The description of this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.description

# Set the value of the property.
machineSpindleInput_var.description = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
string propertyValue = machineSpindleInput_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = machineSpindleInput_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


MachineSpindleInput.isValid Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.isValid
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
boolean propertyValue = machineSpindleInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


MachineSpindleInput.maxSpeed Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Specifies the maximum speed (rpm) for this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.maxSpeed

# Set the value of the property.
machineSpindleInput_var.maxSpeed = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
double propertyValue = machineSpindleInput_var->maxSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindleInput_var->maxSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineSpindleInput.minSpeed Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Specifies the minimum speed (rpm) for this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.minSpeed

# Set the value of the property.
machineSpindleInput_var.minSpeed = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
double propertyValue = machineSpindleInput_var->minSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindleInput_var->minSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


MachineSpindleInput.objectType Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.objectType
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
string propertyValue = machineSpindleInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


MachineSpindleInput.peakTorque Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Specifies the peak torque for this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.peakTorque

# Set the value of the property.
machineSpindleInput_var.peakTorque = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
double propertyValue = machineSpindleInput_var->peakTorque();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindleInput_var->peakTorque(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineSpindleInput.peakTorqueSpeed Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Specifies the peak torque speed for this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.peakTorqueSpeed

# Set the value of the property.
machineSpindleInput_var.peakTorqueSpeed = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
double propertyValue = machineSpindleInput_var->peakTorqueSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindleInput_var->peakTorqueSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineSpindleInput.power Property

Parent Object: MachineSpindleInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineSpindleInput.h>

Description

Specifies the power for this spindle.

Syntax

  • Python
  • C++
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.

# Get the value of the property.
propertyValue = machineSpindleInput_var.power

# Set the value of the property.
machineSpindleInput_var.power = propertyValue
"machineSpindleInput_var" is a variable referencing a MachineSpindleInput object.
#include <Cam/Machine/MachineSpindleInput.h>

// Get the value of the property.
double propertyValue = machineSpindleInput_var->power();

// Set the value of the property, where value_var is a double.
bool returnValue = machineSpindleInput_var->power(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineToolStation Object

MachineToolStation Object Preview

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object representing a tool station on the machine

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
coolants | The coolants that this tool station can use. See MachineToolStationCoolant for possible values.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxToolDiameter | The maximum diameter in cm of the tool that can be held by this tool station.
maxToolLength | The maximum length in cm of the tool that can be held by this tool station.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
toolInterface | The type of interface that this tool station uses. (e.g. BT40, CAPTO C5, HSK A100, SK50, etc.) Note: All newline characters will be removed, and if the string contains only ASCII characters, it will be converted to uppercase.

Accessed From

MachinePart.toolStation

Version

Introduced in version July 2025


MachineToolStation.classType Method

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineToolStation.classType()
This is a static method.

#include <Cam/Machine/MachineToolStation.h>

returnValue = adsk::cam::MachineToolStation::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MachineToolStation.coolants Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

The coolants that this tool station can use. See MachineToolStationCoolant for possible values.

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.coolants

# Set the value of the property.
machineToolStation_var.coolants = propertyValue
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
std::vector<integer> propertyValue = machineToolStation_var->coolants();

// Set the value of the property, where value_var is an integer.
bool returnValue = machineToolStation_var->coolants(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version July 2025


MachineToolStation.isValid Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.isValid
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
boolean propertyValue = machineToolStation_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MachineToolStation.maxToolDiameter Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

The maximum diameter in cm of the tool that can be held by this tool station.

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.maxToolDiameter

# Set the value of the property.
machineToolStation_var.maxToolDiameter = propertyValue
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
double propertyValue = machineToolStation_var->maxToolDiameter();

// Set the value of the property, where value_var is a double.
bool returnValue = machineToolStation_var->maxToolDiameter(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineToolStation.maxToolLength Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

The maximum length in cm of the tool that can be held by this tool station.

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.maxToolLength

# Set the value of the property.
machineToolStation_var.maxToolLength = propertyValue
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
double propertyValue = machineToolStation_var->maxToolLength();

// Set the value of the property, where value_var is a double.
bool returnValue = machineToolStation_var->maxToolLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineToolStation.objectType Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.objectType
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
string propertyValue = machineToolStation_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MachineToolStation.toolInterface Property

Parent Object: MachineToolStation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStation.h>

Description

The type of interface that this tool station uses. (e.g. BT40, CAPTO C5, HSK A100, SK50, etc.) Note: All newline characters will be removed, and if the string contains only ASCII characters, it will be converted to uppercase.

Syntax

  • Python
  • C++
"machineToolStation_var" is a variable referencing a MachineToolStation object.

# Get the value of the property.
propertyValue = machineToolStation_var.toolInterface

# Set the value of the property.
machineToolStation_var.toolInterface = propertyValue
"machineToolStation_var" is a variable referencing a MachineToolStation object.
#include <Cam/Machine/MachineToolStation.h>

// Get the value of the property.
string propertyValue = machineToolStation_var->toolInterface();

// Set the value of the property, where value_var is a string.
bool returnValue = machineToolStation_var->toolInterface(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


MachineToolStationInput Object

MachineToolStationInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object representing the set of inputs required to create a new MachineToolStation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
coolants | The coolants that this tool station can use. See MachineToolStationCoolant for possible values.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxToolDiameter | The maximum diameter in cm of the tool that can be held by this tool station.
maxToolLength | The maximum length in cm of the tool that can be held by this tool station.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
toolInterface | The type of interface that this tool station uses. (e.g. BT40, CAPTO C5, HSK A100, SK50, etc.) Note: All newline characters will be removed, and if the string contains only ASCII characters, it will be converted to uppercase.

Accessed From

MachinePartInput.createToolStationInput, MachinePartInput.toolStationInput

Version

Introduced in version July 2025


MachineToolStationInput.classType Method

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachineToolStationInput.classType()
This is a static method.

#include <Cam/Machine/MachineToolStationInput.h>

returnValue = adsk::cam::MachineToolStationInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MachineToolStationInput.coolants Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

The coolants that this tool station can use. See MachineToolStationCoolant for possible values.

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.coolants

# Set the value of the property.
machineToolStationInput_var.coolants = propertyValue
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
std::vector<integer> propertyValue = machineToolStationInput_var->coolants();

// Set the value of the property, where value_var is an integer.
bool returnValue = machineToolStationInput_var->coolants(value_var);

Property Value

This is a read/write property whose value is an array of type integer.

Version

Introduced in version July 2025


MachineToolStationInput.isValid Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.isValid
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
boolean propertyValue = machineToolStationInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MachineToolStationInput.maxToolDiameter Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

The maximum diameter in cm of the tool that can be held by this tool station.

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.maxToolDiameter

# Set the value of the property.
machineToolStationInput_var.maxToolDiameter = propertyValue
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
double propertyValue = machineToolStationInput_var->maxToolDiameter();

// Set the value of the property, where value_var is a double.
bool returnValue = machineToolStationInput_var->maxToolDiameter(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineToolStationInput.maxToolLength Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

The maximum length in cm of the tool that can be held by this tool station.

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.maxToolLength

# Set the value of the property.
machineToolStationInput_var.maxToolLength = propertyValue
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
double propertyValue = machineToolStationInput_var->maxToolLength();

// Set the value of the property, where value_var is a double.
bool returnValue = machineToolStationInput_var->maxToolLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


MachineToolStationInput.objectType Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.objectType
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
string propertyValue = machineToolStationInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MachineToolStationInput.toolInterface Property

Parent Object: MachineToolStationInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/MachineToolStationInput.h>

Description

The type of interface that this tool station uses. (e.g. BT40, CAPTO C5, HSK A100, SK50, etc.) Note: All newline characters will be removed, and if the string contains only ASCII characters, it will be converted to uppercase.

Syntax

  • Python
  • C++
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.

# Get the value of the property.
propertyValue = machineToolStationInput_var.toolInterface

# Set the value of the property.
machineToolStationInput_var.toolInterface = propertyValue
"machineToolStationInput_var" is a variable referencing a MachineToolStationInput object.
#include <Cam/Machine/MachineToolStationInput.h>

// Get the value of the property.
string propertyValue = machineToolStationInput_var->toolInterface();

// Set the value of the property, where value_var is a string.
bool returnValue = machineToolStationInput_var->toolInterface(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


MachiningTime Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Object returned when using the getMachiningTime method from the CAM class. Use the properties on this object to get the machining time results.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the feed distance in centimeters.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the machining time in seconds.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the calculated rapid distance in centimeters.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the number of tool changes.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Get the total feed time in seconds.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the total rapid feed time in seconds.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/MachiningTime.h>

Description

Gets the total tool change time in seconds.

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


ManufacturingModel Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Represents a ManufacturingModel within a CAM design. A Manufacturing Model is a derive of the Design scene, which can be augmented without any effects of the original Design.

Methods

Name | Description
activate | Makes the ManufacturingModel the active edit target in the user interface. This is the same as enabling the radio button next to the occurrence in the browser.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 ManufacturingModel. If this is part of a setup, the reference to this will be lost. The deletion makes that reference invalid.
duplicate | Creates and returns a copy of the ManufacturingModel, within its parent collection. The newly created ManufacturingModel will have a new unique name assigned.
syncManufacturingModel | Preview Checks whether changes to the original design have been made. If so, the given manufacturing model is synchronized with its source.

Properties

Name | Description
id | Gets the unique identifier of the ManufacturingModel within the document.
isActive | Gets whether this ManufacturingModel is active in the user interface. This is the same as checking the state of the radio button next to the ManufacturingModel in the browser. To activate the ManufacturingModel use the Activate method.
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 display name of the ManufacturingModel. This is the name that will be shown in the browser and other locations.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrence | Returns the occurrence for that ManufacturingModel.

Accessed From

ManufacturingModel.duplicate, ManufacturingModels.add, ManufacturingModels.item, ManufacturingModels.itemById, ManufacturingModels.itemByName

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version April 2023


ManufacturingModel.activate Method

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Makes the ManufacturingModel the active edit target in the user interface. This is the same as enabling the radio button next to the occurrence in the browser.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
returnValue = manufacturingModel_var.activate()
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

#include <Cam/ManufacturingModels/ManufacturingModel.h>

returnValue = manufacturingModel_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version April 2023


ManufacturingModel.classType Method

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ManufacturingModel.classType()
This is a static method.

#include <Cam/ManufacturingModels/ManufacturingModel.h>

returnValue = adsk::cam::ManufacturingModel::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ManufacturingModel.deleteMe Method

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Deletes this ManufacturingModel. If this is part of a setup, the reference to this will be lost. The deletion makes that reference invalid.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
returnValue = manufacturingModel_var.deleteMe()
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

#include <Cam/ManufacturingModels/ManufacturingModel.h>

returnValue = manufacturingModel_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete is successful.

Version

Introduced in version April 2023


ManufacturingModel.duplicate Method

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Creates and returns a copy of the ManufacturingModel, within its parent collection. The newly created ManufacturingModel will have a new unique name assigned.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
returnValue = manufacturingModel_var.duplicate()
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

#include <Cam/ManufacturingModels/ManufacturingModel.h>

returnValue = manufacturingModel_var->duplicate();

Return Value

Type | Description
ManufacturingModel | Returns the newly created ManufacturingModel copy.

Version

Introduced in version April 2023


ManufacturingModel.id Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Gets the unique identifier of the ManufacturingModel within the document.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.id
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
string propertyValue = manufacturingModel_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ManufacturingModel.isActive Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Gets whether this ManufacturingModel is active in the user interface. This is the same as checking the state of the radio button next to the ManufacturingModel in the browser. To activate the ManufacturingModel use the Activate method.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.isActive
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
boolean propertyValue = manufacturingModel_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ManufacturingModel.isValid Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.isValid
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
boolean propertyValue = manufacturingModel_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ManufacturingModel.name Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Gets or sets the display name of the ManufacturingModel. This is the name that will be shown in the browser and other locations.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.name

# Set the value of the property.
manufacturingModel_var.name = propertyValue
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
string propertyValue = manufacturingModel_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = manufacturingModel_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


ManufacturingModel.objectType Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.objectType
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
string propertyValue = manufacturingModel_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ManufacturingModel.occurrence Property

Parent Object: ManufacturingModel
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Returns the occurrence for that ManufacturingModel.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

# Get the value of the property.
propertyValue = manufacturingModel_var.occurrence
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
#include <Cam/ManufacturingModels/ManufacturingModel.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = manufacturingModel_var->occurrence();

Property Value

This is a read only property whose value is an Occurrence.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version April 2023


ManufacturingModel.syncManufacturingModel Method

Parent Object: ManufacturingModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModel.h>

Description

Checks whether changes to the original design have been made. If so, the given manufacturing model is synchronized with its source.

Syntax

  • Python
  • C++
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.
returnValue = manufacturingModel_var.syncManufacturingModel()
"manufacturingModel_var" is a variable referencing a ManufacturingModel object.

#include <Cam/ManufacturingModels/ManufacturingModel.h>

returnValue = manufacturingModel_var->syncManufacturingModel();

Return Value

Type | Description
boolean | Returns true if the manufacturing model needed an update.

Version

Introduced in version March 2024


ManufacturingModelInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModelInput.h>

Description

This class defines the methods and properties that pertain to the definition of a ManufacturingModel.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Name of the new ManufacturingModel. The name is displayed in the browser tree.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ManufacturingModels.createInput

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


ManufacturingModelInput.classType Method

Parent Object: ManufacturingModelInput
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModelInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ManufacturingModelInput.classType()
This is a static method.

#include <Cam/ManufacturingModels/ManufacturingModelInput.h>

returnValue = adsk::cam::ManufacturingModelInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ManufacturingModelInput.isValid Property

Parent Object: ManufacturingModelInput
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModelInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.

# Get the value of the property.
propertyValue = manufacturingModelInput_var.isValid
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.
#include <Cam/ManufacturingModels/ManufacturingModelInput.h>

// Get the value of the property.
boolean propertyValue = manufacturingModelInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ManufacturingModelInput.name Property

Parent Object: ManufacturingModelInput
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModelInput.h>

Description

Name of the new ManufacturingModel. The name is displayed in the browser tree.

Syntax

  • Python
  • C++
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.

# Get the value of the property.
propertyValue = manufacturingModelInput_var.name

# Set the value of the property.
manufacturingModelInput_var.name = propertyValue
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.
#include <Cam/ManufacturingModels/ManufacturingModelInput.h>

// Get the value of the property.
string propertyValue = manufacturingModelInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = manufacturingModelInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


ManufacturingModelInput.objectType Property

Parent Object: ManufacturingModelInput
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModelInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.

# Get the value of the property.
propertyValue = manufacturingModelInput_var.objectType
"manufacturingModelInput_var" is a variable referencing a ManufacturingModelInput object.
#include <Cam/ManufacturingModels/ManufacturingModelInput.h>

// Get the value of the property.
string propertyValue = manufacturingModelInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ManufacturingModels Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Referenced from CAM product to access manufacturing models in document.

Methods

Name | Description
add | Create a new ManufacturingModel.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 new ManufacturingModelInput object. Use properties and methods on this object to define the ManufacturingModel you want to create and then use the Add method, passing in the ManufacturingModelInput object.
item | Get ManufacturingModel by index in collection.
itemById | Returns ManufacturingModel with given id.
itemByName | Returns all ManufacturingModel with given name (as appears in the browser).
syncAllManufacturingModels | Preview Checks wether changes to the original design have been made. If so, all manufacturing models are synchronized with their sources.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.manufacturingModels

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


ManufacturingModels.add Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Create a new ManufacturingModel.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.add(input)
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->add(input);

Return Value

Type | Description
ManufacturingModel | Returns the newly created ManufacturingModel.

Parameters

Name | Type | Description
input | ManufacturingModelInput | A ManufacturingModelInput object that defines the desired ManufacturingModel. Use the createInput method to create a new ManufacturingModelInput object and then use methods on it to define the ManufacturingModel.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


ManufacturingModels.classType Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ManufacturingModels.classType()
This is a static method.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = adsk::cam::ManufacturingModels::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ManufacturingModels.count Property

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

# Get the value of the property.
propertyValue = manufacturingModels_var.count
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
#include <Cam/ManufacturingModels/ManufacturingModels.h>

// Get the value of the property.
uinteger propertyValue = manufacturingModels_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


ManufacturingModels.createInput Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Create a new ManufacturingModelInput object. Use properties and methods on this object to define the ManufacturingModel you want to create and then use the Add method, passing in the ManufacturingModelInput object.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.createInput()
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->createInput();

Return Value

Type | Description
ManufacturingModelInput | Returns new ManufacturingModelInput object.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


ManufacturingModels.isValid Property

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

# Get the value of the property.
propertyValue = manufacturingModels_var.isValid
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
#include <Cam/ManufacturingModels/ManufacturingModels.h>

// Get the value of the property.
boolean propertyValue = manufacturingModels_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ManufacturingModels.item Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Get ManufacturingModel by index in collection.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.item(index)
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->item(index);

Return Value

Type | Description
ManufacturingModel | Returns ManufacturingModel at given index.

Parameters

Name | Type | Description
index | uinteger |

Version

Introduced in version April 2023


ManufacturingModels.itemById Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Returns ManufacturingModel with given id.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.itemById(id)
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->itemById(id);

Return Value

Type | Description
ManufacturingModel | Returns ManufacturingModel with the specified id or null if no ManufacturingModel has that id.

Parameters

Name | Type | Description
id | string | The id of the ManufacturingModel.

Version

Introduced in version April 2023


ManufacturingModels.itemByName Method

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Returns all ManufacturingModel with given name (as appears in the browser).

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.itemByName(name)
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->itemByName(name);

Return Value

Type | Description
ManufacturingModel[] | Returns all ManufacturingModel with the specified name.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the ManufacturingModel.

Version

Introduced in version April 2023


ManufacturingModels.objectType Property

Parent Object: ManufacturingModels
Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

# Get the value of the property.
propertyValue = manufacturingModels_var.objectType
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
#include <Cam/ManufacturingModels/ManufacturingModels.h>

// Get the value of the property.
string propertyValue = manufacturingModels_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ManufacturingModels.syncAllManufacturingModels Method

Parent Object: ManufacturingModels

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/ManufacturingModels/ManufacturingModels.h>

Description

Checks wether changes to the original design have been made. If so, all manufacturing models are synchronized with their sources.

Syntax

  • Python
  • C++
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.
returnValue = manufacturingModels_var.syncAllManufacturingModels()
"manufacturingModels_var" is a variable referencing a ManufacturingModels object.

#include <Cam/ManufacturingModels/ManufacturingModels.h>

returnValue = manufacturingModels_var->syncAllManufacturingModels();

Return Value

Type | Description
boolean | Returns true if any manufacturing model needed an update.

Version

Introduced in version March 2024


MarkingMenuEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

A MarkingMenuEvent is fired when the marking menu and context menu are displayed. For example, in response to the markingMenuDisplaying event.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

Add a handler to be notified when the event occurs.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


MarkingMenuEvent.classType Method

Parent Object: MarkingMenuEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

The MarkingMenuEventArgs provides information associated with the marking and context menu being displayed.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

Provides access to the linear marking menu.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


MarkingMenuEventArgs.objectType Property

Parent Object: MarkingMenuEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

Description

Provides access to the radial marking menu.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


MarkingMenuEventArgs.selectedEntities Property

Parent Object: MarkingMenuEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventArgs.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


MarkingMenuEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventHandler.h>

Description

The MarkingMenuEventHandler is a client implemented class that can be added as a handler to a MarkingMenuEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version January 2017


MarkingMenuEventHandler.notify Method

Parent Object: MarkingMenuEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MarkingMenuEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"markingMenuEventHandler_var" is a variable referencing a MarkingMenuEventHandler object.
returnValue = markingMenuEventHandler_var.notify(eventArgs)
"markingMenuEventHandler_var" is a variable referencing a MarkingMenuEventHandler object.

#include <Core/UserInterface/MarkingMenuEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

A material.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** Copies this material to the specified target.
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.
description | Gets and sets the description associated with this material. Setting the description is only valid for materials in a document or the favorites list.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the Parent object (a Library or a Design).

Accessed From

BRepBody.material, Component.material, ConfigurationMaterialCell.material, FavoriteMaterials.add, FavoriteMaterials.item, FavoriteMaterials.itemById, FavoriteMaterials.itemByName, FlatPatternComponent.material, Material.copyTo, MaterialPreferences.defaultMaterial, Materials.addByCopy, Materials.item, Materials.itemById, Materials.itemByName, MeshBody.material, PlasticRule.material

Version

Introduced in version August 2014


Material.appearance Property

Parent Object: Material
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Gets the Appearance of this material.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Copies this material to the specified target.

Remarks

This method has been retired and replaced by the addByCopyMethod on the Materials object.

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
Retired in version July 2023


Material.deleteMe Method

Parent Object: Material
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Deletes the material from the Design. This method only applies to materials in a Design that are unused

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.description Property

Parent Object: Material
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Gets and sets the description associated with this material. Setting the description is only valid for materials in a document or the favorites list.

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.description

# Set the value of the property.
material_var.description = 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->description();

// Set the value of the property, where value_var is a string.
bool returnValue = material_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2023


Material.id Property

Parent Object: Material
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Returns the unique internal ID of this material.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Returns true if this material is used in the Design

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Returns the collection of material properties associated with this material.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Material.h>

Description

Returns the Parent object (a Library or a Design).

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

The MaterialLibraries collection object provides access to currently loaded Material and Appearance libraries

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.materialLibraries

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version August 2014


MaterialLibraries.classType Method

Parent Object: MaterialLibraries
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

The number of Material Libraries in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Method that returns the specified Material Library using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Returns the Material Library at the specified ID.

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.

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Version

Introduced in version August 2014


MaterialLibraries.itemByName Method

Parent Object: MaterialLibraries
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Returns the specified Material Library using the name as seen in the user interface.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

Loads the specified existing local material library. Fusion 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibraries.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

A material library.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MaterialLibraries.item, MaterialLibraries.itemById, MaterialLibraries.itemByName, MaterialLibraries.load

Samples

Name Description
Avoid Machine Surface Settings API Sample

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.
Create Engravings Selection Sets API Sample

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


MaterialLibrary.appearances Property

Parent Object: MaterialLibrary
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Returns the appearances defined within this library.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014


MaterialLibrary.classType Method

Parent Object: MaterialLibrary
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

The unique internal ID of this Library.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Gets if this is a native material library. Native libraries are those that are delivered with Fusion 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Returns the materials defined within this library.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Property that gets the name of this Library. This is the localized name shown in the user interface.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/MaterialLibrary.h>

Description

Unloads this material from Fusion. Only non-native material libraries can be unloaded. You can determine this by checking the isNative property.

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
Material API Sample | Demonstrates using materials and appearance using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version March 2017


MaterialPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

Description

Provides access to the material related preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.materialPreferences

Version

Introduced in version August 2014


MaterialPreferences.appearanceOverride Property

Parent Object: MaterialPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

Description

Gets and sets the default material.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MaterialPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

Collection of materials within a Library or Design.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.materials, FlatPatternProduct.materials, MaterialLibrary.materials, WorkingModel.materials

Version

Introduced in version August 2014


Materials.addByCopy Method

Parent Object: Materials
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

The number of Materials in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

Returns the specified Material using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

Returns the Material by it's internal unique ID.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Materials/Materials.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Canvas.transform, CanvasInput.transform, Matrix2D.copy, Matrix2D.create

Version

Introduced in version August 2014


Matrix2D.asArray Method

Parent Object: Matrix2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Returns the contents of the matrix as a 9 element array.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Creates an independent copy of this matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Creates a transient 2D matrix (3x3) object. It is initialized as an identity matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Returns the determinant of the matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Gets the matrix data as the components that define a coordinate system.

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;
void returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Gets the value of the specified cell in the 3x3 matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Invert this matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Compares this matrix with another matrix and returns True if they're identical.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Sets the specified cell in the 3x3 matrix to the specified value.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Resets this matrix to be an identity matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Sets this matrix to the matrix of rotation by the specified angle, through the specified origin.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Sets the contents of the array using a 9 element array.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Reset this matrix to align with a specific coordinate system.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix2D.h>

Description

Transforms this matrix using the input matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
translation | Gets and sets the translation component of the matrix.

Accessed From

AsBuiltJoint.transform, ConstructionPlane.transform, CustomGraphicsBRepBody.transform, CustomGraphicsCurve.transform, CustomGraphicsEntity.transform, CustomGraphicsGroup.transform, CustomGraphicsLines.transform, CustomGraphicsMesh.transform, CustomGraphicsPointSet.transform, CustomGraphicsText.transform, Decal.transform, DecalInput.transform, Joint.geometryOneTransform, Joint.geometryTwoTransform, JointOrigin.transform, Matrix3D.copy, Matrix3D.create, Matrix3DGraphNodeProperty.value, MoveFeature.transform, MoveFeatureFreeMoveDefinition.transform, MoveFeatureInput.transform, Occurrence.initialTransform, Occurrence.transform, Occurrence.transform2, OptimizedOrientationResult.transformation, PatternElement.transform, ProjectedTextureMapControl.transform, SectionAnalysis.initialPosition, SectionAnalysis.transform, SectionAnalysisInput.initialPosition, SectionAnalysisInput.transform, Setup.workCoordinateSystem, Sketch.transform, SVGImportOptions.transform, TextureMapControl3D.transform, TriadCommandInput.lastTransform, TriadCommandInput.positionTransform, TriadCommandInput.transform, Viewport.modelToViewSpaceTransform

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.

Version

Introduced in version August 2014


Matrix3D.asArray Method

Parent Object: Matrix3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Returns the contents of the matrix as a 16 element array.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Creates an independent copy of this matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Creates a transient 3d matrix object. It is initialized as an identity matrix and is created statically using the Matrix3D.create method.

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.

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.

Version

Introduced in version August 2014


Matrix3D.determinant Property

Parent Object: Matrix3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Returns the determinant of the matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Gets the matrix data as the components that define a coordinate system.

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;
void returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Gets the value of the specified cell in the 4x4 matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Inverts this matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Compares this matrix with another matrix and returns True if they're identical.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Sets the specified cell in the 4x4 matrix to the specified value.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Resets this matrix to an identify matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

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

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Sets this matrix to the matrix of rotation by the specified angle, through the specified origin, around the specified axis

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Matrix3D.setWithArray Method

Parent Object: Matrix3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Sets the contents of the array using a 16 element array.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Sets the matrix based on the components of a coordinate system.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Transforms this matrix using the input matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Matrix3D.h>

Description

Gets and sets the translation component of the matrix.

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.

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.

Version

Introduced in version August 2014


Matrix3DGraphNodeProperty Object

Matrix3DGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a 3D Matrix.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.classType Method

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.Matrix3DGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

returnValue = adsk::volume::Matrix3DGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.description Property

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = matrix3DGraphNodeProperty_var.description
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.
#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = matrix3DGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.isValid Property

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = matrix3DGraphNodeProperty_var.isValid
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.
#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = matrix3DGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.name Property

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = matrix3DGraphNodeProperty_var.name
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.
#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = matrix3DGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.objectType Property

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = matrix3DGraphNodeProperty_var.objectType
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.
#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = matrix3DGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Matrix3DGraphNodeProperty.value Property

Parent Object: Matrix3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = matrix3DGraphNodeProperty_var.value

# Set the value of the property.
matrix3DGraphNodeProperty_var.value = propertyValue
"matrix3DGraphNodeProperty_var" is a variable referencing a Matrix3DGraphNodeProperty object.
#include <Volume/Volumetric/Matrix3DGraphNodeProperty.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = matrix3DGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = matrix3DGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version May 2025


MeasureManager Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

The MeasurementManager class provides some generic measurement utilities that can be used for most entity types.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.measureManager

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.classType Method

Parent Object: MeasureManager
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

Measures the angle between the input geometry.

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 Construction 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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

Measures the minimum distance between the two input geometries.

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, BRepBody, BRepFace, BRepEdge, BRepVertex, ConstructionPlane, ConstructionAxis, ConstructionPoint, and any sketch entity. The only temporary geometry supported is the Plane object.
geometryTwo | Base | The first geometry to measure from. This can be an Occurrence, BRepBody, BRepFace, BRepEdge, BRepVertex, ConstructionPlane, ConstructionAxis, ConstructionPoint, and any sketch entity. The only temporary geometry supported is the Plane object.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.objectType Property

Parent Object: MeasureManager
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

Description

Provides measurement results from the various measurement methods available on the MeasureManager object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

Description

This point is only used for angle measurements and is one of the three points defining the angle.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/MeasureResults.h>

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.

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


MergeFacesFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a merge face feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Merge is created based on geometry (e.g. faces) in another component AND (Merge) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
inputFaces | Gets and sets an array of BRepFace objects that define the faces the merge will be performed on. The faces need to be connected and from the same body (solid or surface).
isChainSelection | Get and sets whether or not faces that are tangentially connected and from the same body (solid or surface) will be included in the faces to merge
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MergeFacesFeatures.createInput

Version

Introduced in version September 2024


MergeFacesFeatureInput.classType Method

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MergeFacesFeatureInput.classType()
This is a static method.

#include <Fusion/Features/MergeFacesFeatureInput.h>

returnValue = adsk::fusion::MergeFacesFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MergeFacesFeatureInput.creationOccurrence Property

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Merge is created based on geometry (e.g. faces) in another component AND (Merge) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Syntax

  • Python
  • C++
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.

# Get the value of the property.
propertyValue = mergeFacesFeatureInput_var.creationOccurrence

# Set the value of the property.
mergeFacesFeatureInput_var.creationOccurrence = propertyValue
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.
#include <Fusion/Features/MergeFacesFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = mergeFacesFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = mergeFacesFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version September 2024


MergeFacesFeatureInput.inputFaces Property

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

Gets and sets an array of BRepFace objects that define the faces the merge will be performed on. The faces need to be connected and from the same body (solid or surface).

Syntax

  • Python
  • C++
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.

# Get the value of the property.
propertyValue = mergeFacesFeatureInput_var.inputFaces

# Set the value of the property.
mergeFacesFeatureInput_var.inputFaces = propertyValue
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.
#include <Fusion/Features/MergeFacesFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = mergeFacesFeatureInput_var->inputFaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = mergeFacesFeatureInput_var->inputFaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version September 2024


MergeFacesFeatureInput.isChainSelection Property

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

Get and sets whether or not faces that are tangentially connected and from the same body (solid or surface) will be included in the faces to merge

Syntax

  • Python
  • C++
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.

# Get the value of the property.
propertyValue = mergeFacesFeatureInput_var.isChainSelection

# Set the value of the property.
mergeFacesFeatureInput_var.isChainSelection = propertyValue
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.
#include <Fusion/Features/MergeFacesFeatureInput.h>

// Get the value of the property.
boolean propertyValue = mergeFacesFeatureInput_var->isChainSelection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = mergeFacesFeatureInput_var->isChainSelection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


MergeFacesFeatureInput.isValid Property

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.

# Get the value of the property.
propertyValue = mergeFacesFeatureInput_var.isValid
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.
#include <Fusion/Features/MergeFacesFeatureInput.h>

// Get the value of the property.
boolean propertyValue = mergeFacesFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MergeFacesFeatureInput.objectType Property

Parent Object: MergeFacesFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.

# Get the value of the property.
propertyValue = mergeFacesFeatureInput_var.objectType
"mergeFacesFeatureInput_var" is a variable referencing a MergeFacesFeatureInput object.
#include <Fusion/Features/MergeFacesFeatureInput.h>

// Get the value of the property.
string propertyValue = mergeFacesFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MergeFacesFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

A collection object that supports the ability to merge faces. Merging faces is currently limited to a Direct Modeling design or a body in a base feature. The result of merging faces is a direct B-Rep modification, and the change is not represented as a feature in the browser. As a result, a MergeFacesFeature object does not exist, and this collection only supports the merging faces and not accessing any existing features.

Methods

Name | Description
add | Creates a new merge 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 MergeFacesFeatureInput object for defining a simple merge face feature. Use properties and methods on this object to define the merge you want to create and then use the Add method, passing in the MergeFacesFeatureInput 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.mergeFacesFeatures

Version

Introduced in version September 2024


MergeFacesFeatures.add Method

Parent Object: MergeFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

Creates a new merge face feature.

Syntax

  • Python
  • C++
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.
returnValue = mergeFacesFeatures_var.add(input)
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.

#include <Fusion/Features/MergeFacesFeatures.h>

returnValue = mergeFacesFeatures_var->add(input);

Return Value

Type | Description
boolean | Returns true if successful. Because this is limited to direct modelling only that directly modifies the B-Rep body and does not create a MergeFacesFeature object there is nothing to return besides if the merge was successful or no.

Parameters

Name | Type | Description
input | MergeFacesFeatureInput | A MergeFacesFeatureInput object that defines the desired merge. Use the createInput method to create a new MergeFacesFeatureInput object and then use methods on it (the MergeFacesFeatureInput object) to define the merge.

Version

Introduced in version September 2024


MergeFacesFeatures.classType Method

Parent Object: MergeFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MergeFacesFeatures.classType()
This is a static method.

#include <Fusion/Features/MergeFacesFeatures.h>

returnValue = adsk::fusion::MergeFacesFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


MergeFacesFeatures.createInput Method

Parent Object: MergeFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

Creates a MergeFacesFeatureInput object for defining a simple merge face feature. Use properties and methods on this object to define the merge you want to create and then use the Add method, passing in the MergeFacesFeatureInput object.

Syntax

  • Python
  • C++
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.
# Uses no optional arguments.
returnValue = mergeFacesFeatures_var.createInput(inputFaces)

# Uses optional arguments.
returnValue = mergeFacesFeatures_var.createInput(inputFaces, isChainSelection)
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.

#include <Fusion/Features/MergeFacesFeatures.h>

// Uses no optional arguments.
returnValue = mergeFacesFeatures_var->createInput(inputFaces);

// Uses optional arguments.
returnValue = mergeFacesFeatures_var->createInput(inputFaces, isChainSelection);

Return Value

Type | Description
MergeFacesFeatureInput | Returns the newly created MergeFacesFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputFaces | BRepFace[] | An array of BRepFace objects that define the faces the merge will be performed on. The faces need to be connected and from the same body (solid or surface).
isChainSelection | boolean | A boolean value for setting whether or not faces that are connected and from the same body (solid or surface) will be included in the faces to merge. The default value is false. This is an optional argument whose default value is False.

Version

Introduced in version September 2024


MergeFacesFeatures.isValid Property

Parent Object: MergeFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.

# Get the value of the property.
propertyValue = mergeFacesFeatures_var.isValid
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.
#include <Fusion/Features/MergeFacesFeatures.h>

// Get the value of the property.
boolean propertyValue = mergeFacesFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


MergeFacesFeatures.objectType Property

Parent Object: MergeFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MergeFacesFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.

# Get the value of the property.
propertyValue = mergeFacesFeatures_var.objectType
"mergeFacesFeatures_var" is a variable referencing a MergeFacesFeatures object.
#include <Fusion/Features/MergeFacesFeatures.h>

// Get the value of the property.
string propertyValue = mergeFacesFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


MeshBodies Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Provides access to the MeshBodies in the parent Component and supports the creation of new mesh bodies.

Methods

Name | Description
add | Creates a new mesh body by importing an STL, OBJ or 3MF 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 | Creates 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.meshBodies, FlatPatternComponent.meshBodies

Version

Introduced in version August 2014


MeshBodies.add Method

Parent Object: MeshBodies
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Creates a new mesh body by importing an STL, OBJ or 3MF 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.

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, OBJ or 3MF 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. It is required in a parametric modeling design but is ignored in a direct modeling design. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


MeshBodies.addByTriangleMeshData Method

Parent Object: MeshBodies
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Creates a new mesh body using the mesh description provided.

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 | integer[] | 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 will automatically calculate normal vectors that are 90 degrees to the face of the triangle, making it appear flat.
normalIndexList | integer[] | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Returns the number of mesh bodies in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

Provides access to a mesh body within the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Provides access to a mesh body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Preview Copies the mesh body to the clipboard.
copyToComponent | Preview Creates a copy of this mesh body into the specified target.
createComponent | Preview 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 MeshBody object.
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.
cut | Preview Cuts the mesh body to the clipboard.
deleteMe | Deletes the mesh body.
findByTempId | Preview Returns the face group with the temporary id.
moveToComponent | Preview Moves this mesh body from it's current component into the root component or the component owned by the specified occurrence.

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.
area | Preview 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 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 a direct modeling design.
boundingBox | Preview Returns the bounding box of this mesh body.
displayMesh | Returns the associated mesh that is used for the display. This will always be triangles and includes any textures.
displayOverrides | Preview Gets the object that allows manipulation of overrides that control how the mesh is displayed in the interactive 3D view.
entityToken Returns a token for the MeshBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same mesh body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
faceGroups | Preview Returns a collection of all of the face groups in the body.
isClosed | Preview Check to see if the mesh is closed - i.e. contains no edges with only one triangle. Returns true if the mesh is closed, false if not.
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.
isOriented | Preview Check to see if the mesh is oriented - i.e. every edge has at most two triangles, and those triangles have consistent orientations. Returns true if the mesh is oriented, false if not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
orientedMinimumBoundingBox | Preview Returns an oriented bounding box of the body that is best oriented to tightly fit the body.
parentComponent | Returns the parent Component.
textureMapControl | Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to 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 MeshBody object.
volume | Preview Returns the volume in cm ^ 3. Returns 0 in the case the mesh body is not closed.

Accessed From

BaseFeature.meshBodies, FaceGroup.parentBody, MeshBodies.addByTriangleMeshData, MeshBodies.item, MeshBody.copyToComponent, MeshBody.createComponent, MeshBody.createForAssemblyContext, MeshBody.moveToComponent, MeshBody.nativeObject, MeshBodyList.item, MeshCombineFeature.targetBody, MeshCombineFeature.toolBodies, MeshCombineFeatureInput.targetBody, MeshCombineFeatureInput.toolBodies, MeshConvertFeature.inputBodies, MeshConvertFeatureInput.inputBodies, VolumetricModelToMeshFeature.meshBody

Version

Introduced in version August 2014


MeshBody.appearance Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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.area Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the area in cm ^ 2.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.area
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
double propertyValue = meshBody_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2024


MeshBody.assemblyContext Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the collection of attributes associated with this mesh body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

This property returns the base or form feature that this mesh body is associated with. It returns null in a direct modeling design.

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.boundingBox Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the bounding box of this mesh body.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.boundingBox
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = meshBody_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version January 2024


MeshBody.classType Method

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copy Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Copies the mesh body to the clipboard.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.copy()
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->copy();

Return Value

Type | Description
boolean | Returns true if the copy was successful.

Version

Introduced in version July 2025


MeshBody.copyToComponent Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Creates a copy of this mesh body into the specified target.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.copyToComponent(target)
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->copyToComponent(target);

Return Value

Type | Description
MeshBody | Returns the moved mesh body 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 mesh body will be copied into the parent component of the target occurrence and the target occurrence defines the transform of how the mesh body will be copied so that the body maintains it's same position with respect to the assembly.

Version

Introduced in version July 2025


MeshBody.createComponent Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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 MeshBody object.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.createComponent()
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->createComponent();

Return Value

Type | Description
MeshBody | Returns the MeshBody in the new component or null in the case the creation failed.

Version

Introduced in version January 2024


MeshBody.createForAssemblyContext Method

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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.cut Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Cuts the mesh body to the clipboard.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.cut()
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->cut();

Return Value

Type | Description
boolean | Returns true if the cut was successful.

Version

Introduced in version July 2025


MeshBody.deleteMe Method

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Deletes the mesh body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the associated mesh that is used for the display. This will always be triangles and includes any textures.

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.displayOverrides Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Gets the object that allows manipulation of overrides that control how the mesh is displayed in the interactive 3D view.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.displayOverrides
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<MeshBodyDisplayOverrides> propertyValue = meshBody_var->displayOverrides();

Property Value

This is a read only property whose value is a MeshBodyDisplayOverrides.

Version

Introduced in version May 2025


MeshBody.entityToken Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns a token for the MeshBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same mesh body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.entityToken
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
string propertyValue = meshBody_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


MeshBody.faceGroups Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns a collection of all of the face groups in the body.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.faceGroups
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<FaceGroups> propertyValue = meshBody_var->faceGroups();

Property Value

This is a read only property whose value is a FaceGroups.

Version

Introduced in version September 2024


MeshBody.findByTempId Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the face group with the temporary id.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.findByTempId(tempId)
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->findByTempId(tempId);

Return Value

Type | Description
Base | Returns the face group with the given tempId.

Parameters

Name | Type | Description
tempId | integer | The ID of the face group to find.

Version

Introduced in version September 2024


MeshBody.isClosed Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Check to see if the mesh is closed - i.e. contains no edges with only one triangle. Returns true if the mesh is closed, false if not.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isClosed
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


MeshBody.isLightBulbOn Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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.isOriented Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Check to see if the mesh is oriented - i.e. every edge has at most two triangles, and those triangles have consistent orientations. Returns true if the mesh is oriented, false if not.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isOriented
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isOriented();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


MeshBody.isSelectable Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Gets and sets if the mesh body is selectable in the graphics window.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Gets if the mesh body point is visible.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Gets and sets the physical material assigned to this mesh body.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the original mesh data that was imported. This can include triangles, quads, and polygons.

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.moveToComponent Method

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Moves this mesh body from it's current component into the root component or the component owned by the specified occurrence.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.moveToComponent(target)
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->moveToComponent(target);

Return Value

Type | Description
MeshBody | Returns the moved mesh body 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 mesh body will be moved into the parent component of the target occurrence and the target occurrence defines the transform of how the mesh body will be copied so that the body maintains it's same position with respect to the assembly.

Version

Introduced in version July 2025


MeshBody.name Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Gets and sets the name of the mesh body as displayed in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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.orientedMinimumBoundingBox Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns an oriented bounding box of the body that is best oriented to tightly fit the body.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.orientedMinimumBoundingBox
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<OrientedBoundingBox3D> propertyValue = meshBody_var->orientedMinimumBoundingBox();

Property Value

This is a read only property whose value is an OrientedBoundingBox3D.

Version

Introduced in version January 2025


MeshBody.parentComponent Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the parent Component.

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.textureMapControl Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to the body.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.textureMapControl
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<TextureMapControl> propertyValue = meshBody_var->textureMapControl();

Property Value

This is a read only property whose value is a TextureMapControl.

Version

Introduced in version May 2022


MeshBody.visibleOpacity Property

Parent Object: MeshBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

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.

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


MeshBody.volume Property

Parent Object: MeshBody

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBody.h>

Description

Returns the volume in cm ^ 3. Returns 0 in the case the mesh body is not closed.

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.volume
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
double propertyValue = meshBody_var->volume();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2024


MeshBodyDisplayOverrides Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

Container for overrides that control how the mesh is displayed in the interactive 3D view.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isSuppressFaceGroupColors | Controls whether the mesh body face group colors are shown. If set to true, the face groups will be shown with the assigned appearance, ignoring the current display settings.
isSuppressTriangleEdges | Controls whether the edges of the triangles of the mesh body are shown. If set to true, individual triangles will not be visible, edges of face groups (if any) will be shown instead.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MeshBody.displayOverrides

Version

Introduced in version May 2025


MeshBodyDisplayOverrides.classType Method

Parent Object: MeshBodyDisplayOverrides
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshBodyDisplayOverrides.classType()
This is a static method.

#include <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

returnValue = adsk::fusion::MeshBodyDisplayOverrides::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


MeshBodyDisplayOverrides.isSuppressFaceGroupColors Property

Parent Object: MeshBodyDisplayOverrides
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

Controls whether the mesh body face group colors are shown. If set to true, the face groups will be shown with the assigned appearance, ignoring the current display settings.

Syntax

  • Python
  • C++
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.

# Get the value of the property.
propertyValue = meshBodyDisplayOverrides_var.isSuppressFaceGroupColors

# Set the value of the property.
meshBodyDisplayOverrides_var.isSuppressFaceGroupColors = propertyValue
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.
#include <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

// Get the value of the property.
boolean propertyValue = meshBodyDisplayOverrides_var->isSuppressFaceGroupColors();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshBodyDisplayOverrides_var->isSuppressFaceGroupColors(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


MeshBodyDisplayOverrides.isSuppressTriangleEdges Property

Parent Object: MeshBodyDisplayOverrides
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

Controls whether the edges of the triangles of the mesh body are shown. If set to true, individual triangles will not be visible, edges of face groups (if any) will be shown instead.

Syntax

  • Python
  • C++
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.

# Get the value of the property.
propertyValue = meshBodyDisplayOverrides_var.isSuppressTriangleEdges

# Set the value of the property.
meshBodyDisplayOverrides_var.isSuppressTriangleEdges = propertyValue
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.
#include <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

// Get the value of the property.
boolean propertyValue = meshBodyDisplayOverrides_var->isSuppressTriangleEdges();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshBodyDisplayOverrides_var->isSuppressTriangleEdges(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


MeshBodyDisplayOverrides.isValid Property

Parent Object: MeshBodyDisplayOverrides
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.

# Get the value of the property.
propertyValue = meshBodyDisplayOverrides_var.isValid
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.
#include <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

// Get the value of the property.
boolean propertyValue = meshBodyDisplayOverrides_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


MeshBodyDisplayOverrides.objectType Property

Parent Object: MeshBodyDisplayOverrides
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.

# Get the value of the property.
propertyValue = meshBodyDisplayOverrides_var.objectType
"meshBodyDisplayOverrides_var" is a variable referencing a MeshBodyDisplayOverrides object.
#include <Fusion/MeshBody/MeshBodyDisplayOverrides.h>

// Get the value of the property.
string propertyValue = meshBodyDisplayOverrides_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


MeshBodyList Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

Provides access to a list of MeshBody objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MeshBodies.add

Version

Introduced in version August 2014


MeshBodyList.classType Method

Parent Object: MeshBodyList
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

Returns the number of mesh bodies in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

Provides access to a mesh body within the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshBodyList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


MeshCombineFaceGroupsFeature Object

MeshCombineFaceGroupsFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh combine face groups feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputFaceGroups Gets and sets the input face groups, which should be combined. They need to belong to the same mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
mesh | Gets the input mesh body. The actual mesh body is set implicitly by the input face groups.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshCombineFaceGroupsFeature.createForAssemblyContext, MeshCombineFaceGroupsFeature.nativeObject, MeshCombineFaceGroupsFeatures.add, MeshCombineFaceGroupsFeatures.item, MeshCombineFaceGroupsFeatures.itemByName

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.assemblyContext Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.assemblyContext
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshCombineFaceGroupsFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.attributes Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.attributes
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshCombineFaceGroupsFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.baseFeature Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.baseFeature
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshCombineFaceGroupsFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.bodies Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.bodies
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshCombineFaceGroupsFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.classType Method

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFaceGroupsFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

returnValue = adsk::fusion::MeshCombineFaceGroupsFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.createForAssemblyContext Method

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
returnValue = meshCombineFaceGroupsFeature_var.createForAssemblyContext(occurrence)
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

returnValue = meshCombineFaceGroupsFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshCombineFaceGroupsFeature | 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 2025


MeshCombineFaceGroupsFeature.deleteMe Method

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
returnValue = meshCombineFaceGroupsFeature_var.deleteMe()
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

returnValue = meshCombineFaceGroupsFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.dissolve Method

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
returnValue = meshCombineFaceGroupsFeature_var.dissolve()
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

returnValue = meshCombineFaceGroupsFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.entityToken Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.entityToken
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.errorOrWarningMessage Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.errorOrWarningMessage
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.faces Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.faces
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshCombineFaceGroupsFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.healthState Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.healthState
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshCombineFaceGroupsFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.inputFaceGroups Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Gets and sets the input face groups, which should be combined. They need to belong to the same mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.inputFaceGroups

# Set the value of the property.
meshCombineFaceGroupsFeature_var.inputFaceGroups = propertyValue
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
std::vector<Ptr<FaceGroup>> propertyValue = meshCombineFaceGroupsFeature_var->inputFaceGroups();

// Set the value of the property, where value_var is a FaceGroup.
bool returnValue = meshCombineFaceGroupsFeature_var->inputFaceGroups(value_var);

Property Value

This is a read/write property whose value is an array of type FaceGroup.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.isParametric Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.isParametric
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFaceGroupsFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.isSuppressed Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.isSuppressed

# Set the value of the property.
meshCombineFaceGroupsFeature_var.isSuppressed = propertyValue
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFaceGroupsFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshCombineFaceGroupsFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.isValid Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.isValid
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFaceGroupsFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.linkedFeatures Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.linkedFeatures
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshCombineFaceGroupsFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.mesh Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Gets the input mesh body. The actual mesh body is set implicitly by the input face groups.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.mesh
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshCombineFaceGroupsFeature_var->mesh();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.name Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.name

# Set the value of the property.
meshCombineFaceGroupsFeature_var.name = propertyValue
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshCombineFaceGroupsFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.nativeObject Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.nativeObject
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<MeshCombineFaceGroupsFeature> propertyValue = meshCombineFaceGroupsFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshCombineFaceGroupsFeature.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.objectType Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.objectType
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.parentComponent Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.parentComponent
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshCombineFaceGroupsFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeature.timelineObject Property

Parent Object: MeshCombineFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeature_var.timelineObject
"meshCombineFaceGroupsFeature_var" is a variable referencing a MeshCombineFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshCombineFaceGroupsFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput Object

MeshCombineFaceGroupsFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh combine face groups feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
inputFaceGroups | Gets and sets the input face groups, which should be combined. They need to belong to the same mesh body.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

MeshCombineFaceGroupsFeatures.createInput

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput.classType Method

Parent Object: MeshCombineFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFaceGroupsFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

returnValue = adsk::fusion::MeshCombineFaceGroupsFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput.inputFaceGroups Property

Parent Object: MeshCombineFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

Description

Gets and sets the input face groups, which should be combined. They need to belong to the same mesh body.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatureInput_var.inputFaceGroups

# Set the value of the property.
meshCombineFaceGroupsFeatureInput_var.inputFaceGroups = propertyValue
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<FaceGroup>> propertyValue = meshCombineFaceGroupsFeatureInput_var->inputFaceGroups();

// Set the value of the property, where value_var is a FaceGroup.
bool returnValue = meshCombineFaceGroupsFeatureInput_var->inputFaceGroups(value_var);

Property Value

This is a read/write property whose value is an array of type FaceGroup.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput.isValid Property

Parent Object: MeshCombineFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatureInput_var.isValid
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshCombineFaceGroupsFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput.objectType Property

Parent Object: MeshCombineFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatureInput_var.objectType
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatureInput.targetBaseFeature Property

Parent Object: MeshCombineFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshCombineFaceGroupsFeatureInput_var.targetBaseFeature = propertyValue
"meshCombineFaceGroupsFeatureInput_var" is a variable referencing a MeshCombineFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshCombineFaceGroupsFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshCombineFaceGroupsFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures Object

MeshCombineFaceGroupsFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh combine face groups features in a component and supports the ability to create new mesh face group combine features.

Methods

Name | Description
add | Creates a mesh combine face groups 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 MeshCombineFaceGroupsFeatureInput object. Use properties and methods on this object to define the mesh combine face groups feature you want to create and then use the add method, passing in the MeshCombineFaceGroupsFeatureInput object.
item | Function that returns the specified mesh combine face groups feature using an index into the collection.
itemByName | Function that returns the specified MeshCombineFaceGroups feature using the name of the feature.

Properties

Name | Description
count | The number of mesh combine face groups 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshCombineFaceGroupsFeatures

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.add Method

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Creates a mesh combine face groups feature.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
returnValue = meshCombineFaceGroupsFeatures_var.add(input)
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

returnValue = meshCombineFaceGroupsFeatures_var->add(input);

Return Value

Type | Description
MeshCombineFaceGroupsFeature | Returns the newly created MeshCombineFaceGroupsFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshCombineFaceGroupsFeatureInput | A MeshCombineFaceGroupsFeatureInput object that defines the desired mesh combine face groups feature. Use the createInput method to create a new MeshCombineFaceGroupsFeatureInput object and then use methods on it (the MeshCombineFaceGroupsFeatureInput object) to define the mesh combine face groups feature.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.classType Method

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFaceGroupsFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

returnValue = adsk::fusion::MeshCombineFaceGroupsFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.count Property

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

The number of mesh combine face groups features in the collection.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatures_var.count
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshCombineFaceGroupsFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.createInput Method

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Creates a MeshCombineFaceGroupsFeatureInput object. Use properties and methods on this object to define the mesh combine face groups feature you want to create and then use the add method, passing in the MeshCombineFaceGroupsFeatureInput object.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
returnValue = meshCombineFaceGroupsFeatures_var.createInput(inputFaceGroups)
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

returnValue = meshCombineFaceGroupsFeatures_var->createInput(inputFaceGroups);

Return Value

Type | Description
MeshCombineFaceGroupsFeatureInput | Returns the newly created MeshCombineFaceGroupsFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputFaceGroups | FaceGroup[] | A array with face groups belonging to the same mesh. The mesh can be in either a parametric or direct modeling design.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.isValid Property

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatures_var.isValid
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

// Get the value of the property.
boolean propertyValue = meshCombineFaceGroupsFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFaceGroupsFeatures.item Method

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Function that returns the specified mesh combine face groups feature using an index into the collection.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
returnValue = meshCombineFaceGroupsFeatures_var.item(index)
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

returnValue = meshCombineFaceGroupsFeatures_var->item(index);

Return Value

Type | Description
MeshCombineFaceGroupsFeature | 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 2025


MeshCombineFaceGroupsFeatures.itemByName Method

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

Function that returns the specified MeshCombineFaceGroups feature using the name of the feature.

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
returnValue = meshCombineFaceGroupsFeatures_var.itemByName(name)
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

returnValue = meshCombineFaceGroupsFeatures_var->itemByName(name);

Return Value

Type | Description
MeshCombineFaceGroupsFeature | 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 January 2025


MeshCombineFaceGroupsFeatures.objectType Property

Parent Object: MeshCombineFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshCombineFaceGroupsFeatures_var.objectType
"meshCombineFaceGroupsFeatures_var" is a variable referencing a MeshCombineFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshCombineFaceGroupsFeatures.h>

// Get the value of the property.
string propertyValue = meshCombineFaceGroupsFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeature Object

MeshCombineFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh combine feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isKeepToolBodies | Preserves a copy of each tool body.
isNewComponent | Creates a new component to contain combined mesh bodies. Default value is false.
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.
meshCombineOperationType | Gets and sets the operation type of mesh combine.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
targetBody | Gets and sets the input targetBody.
timelineObject | Returns the timeline object associated with this feature.
toolBodies

Accessed From

MeshCombineFeature.createForAssemblyContext, MeshCombineFeature.nativeObject, MeshCombineFeatures.add, MeshCombineFeatures.item, MeshCombineFeatures.itemByName

Version

Introduced in version January 2025


MeshCombineFeature.assemblyContext Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.assemblyContext
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshCombineFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2025


MeshCombineFeature.attributes Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.attributes
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshCombineFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2025


MeshCombineFeature.baseFeature Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.baseFeature
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshCombineFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshCombineFeature.bodies Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.bodies
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshCombineFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2025


MeshCombineFeature.classType Method

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFeature.h>

returnValue = adsk::fusion::MeshCombineFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFeature.createForAssemblyContext Method

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
returnValue = meshCombineFeature_var.createForAssemblyContext(occurrence)
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

#include <Fusion/MeshBody/MeshCombineFeature.h>

returnValue = meshCombineFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshCombineFeature | 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 2025


MeshCombineFeature.deleteMe Method

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
returnValue = meshCombineFeature_var.deleteMe()
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

#include <Fusion/MeshBody/MeshCombineFeature.h>

returnValue = meshCombineFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2025


MeshCombineFeature.dissolve Method

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
returnValue = meshCombineFeature_var.dissolve()
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

#include <Fusion/MeshBody/MeshCombineFeature.h>

returnValue = meshCombineFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2025


MeshCombineFeature.entityToken Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.entityToken
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeature.errorOrWarningMessage Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.errorOrWarningMessage
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeature.faces Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.faces
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshCombineFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2025


MeshCombineFeature.healthState Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.healthState
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshCombineFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2025


MeshCombineFeature.isKeepToolBodies Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Preserves a copy of each tool body.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.isKeepToolBodies

# Set the value of the property.
meshCombineFeature_var.isKeepToolBodies = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeature_var->isKeepToolBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshCombineFeature_var->isKeepToolBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeature.isNewComponent Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Creates a new component to contain combined mesh bodies. Default value is false.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.isNewComponent
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeature_var->isNewComponent();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeature.isParametric Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.isParametric
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeature.isSuppressed Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.isSuppressed

# Set the value of the property.
meshCombineFeature_var.isSuppressed = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshCombineFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeature.isValid Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.isValid
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeature.linkedFeatures Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.linkedFeatures
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshCombineFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2025


MeshCombineFeature.meshCombineOperationType Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Gets and sets the operation type of mesh combine.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.meshCombineOperationType

# Set the value of the property.
meshCombineFeature_var.meshCombineOperationType = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
MeshCombineOperationTypes propertyValue = meshCombineFeature_var->meshCombineOperationType();

// Set the value of the property, where value_var is a MeshCombineOperationTypes.
bool returnValue = meshCombineFeature_var->meshCombineOperationType(value_var);

Property Value

This is a read/write property whose value is a MeshCombineOperationTypes.

Version

Introduced in version January 2025


MeshCombineFeature.name Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.name

# Set the value of the property.
meshCombineFeature_var.name = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshCombineFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeature.nativeObject Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.nativeObject
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<MeshCombineFeature> propertyValue = meshCombineFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshCombineFeature.

Version

Introduced in version January 2025


MeshCombineFeature.objectType Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.objectType
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
string propertyValue = meshCombineFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeature.parentComponent Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.parentComponent
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshCombineFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2025


MeshCombineFeature.targetBody Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Gets and sets the input targetBody.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.targetBody

# Set the value of the property.
meshCombineFeature_var.targetBody = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<MeshBody> propertyValue = meshCombineFeature_var->targetBody();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshCombineFeature_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a MeshBody.

Version

Introduced in version January 2025


MeshCombineFeature.timelineObject Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.timelineObject
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshCombineFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2025


MeshCombineFeature.toolBodies Property

Parent Object: MeshCombineFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeature.h>

Description

Syntax

  • Python
  • C++
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.

# Get the value of the property.
propertyValue = meshCombineFeature_var.toolBodies

# Set the value of the property.
meshCombineFeature_var.toolBodies = propertyValue
"meshCombineFeature_var" is a variable referencing a MeshCombineFeature object.
#include <Fusion/MeshBody/MeshCombineFeature.h>

// Get the value of the property.
std::vector<Ptr<MeshBody>> propertyValue = meshCombineFeature_var->toolBodies();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshCombineFeature_var->toolBodies(value_var);

Property Value

This is a read/write property whose value is an array of type MeshBody.

Version

Introduced in version January 2025


MeshCombineFeatureInput Object

MeshCombineFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh combine feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Preserves a copy of each tool body. Default value is false.
isNewComponent | Creates a new component to contain combined mesh bodies. Default value 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.
meshCombineOperationType | Gets and sets the operation type of mesh combine, default value is JoinMeshCombineType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 input targetBody.
toolBodies

Accessed From

MeshCombineFeatures.createInput

Version

Introduced in version January 2025


MeshCombineFeatureInput.classType Method

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

returnValue = adsk::fusion::MeshCombineFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFeatureInput.isKeepToolBodies Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Preserves a copy of each tool body. Default value is false.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.isKeepToolBodies

# Set the value of the property.
meshCombineFeatureInput_var.isKeepToolBodies = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeatureInput_var->isKeepToolBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshCombineFeatureInput_var->isKeepToolBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeatureInput.isNewComponent Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Creates a new component to contain combined mesh bodies. Default value is false.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.isNewComponent

# Set the value of the property.
meshCombineFeatureInput_var.isNewComponent = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeatureInput_var->isNewComponent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshCombineFeatureInput_var->isNewComponent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeatureInput.isValid Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.isValid
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeatureInput.meshCombineOperationType Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Gets and sets the operation type of mesh combine, default value is JoinMeshCombineType.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.meshCombineOperationType

# Set the value of the property.
meshCombineFeatureInput_var.meshCombineOperationType = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
MeshCombineOperationTypes propertyValue = meshCombineFeatureInput_var->meshCombineOperationType();

// Set the value of the property, where value_var is a MeshCombineOperationTypes.
bool returnValue = meshCombineFeatureInput_var->meshCombineOperationType(value_var);

Property Value

This is a read/write property whose value is a MeshCombineOperationTypes.

Version

Introduced in version January 2025


MeshCombineFeatureInput.objectType Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.objectType
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
string propertyValue = meshCombineFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshCombineFeatureInput.targetBaseFeature Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshCombineFeatureInput_var.targetBaseFeature = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshCombineFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshCombineFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshCombineFeatureInput.targetBody Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Gets and sets the input targetBody.

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.targetBody

# Set the value of the property.
meshCombineFeatureInput_var.targetBody = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
Ptr<MeshBody> propertyValue = meshCombineFeatureInput_var->targetBody();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshCombineFeatureInput_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a MeshBody.

Version

Introduced in version January 2025


MeshCombineFeatureInput.toolBodies Property

Parent Object: MeshCombineFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatureInput.h>

Description

Syntax

  • Python
  • C++
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.

# Get the value of the property.
propertyValue = meshCombineFeatureInput_var.toolBodies

# Set the value of the property.
meshCombineFeatureInput_var.toolBodies = propertyValue
"meshCombineFeatureInput_var" is a variable referencing a MeshCombineFeatureInput object.
#include <Fusion/MeshBody/MeshCombineFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<MeshBody>> propertyValue = meshCombineFeatureInput_var->toolBodies();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshCombineFeatureInput_var->toolBodies(value_var);

Property Value

This is a read/write property whose value is an array of type MeshBody.

Version

Introduced in version January 2025


MeshCombineFeatures Object

MeshCombineFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh combine features in a component and supports the ability to create new mesh Combine features.

Methods

Name | Description
add | Creates a mesh 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 MeshCombineFeatureInput object. Use properties and methods on this object to define the mesh combine you want to create and then use the add method, passing in the MeshCombineFeatureInput object.
item | Function that returns the specified mesh combine feature using an index into the collection.
itemByName | Function that returns the specified MeshCombine feature using the name of the feature.

Properties

Name | Description
count | The number of mesh combine 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshCombineFeatures

Version

Introduced in version January 2025


MeshCombineFeatures.add Method

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Creates a mesh combine feature.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
returnValue = meshCombineFeatures_var.add(input)
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

#include <Fusion/MeshBody/MeshCombineFeatures.h>

returnValue = meshCombineFeatures_var->add(input);

Return Value

Type | Description
MeshCombineFeature | Returns the newly created MeshCombineFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshCombineFeatureInput | A MeshCombineFeatureInput object that defines the desired combine feature. Use the createInput method to create a new MeshCombineFeatureInput object and then use methods on it (the MeshCombineFeatureInput object) to define the combine.

Version

Introduced in version January 2025


MeshCombineFeatures.classType Method

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshCombineFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshCombineFeatures.h>

returnValue = adsk::fusion::MeshCombineFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshCombineFeatures.count Property

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

The number of mesh combine features in the collection.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

# Get the value of the property.
propertyValue = meshCombineFeatures_var.count
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
#include <Fusion/MeshBody/MeshCombineFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshCombineFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


MeshCombineFeatures.createInput Method

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Creates a MeshCombineFeatureInput object. Use properties and methods on this object to define the mesh combine you want to create and then use the add method, passing in the MeshCombineFeatureInput object.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
returnValue = meshCombineFeatures_var.createInput(targetBody, toolBodies)
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

#include <Fusion/MeshBody/MeshCombineFeatures.h>

returnValue = meshCombineFeatures_var->createInput(targetBody, toolBodies);

Return Value

Type | Description
MeshCombineFeatureInput | Returns the newly created MeshCombineFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
targetBody | MeshBody | The MeshBody in either a parametric or direct modeling design, which represent the target body.
toolBodies | MeshBody[] | The MeshBodies in either a parametric or direct modeling design, which represent the tool bodies.

Version

Introduced in version January 2025


MeshCombineFeatures.isValid Property

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

# Get the value of the property.
propertyValue = meshCombineFeatures_var.isValid
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
#include <Fusion/MeshBody/MeshCombineFeatures.h>

// Get the value of the property.
boolean propertyValue = meshCombineFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshCombineFeatures.item Method

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Function that returns the specified mesh combine feature using an index into the collection.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
returnValue = meshCombineFeatures_var.item(index)
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

#include <Fusion/MeshBody/MeshCombineFeatures.h>

returnValue = meshCombineFeatures_var->item(index);

Return Value

Type | Description
MeshCombineFeature | 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 2025


MeshCombineFeatures.itemByName Method

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

Function that returns the specified MeshCombine feature using the name of the feature.

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
returnValue = meshCombineFeatures_var.itemByName(name)
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

#include <Fusion/MeshBody/MeshCombineFeatures.h>

returnValue = meshCombineFeatures_var->itemByName(name);

Return Value

Type | Description
MeshCombineFeature | 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 January 2025


MeshCombineFeatures.objectType Property

Parent Object: MeshCombineFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshCombineFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.

# Get the value of the property.
propertyValue = meshCombineFeatures_var.objectType
"meshCombineFeatures_var" is a variable referencing a MeshCombineFeatures object.
#include <Fusion/MeshBody/MeshCombineFeatures.h>

// Get the value of the property.
string propertyValue = meshCombineFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshConvertFeature Object

MeshConvertFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh convert feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputBodies | Gets and sets the input meshes.
isParametric | Indicates if this feature is parametric or not.
isPreprocessHoles | Smooths the boundaries of open holes in the mesh body. Improves the chance of successful conversion by refining the shape of holes that will remain open. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.
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.
meshConvertAccuracyType | Gets and sets the accuracy of organic mesh convert. Only valid if meshConvertResolutionType is ByAccuracyMeshConvertResolutionType.
meshConvertMethodType | Gets and sets the convert type of mesh convert.
meshConvertResolutionType | Gets and sets the resolution method of mesh convert. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.
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.
numberOfFaces | Specify the number of faces to generate for the converted body. Only valid if meshConvertResolutionTypes is ByFacetNumberMeshConvertResolutionType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshConvertFeature.createForAssemblyContext, MeshConvertFeature.nativeObject, MeshConvertFeatures.add, MeshConvertFeatures.item, MeshConvertFeatures.itemByName

Version

Introduced in version July 2025


MeshConvertFeature.assemblyContext Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.assemblyContext
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshConvertFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2025


MeshConvertFeature.attributes Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.attributes
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshConvertFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2025


MeshConvertFeature.baseFeature Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.baseFeature
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshConvertFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshConvertFeature.bodies Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.bodies
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshConvertFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version July 2025


MeshConvertFeature.classType Method

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshConvertFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshConvertFeature.h>

returnValue = adsk::fusion::MeshConvertFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshConvertFeature.createForAssemblyContext Method

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
returnValue = meshConvertFeature_var.createForAssemblyContext(occurrence)
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

#include <Fusion/MeshBody/MeshConvertFeature.h>

returnValue = meshConvertFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshConvertFeature | 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 2025


MeshConvertFeature.deleteMe Method

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
returnValue = meshConvertFeature_var.deleteMe()
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

#include <Fusion/MeshBody/MeshConvertFeature.h>

returnValue = meshConvertFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version July 2025


MeshConvertFeature.dissolve Method

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
returnValue = meshConvertFeature_var.dissolve()
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

#include <Fusion/MeshBody/MeshConvertFeature.h>

returnValue = meshConvertFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version July 2025


MeshConvertFeature.entityToken Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.entityToken
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
string propertyValue = meshConvertFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshConvertFeature.errorOrWarningMessage Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.errorOrWarningMessage
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
string propertyValue = meshConvertFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshConvertFeature.faces Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.faces
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshConvertFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version July 2025


MeshConvertFeature.healthState Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.healthState
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshConvertFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2025


MeshConvertFeature.inputBodies Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Gets and sets the input meshes.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.inputBodies

# Set the value of the property.
meshConvertFeature_var.inputBodies = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
std::vector<Ptr<MeshBody>> propertyValue = meshConvertFeature_var->inputBodies();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshConvertFeature_var->inputBodies(value_var);

Property Value

This is a read/write property whose value is an array of type MeshBody.

Version

Introduced in version July 2025


MeshConvertFeature.isParametric Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.isParametric
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeature.isPreprocessHoles Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Smooths the boundaries of open holes in the mesh body. Improves the chance of successful conversion by refining the shape of holes that will remain open. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.isPreprocessHoles

# Set the value of the property.
meshConvertFeature_var.isPreprocessHoles = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeature_var->isPreprocessHoles();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshConvertFeature_var->isPreprocessHoles(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeature.isSuppressed Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.isSuppressed

# Set the value of the property.
meshConvertFeature_var.isSuppressed = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshConvertFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeature.isValid Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.isValid
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeature.linkedFeatures Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.linkedFeatures
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshConvertFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version July 2025


MeshConvertFeature.meshConvertAccuracyType Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Gets and sets the accuracy of organic mesh convert. Only valid if meshConvertResolutionType is ByAccuracyMeshConvertResolutionType.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.meshConvertAccuracyType

# Set the value of the property.
meshConvertFeature_var.meshConvertAccuracyType = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
MeshConvertAccuracyTypes propertyValue = meshConvertFeature_var->meshConvertAccuracyType();

// Set the value of the property, where value_var is a MeshConvertAccuracyTypes.
bool returnValue = meshConvertFeature_var->meshConvertAccuracyType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertAccuracyTypes.

Version

Introduced in version July 2025


MeshConvertFeature.meshConvertMethodType Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Gets and sets the convert type of mesh convert.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.meshConvertMethodType

# Set the value of the property.
meshConvertFeature_var.meshConvertMethodType = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
MeshConvertMethodTypes propertyValue = meshConvertFeature_var->meshConvertMethodType();

// Set the value of the property, where value_var is a MeshConvertMethodTypes.
bool returnValue = meshConvertFeature_var->meshConvertMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertMethodTypes.

Version

Introduced in version July 2025


MeshConvertFeature.meshConvertResolutionType Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Gets and sets the resolution method of mesh convert. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.meshConvertResolutionType

# Set the value of the property.
meshConvertFeature_var.meshConvertResolutionType = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
MeshConvertResolutionTypes propertyValue = meshConvertFeature_var->meshConvertResolutionType();

// Set the value of the property, where value_var is a MeshConvertResolutionTypes.
bool returnValue = meshConvertFeature_var->meshConvertResolutionType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertResolutionTypes.

Version

Introduced in version July 2025


MeshConvertFeature.name Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.name

# Set the value of the property.
meshConvertFeature_var.name = propertyValue
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
string propertyValue = meshConvertFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshConvertFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


MeshConvertFeature.nativeObject Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.nativeObject
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<MeshConvertFeature> propertyValue = meshConvertFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshConvertFeature.

Version

Introduced in version July 2025


MeshConvertFeature.numberOfFaces Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Specify the number of faces to generate for the converted body. Only valid if meshConvertResolutionTypes is ByFacetNumberMeshConvertResolutionType.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.numberOfFaces
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshConvertFeature_var->numberOfFaces();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version July 2025


MeshConvertFeature.objectType Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.objectType
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
string propertyValue = meshConvertFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshConvertFeature.parentComponent Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.parentComponent
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshConvertFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2025


MeshConvertFeature.timelineObject Property

Parent Object: MeshConvertFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.

# Get the value of the property.
propertyValue = meshConvertFeature_var.timelineObject
"meshConvertFeature_var" is a variable referencing a MeshConvertFeature object.
#include <Fusion/MeshBody/MeshConvertFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshConvertFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2025


MeshConvertFeatureInput Object

MeshConvertFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh convert feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
inputBodies | Gets and sets the input meshes.
isPreprocessHoles | Smooths the boundaries of open holes in the mesh body. Improves the chance of successful conversion by refining the shape of holes that will remain open. Default value is false. Only valid if meshConvertMethodType is OrganicMeshConvertType.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
meshConvertAccuracyType | Gets and sets the accuracy of organic mesh convert, default value is MediumMeshConvertResolutionType. Only valid if meshConvertResolutionType is ByAccuracyMeshConvertResolutionType.
meshConvertMethodType | Gets and sets the convert type of mesh convert, default value is FacetedMeshConvertMethodType.
meshConvertOperationType | Gets and sets the operation type of mesh convert, default value is ParametricFeatureMeshConvertOperationType.
meshConvertResolutionType | Gets and sets the resolution method of mesh convert, default value is ByAccuracyMeshConvertResolutionType. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.
numberOfFaces | Specify the number of faces to generate for the converted body. Only valid if meshConvertResolutionType is ByFacetNumberMeshConvertResolutionType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

MeshConvertFeatures.createInput

Version

Introduced in version July 2025


MeshConvertFeatureInput.classType Method

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshConvertFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

returnValue = adsk::fusion::MeshConvertFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshConvertFeatureInput.inputBodies Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Gets and sets the input meshes.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.inputBodies

# Set the value of the property.
meshConvertFeatureInput_var.inputBodies = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<MeshBody>> propertyValue = meshConvertFeatureInput_var->inputBodies();

// Set the value of the property, where value_var is a MeshBody.
bool returnValue = meshConvertFeatureInput_var->inputBodies(value_var);

Property Value

This is a read/write property whose value is an array of type MeshBody.

Version

Introduced in version July 2025


MeshConvertFeatureInput.isPreprocessHoles Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Smooths the boundaries of open holes in the mesh body. Improves the chance of successful conversion by refining the shape of holes that will remain open. Default value is false. Only valid if meshConvertMethodType is OrganicMeshConvertType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.isPreprocessHoles

# Set the value of the property.
meshConvertFeatureInput_var.isPreprocessHoles = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeatureInput_var->isPreprocessHoles();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshConvertFeatureInput_var->isPreprocessHoles(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeatureInput.isValid Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.isValid
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeatureInput.meshConvertAccuracyType Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Gets and sets the accuracy of organic mesh convert, default value is MediumMeshConvertResolutionType. Only valid if meshConvertResolutionType is ByAccuracyMeshConvertResolutionType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.meshConvertAccuracyType

# Set the value of the property.
meshConvertFeatureInput_var.meshConvertAccuracyType = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
MeshConvertAccuracyTypes propertyValue = meshConvertFeatureInput_var->meshConvertAccuracyType();

// Set the value of the property, where value_var is a MeshConvertAccuracyTypes.
bool returnValue = meshConvertFeatureInput_var->meshConvertAccuracyType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertAccuracyTypes.

Version

Introduced in version July 2025


MeshConvertFeatureInput.meshConvertMethodType Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Gets and sets the convert type of mesh convert, default value is FacetedMeshConvertMethodType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.meshConvertMethodType

# Set the value of the property.
meshConvertFeatureInput_var.meshConvertMethodType = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
MeshConvertMethodTypes propertyValue = meshConvertFeatureInput_var->meshConvertMethodType();

// Set the value of the property, where value_var is a MeshConvertMethodTypes.
bool returnValue = meshConvertFeatureInput_var->meshConvertMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertMethodTypes.

Version

Introduced in version July 2025


MeshConvertFeatureInput.meshConvertOperationType Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Gets and sets the operation type of mesh convert, default value is ParametricFeatureMeshConvertOperationType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.meshConvertOperationType

# Set the value of the property.
meshConvertFeatureInput_var.meshConvertOperationType = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
MeshConvertOperationTypes propertyValue = meshConvertFeatureInput_var->meshConvertOperationType();

// Set the value of the property, where value_var is a MeshConvertOperationTypes.
bool returnValue = meshConvertFeatureInput_var->meshConvertOperationType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertOperationTypes.

Version

Introduced in version July 2025


MeshConvertFeatureInput.meshConvertResolutionType Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Gets and sets the resolution method of mesh convert, default value is ByAccuracyMeshConvertResolutionType. Only valid if meshConvertMethodType is OrganicMeshConvertMethodType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.meshConvertResolutionType

# Set the value of the property.
meshConvertFeatureInput_var.meshConvertResolutionType = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
MeshConvertResolutionTypes propertyValue = meshConvertFeatureInput_var->meshConvertResolutionType();

// Set the value of the property, where value_var is a MeshConvertResolutionTypes.
bool returnValue = meshConvertFeatureInput_var->meshConvertResolutionType(value_var);

Property Value

This is a read/write property whose value is a MeshConvertResolutionTypes.

Version

Introduced in version July 2025


MeshConvertFeatureInput.numberOfFaces Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

Specify the number of faces to generate for the converted body. Only valid if meshConvertResolutionType is ByFacetNumberMeshConvertResolutionType.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.numberOfFaces

# Set the value of the property.
meshConvertFeatureInput_var.numberOfFaces = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshConvertFeatureInput_var->numberOfFaces();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshConvertFeatureInput_var->numberOfFaces(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version July 2025


MeshConvertFeatureInput.objectType Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.objectType
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
string propertyValue = meshConvertFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshConvertFeatureInput.targetBaseFeature Property

Parent Object: MeshConvertFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.

# Get the value of the property.
propertyValue = meshConvertFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshConvertFeatureInput_var.targetBaseFeature = propertyValue
"meshConvertFeatureInput_var" is a variable referencing a MeshConvertFeatureInput object.
#include <Fusion/MeshBody/MeshConvertFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshConvertFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshConvertFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshConvertFeatures Object

MeshConvertFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh convert features in a component and supports the ability to create new mesh Convert features.

Methods

Name | Description
add | Creates a mesh convert 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 MeshConvertFeatureInput object. Use properties and methods on this object to define the mesh convert you want to create and then use the add method, passing in the MeshConvertFeatureInput object.
item | Function that returns the specified mesh convert feature using an index into the collection.
itemByName | Function that returns the specified MeshConvert feature using the name of the feature.

Properties

Name | Description
count | The number of mesh convert 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version July 2025


MeshConvertFeatures.add Method

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Creates a mesh convert feature.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
returnValue = meshConvertFeatures_var.add(input)
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

#include <Fusion/MeshBody/MeshConvertFeatures.h>

returnValue = meshConvertFeatures_var->add(input);

Return Value

Type | Description
MeshConvertFeature | Returns the newly created MeshConvertFeatureInput object or null if the creation failed. Returns null in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshConvertFeatureInput | A MeshConvertFeatureInput object that defines the desired convert feature. Use the createInput method to create a new MeshConvertFeatureInput object and then use methods on it (the MeshConvertFeatureInput object) to define the convert.

Version

Introduced in version July 2025


MeshConvertFeatures.classType Method

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshConvertFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshConvertFeatures.h>

returnValue = adsk::fusion::MeshConvertFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshConvertFeatures.count Property

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

The number of mesh convert features in the collection.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

# Get the value of the property.
propertyValue = meshConvertFeatures_var.count
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
#include <Fusion/MeshBody/MeshConvertFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshConvertFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2025


MeshConvertFeatures.createInput Method

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Creates a MeshConvertFeatureInput object. Use properties and methods on this object to define the mesh convert you want to create and then use the add method, passing in the MeshConvertFeatureInput object.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
returnValue = meshConvertFeatures_var.createInput(inputBodies)
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

#include <Fusion/MeshBody/MeshConvertFeatures.h>

returnValue = meshConvertFeatures_var->createInput(inputBodies);

Return Value

Type | Description
MeshConvertFeatureInput | Returns the newly created MeshConvertFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputBodies | MeshBody[] | A array with mesh bodies in either a parametric or direct modeling design.

Version

Introduced in version July 2025


MeshConvertFeatures.isValid Property

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

# Get the value of the property.
propertyValue = meshConvertFeatures_var.isValid
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
#include <Fusion/MeshBody/MeshConvertFeatures.h>

// Get the value of the property.
boolean propertyValue = meshConvertFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshConvertFeatures.item Method

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Function that returns the specified mesh convert feature using an index into the collection.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
returnValue = meshConvertFeatures_var.item(index)
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

#include <Fusion/MeshBody/MeshConvertFeatures.h>

returnValue = meshConvertFeatures_var->item(index);

Return Value

Type | Description
MeshConvertFeature | 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 2025


MeshConvertFeatures.itemByName Method

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

Function that returns the specified MeshConvert feature using the name of the feature.

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
returnValue = meshConvertFeatures_var.itemByName(name)
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

#include <Fusion/MeshBody/MeshConvertFeatures.h>

returnValue = meshConvertFeatures_var->itemByName(name);

Return Value

Type | Description
MeshConvertFeature | 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 July 2025


MeshConvertFeatures.objectType Property

Parent Object: MeshConvertFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshConvertFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.

# Get the value of the property.
propertyValue = meshConvertFeatures_var.objectType
"meshConvertFeatures_var" is a variable referencing a MeshConvertFeatures object.
#include <Fusion/MeshBody/MeshConvertFeatures.h>

// Get the value of the property.
string propertyValue = meshConvertFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshFeature Object

MeshFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Base class object representing all mesh features. Mesh features works on MeshBody objects and provide all functionality of the base feature except the functions bodies and faces, which will always return null.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Derived Classes

MeshCombineFaceGroupsFeature, MeshCombineFeature, MeshGenerateFaceGroupsFeature, MeshReduceFeature, MeshRemeshFeature, MeshRepairFeature, MeshReverseNormalFeature, MeshSeparateFeature, MeshShellFeature, MeshSmoothFeature, TessellateFeature

Version

Introduced in version March 2024


MeshFeature.assemblyContext Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.assemblyContext
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshFeature.attributes Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.attributes
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshFeature.baseFeature Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.baseFeature
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshFeature.bodies Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.bodies
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshFeature.classType Method

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshFeature.h>

returnValue = adsk::fusion::MeshFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshFeature.deleteMe Method

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.
returnValue = meshFeature_var.deleteMe()
"meshFeature_var" is a variable referencing a MeshFeature object.

#include <Fusion/MeshBody/MeshFeature.h>

returnValue = meshFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshFeature.dissolve Method

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.
returnValue = meshFeature_var.dissolve()
"meshFeature_var" is a variable referencing a MeshFeature object.

#include <Fusion/MeshBody/MeshFeature.h>

returnValue = meshFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshFeature.entityToken Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.entityToken
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
string propertyValue = meshFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshFeature.errorOrWarningMessage Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.errorOrWarningMessage
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
string propertyValue = meshFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshFeature.faces Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.faces
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshFeature.healthState Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.healthState
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshFeature.isParametric Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.isParametric
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshFeature.isSuppressed Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.isSuppressed

# Set the value of the property.
meshFeature_var.isSuppressed = propertyValue
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshFeature.isValid Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.isValid
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshFeature.linkedFeatures Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.linkedFeatures
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshFeature.name Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.name

# Set the value of the property.
meshFeature_var.name = propertyValue
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
string propertyValue = meshFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshFeature.objectType Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.objectType
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
string propertyValue = meshFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshFeature.parentComponent Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.parentComponent
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshFeature.timelineObject Property

Parent Object: MeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshFeature_var" is a variable referencing a MeshFeature object.

# Get the value of the property.
propertyValue = meshFeature_var.timelineObject
"meshFeature_var" is a variable referencing a MeshFeature object.
#include <Fusion/MeshBody/MeshFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshGenerateFaceGroupsFeature Object

MeshGenerateFaceGroupsFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh generate face groups feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
angleThreshold | Controls the angle threshold during the face group generation. The values can range between 0 and pi/2. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
boundaryTolerance | Gets and sets tolerance to define face group. This value is used during the fitting of the primitives. The values can range between 0 and 0.01. Only valid if meshGenerateFaceGroupsMethodType is AccurateGenerateFaceGroupsType.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
meshGenerateFaceGroupsMethodType | Gets and sets the type of mesh generate face groups.
minimumFaceGroupSize | Gets and sets the fraction of the overall mesh area which determines the smallest face group. The value can range between 0 and 1. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshGenerateFaceGroupsFeature.createForAssemblyContext, MeshGenerateFaceGroupsFeature.nativeObject, MeshGenerateFaceGroupsFeatures.add, MeshGenerateFaceGroupsFeatures.item, MeshGenerateFaceGroupsFeatures.itemByName

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.angleThreshold Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Controls the angle threshold during the face group generation. The values can range between 0 and pi/2. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.angleThreshold
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshGenerateFaceGroupsFeature_var->angleThreshold();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.assemblyContext Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.assemblyContext
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshGenerateFaceGroupsFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.attributes Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.attributes
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshGenerateFaceGroupsFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.baseFeature Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.baseFeature
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshGenerateFaceGroupsFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.bodies Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.bodies
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshGenerateFaceGroupsFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.boundaryTolerance Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Gets and sets tolerance to define face group. This value is used during the fitting of the primitives. The values can range between 0 and 0.01. Only valid if meshGenerateFaceGroupsMethodType is AccurateGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.boundaryTolerance
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshGenerateFaceGroupsFeature_var->boundaryTolerance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.classType Method

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshGenerateFaceGroupsFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

returnValue = adsk::fusion::MeshGenerateFaceGroupsFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.createForAssemblyContext Method

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
returnValue = meshGenerateFaceGroupsFeature_var.createForAssemblyContext(occurrence)
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

returnValue = meshGenerateFaceGroupsFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshGenerateFaceGroupsFeature | 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 2025


MeshGenerateFaceGroupsFeature.deleteMe Method

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
returnValue = meshGenerateFaceGroupsFeature_var.deleteMe()
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

returnValue = meshGenerateFaceGroupsFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.dissolve Method

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
returnValue = meshGenerateFaceGroupsFeature_var.dissolve()
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

returnValue = meshGenerateFaceGroupsFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.entityToken Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.entityToken
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.errorOrWarningMessage Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.errorOrWarningMessage
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.faces Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.faces
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshGenerateFaceGroupsFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.healthState Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.healthState
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshGenerateFaceGroupsFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.isParametric Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.isParametric
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshGenerateFaceGroupsFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.isSuppressed Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.isSuppressed

# Set the value of the property.
meshGenerateFaceGroupsFeature_var.isSuppressed = propertyValue
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshGenerateFaceGroupsFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshGenerateFaceGroupsFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.isValid Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.isValid
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
boolean propertyValue = meshGenerateFaceGroupsFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.linkedFeatures Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.linkedFeatures
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshGenerateFaceGroupsFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.mesh Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.mesh

# Set the value of the property.
meshGenerateFaceGroupsFeature_var.mesh = propertyValue
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshGenerateFaceGroupsFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshGenerateFaceGroupsFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.meshGenerateFaceGroupsMethodType Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Gets and sets the type of mesh generate face groups.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.meshGenerateFaceGroupsMethodType

# Set the value of the property.
meshGenerateFaceGroupsFeature_var.meshGenerateFaceGroupsMethodType = propertyValue
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
MeshGenerateFaceGroupsMethodTypes propertyValue = meshGenerateFaceGroupsFeature_var->meshGenerateFaceGroupsMethodType();

// Set the value of the property, where value_var is a MeshGenerateFaceGroupsMethodTypes.
bool returnValue = meshGenerateFaceGroupsFeature_var->meshGenerateFaceGroupsMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshGenerateFaceGroupsMethodTypes.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.minimumFaceGroupSize Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Gets and sets the fraction of the overall mesh area which determines the smallest face group. The value can range between 0 and 1. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.minimumFaceGroupSize
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshGenerateFaceGroupsFeature_var->minimumFaceGroupSize();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.name Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.name

# Set the value of the property.
meshGenerateFaceGroupsFeature_var.name = propertyValue
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshGenerateFaceGroupsFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.nativeObject Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.nativeObject
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<MeshGenerateFaceGroupsFeature> propertyValue = meshGenerateFaceGroupsFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshGenerateFaceGroupsFeature.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.objectType Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.objectType
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.parentComponent Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.parentComponent
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshGenerateFaceGroupsFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeature.timelineObject Property

Parent Object: MeshGenerateFaceGroupsFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeature_var.timelineObject
"meshGenerateFaceGroupsFeature_var" is a variable referencing a MeshGenerateFaceGroupsFeature object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshGenerateFaceGroupsFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput Object

MeshGenerateFaceGroupsFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh generate face groups feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
angleThreshold | Controls the angle threshold during the face group generation. The values can range between 0 and pi/2. The default value is 0.436. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.
boundaryTolerance | Gets and sets tolerance to define face group. This value is used during the fitting of the primitives. The values can range between 0 and 0.01. The default value is 0.001. Only valid if meshGenerateFaceGroupsMethodType is AccurateGenerateFaceGroupsType.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mesh | Gets and sets the input mesh body.
meshGenerateFaceGroupsMethodType | Gets and sets the type of mesh generate face groups, default value is FastGenerateFaceGroupsType.
minimumFaceGroupSize | Gets and sets the fraction of the overall mesh area which determines the smallest face group. The value can range between 0 and 1. The default value is 0.02. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

MeshGenerateFaceGroupsFeatures.createInput

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.angleThreshold Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Controls the angle threshold during the face group generation. The values can range between 0 and pi/2. The default value is 0.436. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.angleThreshold

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.angleThreshold = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshGenerateFaceGroupsFeatureInput_var->angleThreshold();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->angleThreshold(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.boundaryTolerance Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Gets and sets tolerance to define face group. This value is used during the fitting of the primitives. The values can range between 0 and 0.01. The default value is 0.001. Only valid if meshGenerateFaceGroupsMethodType is AccurateGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.boundaryTolerance

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.boundaryTolerance = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshGenerateFaceGroupsFeatureInput_var->boundaryTolerance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->boundaryTolerance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.classType Method

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshGenerateFaceGroupsFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

returnValue = adsk::fusion::MeshGenerateFaceGroupsFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.isValid Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.isValid
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshGenerateFaceGroupsFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.mesh Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.mesh

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.mesh = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshGenerateFaceGroupsFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.meshGenerateFaceGroupsMethodType Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Gets and sets the type of mesh generate face groups, default value is FastGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.meshGenerateFaceGroupsMethodType

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.meshGenerateFaceGroupsMethodType = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
MeshGenerateFaceGroupsMethodTypes propertyValue = meshGenerateFaceGroupsFeatureInput_var->meshGenerateFaceGroupsMethodType();

// Set the value of the property, where value_var is a MeshGenerateFaceGroupsMethodTypes.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->meshGenerateFaceGroupsMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshGenerateFaceGroupsMethodTypes.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.minimumFaceGroupSize Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

Gets and sets the fraction of the overall mesh area which determines the smallest face group. The value can range between 0 and 1. The default value is 0.02. Only valid if meshGenerateFaceGroupsMethodType is FastGenerateFaceGroupsType.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.minimumFaceGroupSize

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.minimumFaceGroupSize = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshGenerateFaceGroupsFeatureInput_var->minimumFaceGroupSize();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->minimumFaceGroupSize(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.objectType Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.objectType
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatureInput.targetBaseFeature Property

Parent Object: MeshGenerateFaceGroupsFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshGenerateFaceGroupsFeatureInput_var.targetBaseFeature = propertyValue
"meshGenerateFaceGroupsFeatureInput_var" is a variable referencing a MeshGenerateFaceGroupsFeatureInput object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshGenerateFaceGroupsFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshGenerateFaceGroupsFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures Object

MeshGenerateFaceGroupsFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh generate face groups features in a component and supports the ability to create new mesh generate face groups features.

Methods

Name | Description
add | Creates a mesh generate face groups 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 MeshGenerateFaceGroupsFeatureInput object. Use properties and methods on this object to define the mesh generate face groups feature you want to create and then use the add method, passing in the MeshGenerateFaceGroupsFeatureInput object.
item | Function that returns the specified mesh generate face groups feature using an index into the collection.
itemByName | Function that returns the specified MeshGenerateFaceGroups feature using the name of the feature.

Properties

Name | Description
count | The number of mesh generate face groups 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshGenerateFaceGroupsFeatures

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.add Method

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Creates a mesh generate face groups feature.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
returnValue = meshGenerateFaceGroupsFeatures_var.add(input)
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

returnValue = meshGenerateFaceGroupsFeatures_var->add(input);

Return Value

Type | Description
MeshGenerateFaceGroupsFeature | Returns the newly created MeshGenerateFaceGroupsFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshGenerateFaceGroupsFeatureInput | A MeshGenerateFaceGroupsFeatureInput object that defines the desired generate face groups feature. Use the createInput method to create a new MeshGenerateFaceGroupsFeatureInput object and then use methods on it (the MeshGenerateFaceGroupsFeatureInput object) to define the generate face groups feature.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.classType Method

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshGenerateFaceGroupsFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

returnValue = adsk::fusion::MeshGenerateFaceGroupsFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.count Property

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

The number of mesh generate face groups features in the collection.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatures_var.count
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshGenerateFaceGroupsFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.createInput Method

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Creates a MeshGenerateFaceGroupsFeatureInput object. Use properties and methods on this object to define the mesh generate face groups feature you want to create and then use the add method, passing in the MeshGenerateFaceGroupsFeatureInput object.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
returnValue = meshGenerateFaceGroupsFeatures_var.createInput(mesh)
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

returnValue = meshGenerateFaceGroupsFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshGenerateFaceGroupsFeatureInput | Returns the newly created MeshGenerateFaceGroupsFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.isValid Property

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatures_var.isValid
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

// Get the value of the property.
boolean propertyValue = meshGenerateFaceGroupsFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


MeshGenerateFaceGroupsFeatures.item Method

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Function that returns the specified mesh generate face groups feature using an index into the collection.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
returnValue = meshGenerateFaceGroupsFeatures_var.item(index)
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

returnValue = meshGenerateFaceGroupsFeatures_var->item(index);

Return Value

Type | Description
MeshGenerateFaceGroupsFeature | 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 2025


MeshGenerateFaceGroupsFeatures.itemByName Method

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

Function that returns the specified MeshGenerateFaceGroups feature using the name of the feature.

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
returnValue = meshGenerateFaceGroupsFeatures_var.itemByName(name)
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

returnValue = meshGenerateFaceGroupsFeatures_var->itemByName(name);

Return Value

Type | Description
MeshGenerateFaceGroupsFeature | 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 January 2025


MeshGenerateFaceGroupsFeatures.objectType Property

Parent Object: MeshGenerateFaceGroupsFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.

# Get the value of the property.
propertyValue = meshGenerateFaceGroupsFeatures_var.objectType
"meshGenerateFaceGroupsFeatures_var" is a variable referencing a MeshGenerateFaceGroupsFeatures object.
#include <Fusion/MeshBody/MeshGenerateFaceGroupsFeatures.h>

// Get the value of the property.
string propertyValue = meshGenerateFaceGroupsFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


MeshManager Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Provides access to meshes that approximate a B-Rep and T-Spline.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Creates a new MeshCalculator which is used to calculate new triangular meshes based on various parameters that control the calculation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Returns a collection that provides access to all of the existing display meshes.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/MeshManager.h>

Description

Returns the parent BRepBody, BRepFace, BRepLump, BRepShell, SculptBody, or SculptFace object.

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


MeshReduceFeature Object

MeshReduceFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh reduce feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
facecount | Gets and sets the target face count for the reduced mesh as a target for the reduction. Only valid if meshReduceTargetType is FaceCountMeshReduceTargetType.
faces Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
maximumDeviation | Controls the maximum deviation of the reduced mesh to the original mesh. Only valid if meshReduceTargetType is MaximumDeviationMeshReduceTargetType.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
meshReduceMethodType | Gets and sets the type of mesh reduce.
meshReduceTargetType | Gets and sets the target criteria for the reduction.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
proportion | Gets and sets the proportion of number of faces of the reduced mesh to the number of faces of original mesh as a target for the reduction. The value can range between 0 and 100 percent. Only valid if meshReduceTargetType is ProportionMeshReduceTargetType.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshReduceFeature.createForAssemblyContext, MeshReduceFeature.nativeObject, MeshReduceFeatures.add, MeshReduceFeatures.item, MeshReduceFeatures.itemByName

Version

Introduced in version March 2024


MeshReduceFeature.assemblyContext Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.assemblyContext
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshReduceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshReduceFeature.attributes Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.attributes
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshReduceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshReduceFeature.baseFeature Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.baseFeature
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshReduceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshReduceFeature.bodies Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.bodies
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshReduceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshReduceFeature.classType Method

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReduceFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReduceFeature.h>

returnValue = adsk::fusion::MeshReduceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshReduceFeature.createForAssemblyContext Method

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
returnValue = meshReduceFeature_var.createForAssemblyContext(occurrence)
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

#include <Fusion/MeshBody/MeshReduceFeature.h>

returnValue = meshReduceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshReduceFeature | 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 2024


MeshReduceFeature.deleteMe Method

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
returnValue = meshReduceFeature_var.deleteMe()
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

#include <Fusion/MeshBody/MeshReduceFeature.h>

returnValue = meshReduceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshReduceFeature.dissolve Method

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
returnValue = meshReduceFeature_var.dissolve()
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

#include <Fusion/MeshBody/MeshReduceFeature.h>

returnValue = meshReduceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshReduceFeature.entityToken Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.entityToken
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
string propertyValue = meshReduceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshReduceFeature.errorOrWarningMessage Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.errorOrWarningMessage
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
string propertyValue = meshReduceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshReduceFeature.facecount Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets the target face count for the reduced mesh as a target for the reduction. Only valid if meshReduceTargetType is FaceCountMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.facecount
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshReduceFeature_var->facecount();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshReduceFeature.faces Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.faces
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshReduceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshReduceFeature.healthState Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.healthState
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshReduceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshReduceFeature.isParametric Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.isParametric
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
boolean propertyValue = meshReduceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshReduceFeature.isSuppressed Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.isSuppressed

# Set the value of the property.
meshReduceFeature_var.isSuppressed = propertyValue
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
boolean propertyValue = meshReduceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshReduceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshReduceFeature.isValid Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.isValid
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
boolean propertyValue = meshReduceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshReduceFeature.linkedFeatures Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.linkedFeatures
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshReduceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshReduceFeature.maximumDeviation Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Controls the maximum deviation of the reduced mesh to the original mesh. Only valid if meshReduceTargetType is MaximumDeviationMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.maximumDeviation
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshReduceFeature_var->maximumDeviation();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshReduceFeature.mesh Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.mesh

# Set the value of the property.
meshReduceFeature_var.mesh = propertyValue
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshReduceFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshReduceFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshReduceFeature.meshReduceMethodType Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets the type of mesh reduce.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.meshReduceMethodType

# Set the value of the property.
meshReduceFeature_var.meshReduceMethodType = propertyValue
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
MeshReduceMethodTypes propertyValue = meshReduceFeature_var->meshReduceMethodType();

// Set the value of the property, where value_var is a MeshReduceMethodTypes.
bool returnValue = meshReduceFeature_var->meshReduceMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshReduceMethodTypes.

Version

Introduced in version March 2024


MeshReduceFeature.meshReduceTargetType Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets the target criteria for the reduction.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.meshReduceTargetType

# Set the value of the property.
meshReduceFeature_var.meshReduceTargetType = propertyValue
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
MeshReduceTargetTypes propertyValue = meshReduceFeature_var->meshReduceTargetType();

// Set the value of the property, where value_var is a MeshReduceTargetTypes.
bool returnValue = meshReduceFeature_var->meshReduceTargetType(value_var);

Property Value

This is a read/write property whose value is a MeshReduceTargetTypes.

Version

Introduced in version March 2024


MeshReduceFeature.name Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.name

# Set the value of the property.
meshReduceFeature_var.name = propertyValue
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
string propertyValue = meshReduceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshReduceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshReduceFeature.nativeObject Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.nativeObject
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<MeshReduceFeature> propertyValue = meshReduceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshReduceFeature.

Version

Introduced in version March 2024


MeshReduceFeature.objectType Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.objectType
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
string propertyValue = meshReduceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshReduceFeature.parentComponent Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.parentComponent
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshReduceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshReduceFeature.proportion Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Gets and sets the proportion of number of faces of the reduced mesh to the number of faces of original mesh as a target for the reduction. The value can range between 0 and 100 percent. Only valid if meshReduceTargetType is ProportionMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.proportion
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshReduceFeature_var->proportion();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshReduceFeature.timelineObject Property

Parent Object: MeshReduceFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.

# Get the value of the property.
propertyValue = meshReduceFeature_var.timelineObject
"meshReduceFeature_var" is a variable referencing a MeshReduceFeature object.
#include <Fusion/MeshBody/MeshReduceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshReduceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshReduceFeatureInput Object

MeshReduceFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh reduce feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
facecount | Gets and sets the target face count for the reduced mesh as a target for the reduction. Only valid if meshReduceTargetType is FaceCountMeshReduceTargetType.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumDeviation | Controls the maximum deviation of the reduced mesh to the original mesh. The default value is 0. Only valid if meshReduceTargetType is MaximumDeviationMeshReduceTargetType.
mesh | Gets and sets the input mesh body.
meshReduceMethodType | Gets and sets the type of mesh reduce, default value is AdaptiveReduceType.
meshReduceTargetType | Gets and sets the target criteria for the reduction, default value is MaximumDeviationMeshReduceTargetType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
proportion | Gets and sets the proportion of number of faces of the reduced mesh to the number of faces of original mesh as a target for the reduction. The value can range between 0 and 100 percent. Only valid if meshReduceTargetType is ProportionMeshReduceTargetType.
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

MeshReduceFeatures.createInput

Version

Introduced in version March 2024


MeshReduceFeatureInput.classType Method

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReduceFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

returnValue = adsk::fusion::MeshReduceFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshReduceFeatureInput.facecount Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Gets and sets the target face count for the reduced mesh as a target for the reduction. Only valid if meshReduceTargetType is FaceCountMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.facecount

# Set the value of the property.
meshReduceFeatureInput_var.facecount = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshReduceFeatureInput_var->facecount();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshReduceFeatureInput_var->facecount(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshReduceFeatureInput.isValid Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.isValid
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshReduceFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshReduceFeatureInput.maximumDeviation Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Controls the maximum deviation of the reduced mesh to the original mesh. The default value is 0. Only valid if meshReduceTargetType is MaximumDeviationMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.maximumDeviation

# Set the value of the property.
meshReduceFeatureInput_var.maximumDeviation = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshReduceFeatureInput_var->maximumDeviation();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshReduceFeatureInput_var->maximumDeviation(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshReduceFeatureInput.mesh Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.mesh

# Set the value of the property.
meshReduceFeatureInput_var.mesh = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshReduceFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshReduceFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshReduceFeatureInput.meshReduceMethodType Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Gets and sets the type of mesh reduce, default value is AdaptiveReduceType.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.meshReduceMethodType

# Set the value of the property.
meshReduceFeatureInput_var.meshReduceMethodType = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
MeshReduceMethodTypes propertyValue = meshReduceFeatureInput_var->meshReduceMethodType();

// Set the value of the property, where value_var is a MeshReduceMethodTypes.
bool returnValue = meshReduceFeatureInput_var->meshReduceMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshReduceMethodTypes.

Version

Introduced in version March 2024


MeshReduceFeatureInput.meshReduceTargetType Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Gets and sets the target criteria for the reduction, default value is MaximumDeviationMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.meshReduceTargetType

# Set the value of the property.
meshReduceFeatureInput_var.meshReduceTargetType = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
MeshReduceTargetTypes propertyValue = meshReduceFeatureInput_var->meshReduceTargetType();

// Set the value of the property, where value_var is a MeshReduceTargetTypes.
bool returnValue = meshReduceFeatureInput_var->meshReduceTargetType(value_var);

Property Value

This is a read/write property whose value is a MeshReduceTargetTypes.

Version

Introduced in version March 2024


MeshReduceFeatureInput.objectType Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.objectType
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
string propertyValue = meshReduceFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshReduceFeatureInput.proportion Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

Description

Gets and sets the proportion of number of faces of the reduced mesh to the number of faces of original mesh as a target for the reduction. The value can range between 0 and 100 percent. Only valid if meshReduceTargetType is ProportionMeshReduceTargetType.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.proportion

# Set the value of the property.
meshReduceFeatureInput_var.proportion = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshReduceFeatureInput_var->proportion();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshReduceFeatureInput_var->proportion(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshReduceFeatureInput.targetBaseFeature Property

Parent Object: MeshReduceFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.

# Get the value of the property.
propertyValue = meshReduceFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshReduceFeatureInput_var.targetBaseFeature = propertyValue
"meshReduceFeatureInput_var" is a variable referencing a MeshReduceFeatureInput object.
#include <Fusion/MeshBody/MeshReduceFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshReduceFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshReduceFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshReduceFeatures Object

MeshReduceFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh reduce features in a component and supports the ability to create new mesh reduce features.

Methods

Name | Description
add | Creates a mesh reduce 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 MeshReduceFeatureInput object. Use properties and methods on this object to define the mesh reduce you want to create and then use the add method, passing in the MeshReduceFeatureInput object.
item | Function that returns the specified mesh reduce feature using an index into the collection.
itemByName | Function that returns the specified MeshReduce feature using the name of the feature.

Properties

Name | Description
count | The number of mesh reduce 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshReduceFeatures

Version

Introduced in version March 2024


MeshReduceFeatures.add Method

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Creates a mesh reduce feature.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
returnValue = meshReduceFeatures_var.add(input)
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

#include <Fusion/MeshBody/MeshReduceFeatures.h>

returnValue = meshReduceFeatures_var->add(input);

Return Value

Type | Description
MeshReduceFeature | Returns the newly created MeshReduceFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshReduceFeatureInput | A MeshReduceFeatureInput object that defines the desired reduce feature. Use the createInput method to create a new MeshReduceFeatureInput object and then use methods on it (the MeshReduceFeatureInput object) to define the reduce.

Version

Introduced in version March 2024


MeshReduceFeatures.classType Method

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReduceFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReduceFeatures.h>

returnValue = adsk::fusion::MeshReduceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshReduceFeatures.count Property

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

The number of mesh reduce features in the collection.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

# Get the value of the property.
propertyValue = meshReduceFeatures_var.count
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
#include <Fusion/MeshBody/MeshReduceFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshReduceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


MeshReduceFeatures.createInput Method

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Creates a MeshReduceFeatureInput object. Use properties and methods on this object to define the mesh reduce you want to create and then use the add method, passing in the MeshReduceFeatureInput object.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
returnValue = meshReduceFeatures_var.createInput(mesh)
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

#include <Fusion/MeshBody/MeshReduceFeatures.h>

returnValue = meshReduceFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshReduceFeatureInput | Returns the newly created MeshReduceFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version March 2024


MeshReduceFeatures.isValid Property

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

# Get the value of the property.
propertyValue = meshReduceFeatures_var.isValid
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
#include <Fusion/MeshBody/MeshReduceFeatures.h>

// Get the value of the property.
boolean propertyValue = meshReduceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshReduceFeatures.item Method

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Function that returns the specified mesh reduce feature using an index into the collection.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
returnValue = meshReduceFeatures_var.item(index)
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

#include <Fusion/MeshBody/MeshReduceFeatures.h>

returnValue = meshReduceFeatures_var->item(index);

Return Value

Type | Description
MeshReduceFeature | 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 2024


MeshReduceFeatures.itemByName Method

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

Function that returns the specified MeshReduce feature using the name of the feature.

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
returnValue = meshReduceFeatures_var.itemByName(name)
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

#include <Fusion/MeshBody/MeshReduceFeatures.h>

returnValue = meshReduceFeatures_var->itemByName(name);

Return Value

Type | Description
MeshReduceFeature | 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 March 2024


MeshReduceFeatures.objectType Property

Parent Object: MeshReduceFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReduceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.

# Get the value of the property.
propertyValue = meshReduceFeatures_var.objectType
"meshReduceFeatures_var" is a variable referencing a MeshReduceFeatures object.
#include <Fusion/MeshBody/MeshReduceFeatures.h>

// Get the value of the property.
string propertyValue = meshReduceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeature Object

MeshRemeshFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh re-mesh feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
density | Controls the density of the newly created faces of the re-meshed mesh. The values can range between 0 and 1.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isPreserveBoundariesEnabled | Gets and sets if open boundary edges are preserved during the re-mesh process.
isPreserveSharpEdgesEnabled | Gets and sets if sharp edges are preserved during the re-mesh process.
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.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
meshRemeshMethodType | Gets and sets the type of mesh re-mesh.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
shapePreservation | Gets and sets how much of the original shape needs to preserved. The value can range between 0 and 1. Only valid if meshRemeshMethodType is AdaptiveType.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshRemeshFeature.createForAssemblyContext, MeshRemeshFeature.nativeObject, MeshRemeshFeatures.add, MeshRemeshFeatures.item, MeshRemeshFeatures.itemByName

Version

Introduced in version March 2024


MeshRemeshFeature.assemblyContext Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.assemblyContext
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshRemeshFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshRemeshFeature.attributes Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.attributes
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshRemeshFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshRemeshFeature.baseFeature Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.baseFeature
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshRemeshFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshRemeshFeature.bodies Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.bodies
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshRemeshFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshRemeshFeature.classType Method

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRemeshFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRemeshFeature.h>

returnValue = adsk::fusion::MeshRemeshFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRemeshFeature.createForAssemblyContext Method

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
returnValue = meshRemeshFeature_var.createForAssemblyContext(occurrence)
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

#include <Fusion/MeshBody/MeshRemeshFeature.h>

returnValue = meshRemeshFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshRemeshFeature | 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 2024


MeshRemeshFeature.deleteMe Method

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
returnValue = meshRemeshFeature_var.deleteMe()
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

#include <Fusion/MeshBody/MeshRemeshFeature.h>

returnValue = meshRemeshFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshRemeshFeature.density Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Controls the density of the newly created faces of the re-meshed mesh. The values can range between 0 and 1.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.density
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshRemeshFeature_var->density();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshRemeshFeature.dissolve Method

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
returnValue = meshRemeshFeature_var.dissolve()
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

#include <Fusion/MeshBody/MeshRemeshFeature.h>

returnValue = meshRemeshFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshRemeshFeature.entityToken Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.entityToken
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
string propertyValue = meshRemeshFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeature.errorOrWarningMessage Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.errorOrWarningMessage
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
string propertyValue = meshRemeshFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeature.faces Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.faces
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshRemeshFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshRemeshFeature.healthState Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.healthState
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshRemeshFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshRemeshFeature.isParametric Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.isParametric
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeature.isPreserveBoundariesEnabled Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets if open boundary edges are preserved during the re-mesh process.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.isPreserveBoundariesEnabled

# Set the value of the property.
meshRemeshFeature_var.isPreserveBoundariesEnabled = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeature_var->isPreserveBoundariesEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRemeshFeature_var->isPreserveBoundariesEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeature.isPreserveSharpEdgesEnabled Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets if sharp edges are preserved during the re-mesh process.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.isPreserveSharpEdgesEnabled

# Set the value of the property.
meshRemeshFeature_var.isPreserveSharpEdgesEnabled = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeature_var->isPreserveSharpEdgesEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRemeshFeature_var->isPreserveSharpEdgesEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeature.isSuppressed Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.isSuppressed

# Set the value of the property.
meshRemeshFeature_var.isSuppressed = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRemeshFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeature.isValid Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.isValid
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeature.linkedFeatures Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.linkedFeatures
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshRemeshFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshRemeshFeature.mesh Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.mesh

# Set the value of the property.
meshRemeshFeature_var.mesh = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshRemeshFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshRemeshFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshRemeshFeature.meshRemeshMethodType Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets the type of mesh re-mesh.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.meshRemeshMethodType

# Set the value of the property.
meshRemeshFeature_var.meshRemeshMethodType = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
MeshRemeshMethodTypes propertyValue = meshRemeshFeature_var->meshRemeshMethodType();

// Set the value of the property, where value_var is a MeshRemeshMethodTypes.
bool returnValue = meshRemeshFeature_var->meshRemeshMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshRemeshMethodTypes.

Version

Introduced in version March 2024


MeshRemeshFeature.name Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.name

# Set the value of the property.
meshRemeshFeature_var.name = propertyValue
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
string propertyValue = meshRemeshFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshRemeshFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeature.nativeObject Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.nativeObject
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<MeshRemeshFeature> propertyValue = meshRemeshFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshRemeshFeature.

Version

Introduced in version March 2024


MeshRemeshFeature.objectType Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.objectType
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
string propertyValue = meshRemeshFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeature.parentComponent Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.parentComponent
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshRemeshFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshRemeshFeature.shapePreservation Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Gets and sets how much of the original shape needs to preserved. The value can range between 0 and 1. Only valid if meshRemeshMethodType is AdaptiveType.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.shapePreservation
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshRemeshFeature_var->shapePreservation();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshRemeshFeature.timelineObject Property

Parent Object: MeshRemeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.

# Get the value of the property.
propertyValue = meshRemeshFeature_var.timelineObject
"meshRemeshFeature_var" is a variable referencing a MeshRemeshFeature object.
#include <Fusion/MeshBody/MeshRemeshFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshRemeshFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshRemeshFeatureInput Object

MeshRemeshFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh re-mesh feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
density | Controls the density of the newly created faces of the re-meshed mesh. The values can range between 0 and 1. The default value is 0.25
isPreserveBoundariesEnabled | Gets and sets if open boundary edges are preserved during the re-mesh process. Default value is false.
isPreserveSharpEdgesEnabled | Gets and sets if sharp edges are preserved during the re-mesh process. Default value 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.
mesh | Gets and sets the input mesh body.
meshRemeshMethodType | Gets and sets the type of mesh re-mesh, default value is AdaptiveType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
shapePreservation | Gets and sets how much of the original shape needs to preserved. The value can range between 0 and 1. The default value is 0.5. Only valid if meshRemeshMethodType is AdaptiveType.
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

MeshRemeshFeatures.createInput

Version

Introduced in version March 2024


MeshRemeshFeatureInput.classType Method

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRemeshFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

returnValue = adsk::fusion::MeshRemeshFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.density Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Controls the density of the newly created faces of the re-meshed mesh. The values can range between 0 and 1. The default value is 0.25

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.density

# Set the value of the property.
meshRemeshFeatureInput_var.density = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshRemeshFeatureInput_var->density();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshRemeshFeatureInput_var->density(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.isPreserveBoundariesEnabled Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Gets and sets if open boundary edges are preserved during the re-mesh process. Default value is false.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.isPreserveBoundariesEnabled

# Set the value of the property.
meshRemeshFeatureInput_var.isPreserveBoundariesEnabled = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeatureInput_var->isPreserveBoundariesEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRemeshFeatureInput_var->isPreserveBoundariesEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.isPreserveSharpEdgesEnabled Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Gets and sets if sharp edges are preserved during the re-mesh process. Default value is false.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.isPreserveSharpEdgesEnabled

# Set the value of the property.
meshRemeshFeatureInput_var.isPreserveSharpEdgesEnabled = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeatureInput_var->isPreserveSharpEdgesEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRemeshFeatureInput_var->isPreserveSharpEdgesEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.isValid Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.isValid
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.mesh Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.mesh

# Set the value of the property.
meshRemeshFeatureInput_var.mesh = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshRemeshFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshRemeshFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.meshRemeshMethodType Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Gets and sets the type of mesh re-mesh, default value is AdaptiveType.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.meshRemeshMethodType

# Set the value of the property.
meshRemeshFeatureInput_var.meshRemeshMethodType = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
MeshRemeshMethodTypes propertyValue = meshRemeshFeatureInput_var->meshRemeshMethodType();

// Set the value of the property, where value_var is a MeshRemeshMethodTypes.
bool returnValue = meshRemeshFeatureInput_var->meshRemeshMethodType(value_var);

Property Value

This is a read/write property whose value is a MeshRemeshMethodTypes.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.objectType Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.objectType
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
string propertyValue = meshRemeshFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.shapePreservation Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

Description

Gets and sets how much of the original shape needs to preserved. The value can range between 0 and 1. The default value is 0.5. Only valid if meshRemeshMethodType is AdaptiveType.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.shapePreservation

# Set the value of the property.
meshRemeshFeatureInput_var.shapePreservation = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshRemeshFeatureInput_var->shapePreservation();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshRemeshFeatureInput_var->shapePreservation(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshRemeshFeatureInput.targetBaseFeature Property

Parent Object: MeshRemeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.

# Get the value of the property.
propertyValue = meshRemeshFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshRemeshFeatureInput_var.targetBaseFeature = propertyValue
"meshRemeshFeatureInput_var" is a variable referencing a MeshRemeshFeatureInput object.
#include <Fusion/MeshBody/MeshRemeshFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshRemeshFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshRemeshFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshRemeshFeatures Object

MeshRemeshFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh re-mesh features in a component and supports the ability to create new mesh re-mesh features.

Methods

Name | Description
add | Creates a mesh re-mesh 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 MeshRemeshFeatureInput object. Use properties and methods on this object to define the mesh re-mesh you want to create and then use the add method, passing in the MeshRemeshFeatureInput object.
item | Function that returns the specified mesh re-mesh feature using an index into the collection.
itemByName | Function that returns the specified MeshRemesh feature using the name of the feature.

Properties

Name | Description
count | The number of mesh re-mesh 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshRemeshFeatures

Version

Introduced in version March 2024


MeshRemeshFeatures.add Method

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Creates a mesh re-mesh feature.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
returnValue = meshRemeshFeatures_var.add(input)
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

#include <Fusion/MeshBody/MeshRemeshFeatures.h>

returnValue = meshRemeshFeatures_var->add(input);

Return Value

Type | Description
MeshRemeshFeature | Returns the newly created MeshRemeshFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshRemeshFeatureInput | A MeshRemeshFeatureInput object that defines the desired re-mesh feature. Use the createInput method to create a new MeshRemeshFeatureInput object and then use methods on it (the MeshRemeshFeatureInput object) to define the re-mesh.

Version

Introduced in version March 2024


MeshRemeshFeatures.classType Method

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRemeshFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRemeshFeatures.h>

returnValue = adsk::fusion::MeshRemeshFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRemeshFeatures.count Property

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

The number of mesh re-mesh features in the collection.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

# Get the value of the property.
propertyValue = meshRemeshFeatures_var.count
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
#include <Fusion/MeshBody/MeshRemeshFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshRemeshFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


MeshRemeshFeatures.createInput Method

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Creates a MeshRemeshFeatureInput object. Use properties and methods on this object to define the mesh re-mesh you want to create and then use the add method, passing in the MeshRemeshFeatureInput object.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
returnValue = meshRemeshFeatures_var.createInput(mesh)
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

#include <Fusion/MeshBody/MeshRemeshFeatures.h>

returnValue = meshRemeshFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshRemeshFeatureInput | Returns the newly created MeshRemeshFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version March 2024


MeshRemeshFeatures.isValid Property

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

# Get the value of the property.
propertyValue = meshRemeshFeatures_var.isValid
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
#include <Fusion/MeshBody/MeshRemeshFeatures.h>

// Get the value of the property.
boolean propertyValue = meshRemeshFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRemeshFeatures.item Method

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Function that returns the specified mesh re-mesh feature using an index into the collection.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
returnValue = meshRemeshFeatures_var.item(index)
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

#include <Fusion/MeshBody/MeshRemeshFeatures.h>

returnValue = meshRemeshFeatures_var->item(index);

Return Value

Type | Description
MeshRemeshFeature | 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 2024


MeshRemeshFeatures.itemByName Method

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

Function that returns the specified MeshRemesh feature using the name of the feature.

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
returnValue = meshRemeshFeatures_var.itemByName(name)
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

#include <Fusion/MeshBody/MeshRemeshFeatures.h>

returnValue = meshRemeshFeatures_var->itemByName(name);

Return Value

Type | Description
MeshRemeshFeature | 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 March 2024


MeshRemeshFeatures.objectType Property

Parent Object: MeshRemeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRemeshFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.

# Get the value of the property.
propertyValue = meshRemeshFeatures_var.objectType
"meshRemeshFeatures_var" is a variable referencing a MeshRemeshFeatures object.
#include <Fusion/MeshBody/MeshRemeshFeatures.h>

// Get the value of the property.
string propertyValue = meshRemeshFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeature Object

MeshRepairFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh repair feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
density | Controls the density of the newly created triangles in RebuildMeshRepairType. The values can range between 8 and 256. Only valid if meshRepairType is RebuildMeshRepairType.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
meshRepairRebuildType | Gets and sets the type of mesh repair rebuild mode. Only valid if meshRepairType is RebuildMeshRepairType.
meshRepairType | Gets and sets the type of mesh repair.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset | Gets and sets the offset from the original mesh to newly created mesh. Only valid if meshRepairType is RebuildMeshRepairType and meshRepairRebuildType is AccurateMeshRepairRebuildType.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshRepairFeature.createForAssemblyContext, MeshRepairFeature.nativeObject, MeshRepairFeatures.add, MeshRepairFeatures.item, MeshRepairFeatures.itemByName

Version

Introduced in version March 2024


MeshRepairFeature.assemblyContext Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.assemblyContext
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshRepairFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshRepairFeature.attributes Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.attributes
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshRepairFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshRepairFeature.baseFeature Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.baseFeature
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshRepairFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshRepairFeature.bodies Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.bodies
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshRepairFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshRepairFeature.classType Method

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRepairFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRepairFeature.h>

returnValue = adsk::fusion::MeshRepairFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRepairFeature.createForAssemblyContext Method

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
returnValue = meshRepairFeature_var.createForAssemblyContext(occurrence)
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

#include <Fusion/MeshBody/MeshRepairFeature.h>

returnValue = meshRepairFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshRepairFeature | 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 2024


MeshRepairFeature.deleteMe Method

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
returnValue = meshRepairFeature_var.deleteMe()
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

#include <Fusion/MeshBody/MeshRepairFeature.h>

returnValue = meshRepairFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshRepairFeature.density Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Controls the density of the newly created triangles in RebuildMeshRepairType. The values can range between 8 and 256. Only valid if meshRepairType is RebuildMeshRepairType.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.density
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshRepairFeature_var->density();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshRepairFeature.dissolve Method

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
returnValue = meshRepairFeature_var.dissolve()
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

#include <Fusion/MeshBody/MeshRepairFeature.h>

returnValue = meshRepairFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshRepairFeature.entityToken Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.entityToken
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
string propertyValue = meshRepairFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeature.errorOrWarningMessage Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.errorOrWarningMessage
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
string propertyValue = meshRepairFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeature.faces Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.faces
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshRepairFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshRepairFeature.healthState Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.healthState
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshRepairFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshRepairFeature.isParametric Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.isParametric
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
boolean propertyValue = meshRepairFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRepairFeature.isSuppressed Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.isSuppressed

# Set the value of the property.
meshRepairFeature_var.isSuppressed = propertyValue
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
boolean propertyValue = meshRepairFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshRepairFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshRepairFeature.isValid Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.isValid
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
boolean propertyValue = meshRepairFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRepairFeature.linkedFeatures Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.linkedFeatures
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshRepairFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshRepairFeature.mesh Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.mesh

# Set the value of the property.
meshRepairFeature_var.mesh = propertyValue
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshRepairFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshRepairFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshRepairFeature.meshRepairRebuildType Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Gets and sets the type of mesh repair rebuild mode. Only valid if meshRepairType is RebuildMeshRepairType.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.meshRepairRebuildType

# Set the value of the property.
meshRepairFeature_var.meshRepairRebuildType = propertyValue
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
MeshRepairRebuildTypes propertyValue = meshRepairFeature_var->meshRepairRebuildType();

// Set the value of the property, where value_var is a MeshRepairRebuildTypes.
bool returnValue = meshRepairFeature_var->meshRepairRebuildType(value_var);

Property Value

This is a read/write property whose value is a MeshRepairRebuildTypes.

Version

Introduced in version March 2024


MeshRepairFeature.meshRepairType Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Gets and sets the type of mesh repair.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.meshRepairType

# Set the value of the property.
meshRepairFeature_var.meshRepairType = propertyValue
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
MeshRepairTypes propertyValue = meshRepairFeature_var->meshRepairType();

// Set the value of the property, where value_var is a MeshRepairTypes.
bool returnValue = meshRepairFeature_var->meshRepairType(value_var);

Property Value

This is a read/write property whose value is a MeshRepairTypes.

Version

Introduced in version March 2024


MeshRepairFeature.name Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.name

# Set the value of the property.
meshRepairFeature_var.name = propertyValue
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
string propertyValue = meshRepairFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshRepairFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeature.nativeObject Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.nativeObject
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<MeshRepairFeature> propertyValue = meshRepairFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshRepairFeature.

Version

Introduced in version March 2024


MeshRepairFeature.objectType Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.objectType
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
string propertyValue = meshRepairFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeature.offset Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Gets and sets the offset from the original mesh to newly created mesh. Only valid if meshRepairType is RebuildMeshRepairType and meshRepairRebuildType is AccurateMeshRepairRebuildType.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.offset
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshRepairFeature_var->offset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshRepairFeature.parentComponent Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.parentComponent
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshRepairFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshRepairFeature.timelineObject Property

Parent Object: MeshRepairFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.

# Get the value of the property.
propertyValue = meshRepairFeature_var.timelineObject
"meshRepairFeature_var" is a variable referencing a MeshRepairFeature object.
#include <Fusion/MeshBody/MeshRepairFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshRepairFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshRepairFeatureInput Object

MeshRepairFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh repair feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
density | Controls the density of the newly created triangles in RebuildMeshRepairType, default value is 128. The values can range between 8 and 256. Only valid if meshRepairType is RebuildMeshRepairType.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mesh | Gets and sets the input mesh body.
meshRepairRebuildType | Gets and sets the type of mesh repair rebuild mode, default value is FastMeshRepairRebuildType. Only valid if meshRepairType is RebuildMeshRepairType.
meshRepairType | Gets and sets the type of mesh repair, default value is StitchAndRemoveMeshRepairType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset | Gets and sets the offset from the original mesh to the newly created mesh, default value is zero. Only valid if meshRepairType is RebuildMeshRepairType and meshRepairRebuildType is AccurateMeshRepairRebuildType.
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

MeshRepairFeatures.createInput

Version

Introduced in version March 2024


MeshRepairFeatureInput.classType Method

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRepairFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

returnValue = adsk::fusion::MeshRepairFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRepairFeatureInput.density Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Controls the density of the newly created triangles in RebuildMeshRepairType, default value is 128. The values can range between 8 and 256. Only valid if meshRepairType is RebuildMeshRepairType.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.density

# Set the value of the property.
meshRepairFeatureInput_var.density = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshRepairFeatureInput_var->density();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshRepairFeatureInput_var->density(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshRepairFeatureInput.isValid Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.isValid
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshRepairFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRepairFeatureInput.mesh Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.mesh

# Set the value of the property.
meshRepairFeatureInput_var.mesh = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshRepairFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshRepairFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshRepairFeatureInput.meshRepairRebuildType Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Gets and sets the type of mesh repair rebuild mode, default value is FastMeshRepairRebuildType. Only valid if meshRepairType is RebuildMeshRepairType.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.meshRepairRebuildType

# Set the value of the property.
meshRepairFeatureInput_var.meshRepairRebuildType = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
MeshRepairRebuildTypes propertyValue = meshRepairFeatureInput_var->meshRepairRebuildType();

// Set the value of the property, where value_var is a MeshRepairRebuildTypes.
bool returnValue = meshRepairFeatureInput_var->meshRepairRebuildType(value_var);

Property Value

This is a read/write property whose value is a MeshRepairRebuildTypes.

Version

Introduced in version March 2024


MeshRepairFeatureInput.meshRepairType Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Gets and sets the type of mesh repair, default value is StitchAndRemoveMeshRepairType.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.meshRepairType

# Set the value of the property.
meshRepairFeatureInput_var.meshRepairType = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
MeshRepairTypes propertyValue = meshRepairFeatureInput_var->meshRepairType();

// Set the value of the property, where value_var is a MeshRepairTypes.
bool returnValue = meshRepairFeatureInput_var->meshRepairType(value_var);

Property Value

This is a read/write property whose value is a MeshRepairTypes.

Version

Introduced in version March 2024


MeshRepairFeatureInput.objectType Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.objectType
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
string propertyValue = meshRepairFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshRepairFeatureInput.offset Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

Description

Gets and sets the offset from the original mesh to the newly created mesh, default value is zero. Only valid if meshRepairType is RebuildMeshRepairType and meshRepairRebuildType is AccurateMeshRepairRebuildType.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.offset

# Set the value of the property.
meshRepairFeatureInput_var.offset = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshRepairFeatureInput_var->offset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshRepairFeatureInput_var->offset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshRepairFeatureInput.targetBaseFeature Property

Parent Object: MeshRepairFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.

# Get the value of the property.
propertyValue = meshRepairFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshRepairFeatureInput_var.targetBaseFeature = propertyValue
"meshRepairFeatureInput_var" is a variable referencing a MeshRepairFeatureInput object.
#include <Fusion/MeshBody/MeshRepairFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshRepairFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshRepairFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshRepairFeatures Object

MeshRepairFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh repair features in a component and supports the ability to create new mesh repair features.

Methods

Name | Description
add | Creates a mesh repair 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 MeshRepairFeatureInput object. Use properties and methods on this object to define the mesh repair you want to create and then use the add method, passing in the MeshRepairFeatureInput object.
item | Function that returns the specified mesh repair feature using an index into the collection.
itemByName | Function that returns the specified MeshRepair feature using the name of the feature.

Properties

Name | Description
count | The number of mesh repair 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshRepairFeatures

Version

Introduced in version March 2024


MeshRepairFeatures.add Method

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Creates a mesh repair feature.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
returnValue = meshRepairFeatures_var.add(input)
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

#include <Fusion/MeshBody/MeshRepairFeatures.h>

returnValue = meshRepairFeatures_var->add(input);

Return Value

Type | Description
MeshRepairFeature | Returns the newly created MeshRepairFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshRepairFeatureInput | A MeshRepairFeatureInput object that defines the desired repair feature. Use the createInput method to create a new MeshRepairFeatureInput object and then use methods on it (the MeshRepairFeatureInput object) to define the repair.

Version

Introduced in version March 2024


MeshRepairFeatures.classType Method

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshRepairFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshRepairFeatures.h>

returnValue = adsk::fusion::MeshRepairFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshRepairFeatures.count Property

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

The number of mesh repair features in the collection.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

# Get the value of the property.
propertyValue = meshRepairFeatures_var.count
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
#include <Fusion/MeshBody/MeshRepairFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshRepairFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


MeshRepairFeatures.createInput Method

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Creates a MeshRepairFeatureInput object. Use properties and methods on this object to define the mesh repair you want to create and then use the add method, passing in the MeshRepairFeatureInput object.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
returnValue = meshRepairFeatures_var.createInput(mesh)
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

#include <Fusion/MeshBody/MeshRepairFeatures.h>

returnValue = meshRepairFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshRepairFeatureInput | Returns the newly created MeshRepairFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version March 2024


MeshRepairFeatures.isValid Property

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

# Get the value of the property.
propertyValue = meshRepairFeatures_var.isValid
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
#include <Fusion/MeshBody/MeshRepairFeatures.h>

// Get the value of the property.
boolean propertyValue = meshRepairFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshRepairFeatures.item Method

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Function that returns the specified mesh repair feature using an index into the collection.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
returnValue = meshRepairFeatures_var.item(index)
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

#include <Fusion/MeshBody/MeshRepairFeatures.h>

returnValue = meshRepairFeatures_var->item(index);

Return Value

Type | Description
MeshRepairFeature | 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 2024


MeshRepairFeatures.itemByName Method

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

Function that returns the specified MeshRepair feature using the name of the feature.

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
returnValue = meshRepairFeatures_var.itemByName(name)
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

#include <Fusion/MeshBody/MeshRepairFeatures.h>

returnValue = meshRepairFeatures_var->itemByName(name);

Return Value

Type | Description
MeshRepairFeature | 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 March 2024


MeshRepairFeatures.objectType Property

Parent Object: MeshRepairFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshRepairFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.

# Get the value of the property.
propertyValue = meshRepairFeatures_var.objectType
"meshRepairFeatures_var" is a variable referencing a MeshRepairFeatures object.
#include <Fusion/MeshBody/MeshRepairFeatures.h>

// Get the value of the property.
string propertyValue = meshRepairFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshReverseNormalFeature Object

MeshReverseNormalFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing MeshReverseNormal feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
mesh Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshReverseNormalFeature.createForAssemblyContext, MeshReverseNormalFeature.nativeObject, MeshReverseNormalFeatures.add, MeshReverseNormalFeatures.item, MeshReverseNormalFeatures.itemByName

Version

Introduced in version July 2025


MeshReverseNormalFeature.assemblyContext Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.assemblyContext
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshReverseNormalFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2025


MeshReverseNormalFeature.attributes Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.attributes
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshReverseNormalFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2025


MeshReverseNormalFeature.baseFeature Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.baseFeature
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshReverseNormalFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshReverseNormalFeature.bodies Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.bodies
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshReverseNormalFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version July 2025


MeshReverseNormalFeature.classType Method

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReverseNormalFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

returnValue = adsk::fusion::MeshReverseNormalFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshReverseNormalFeature.createForAssemblyContext Method

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
returnValue = meshReverseNormalFeature_var.createForAssemblyContext(occurrence)
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

returnValue = meshReverseNormalFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshReverseNormalFeature | 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 2025


MeshReverseNormalFeature.deleteMe Method

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
returnValue = meshReverseNormalFeature_var.deleteMe()
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

returnValue = meshReverseNormalFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version July 2025


MeshReverseNormalFeature.dissolve Method

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
returnValue = meshReverseNormalFeature_var.dissolve()
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

returnValue = meshReverseNormalFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version July 2025


MeshReverseNormalFeature.entityToken Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.entityToken
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshReverseNormalFeature.errorOrWarningMessage Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.errorOrWarningMessage
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshReverseNormalFeature.faces Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.faces
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshReverseNormalFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version July 2025


MeshReverseNormalFeature.healthState Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.healthState
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshReverseNormalFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2025


MeshReverseNormalFeature.isParametric Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.isParametric
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = meshReverseNormalFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshReverseNormalFeature.isSuppressed Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.isSuppressed

# Set the value of the property.
meshReverseNormalFeature_var.isSuppressed = propertyValue
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = meshReverseNormalFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshReverseNormalFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshReverseNormalFeature.isValid Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.isValid
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = meshReverseNormalFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshReverseNormalFeature.linkedFeatures Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.linkedFeatures
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshReverseNormalFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version July 2025


MeshReverseNormalFeature.mesh Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.mesh

# Set the value of the property.
meshReverseNormalFeature_var.mesh = propertyValue
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshReverseNormalFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshReverseNormalFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


MeshReverseNormalFeature.name Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.name

# Set the value of the property.
meshReverseNormalFeature_var.name = propertyValue
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshReverseNormalFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


MeshReverseNormalFeature.nativeObject Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.nativeObject
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<MeshReverseNormalFeature> propertyValue = meshReverseNormalFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshReverseNormalFeature.

Version

Introduced in version July 2025


MeshReverseNormalFeature.objectType Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.objectType
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshReverseNormalFeature.parentComponent Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.parentComponent
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshReverseNormalFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2025


MeshReverseNormalFeature.timelineObject Property

Parent Object: MeshReverseNormalFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.

# Get the value of the property.
propertyValue = meshReverseNormalFeature_var.timelineObject
"meshReverseNormalFeature_var" is a variable referencing a MeshReverseNormalFeature object.
#include <Fusion/MeshBody/MeshReverseNormalFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshReverseNormalFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput Object

MeshReverseNormalFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a MeshReverseNormal feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
mesh | Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

MeshReverseNormalFeatures.createInput

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput.classType Method

Parent Object: MeshReverseNormalFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReverseNormalFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

returnValue = adsk::fusion::MeshReverseNormalFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput.isValid Property

Parent Object: MeshReverseNormalFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatureInput_var.isValid
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.
#include <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshReverseNormalFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput.mesh Property

Parent Object: MeshReverseNormalFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

Description

Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

Syntax

  • Python
  • C++
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatureInput_var.mesh

# Set the value of the property.
meshReverseNormalFeatureInput_var.mesh = propertyValue
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.
#include <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshReverseNormalFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshReverseNormalFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput.objectType Property

Parent Object: MeshReverseNormalFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatureInput_var.objectType
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.
#include <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshReverseNormalFeatureInput.targetBaseFeature Property

Parent Object: MeshReverseNormalFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshReverseNormalFeatureInput_var.targetBaseFeature = propertyValue
"meshReverseNormalFeatureInput_var" is a variable referencing a MeshReverseNormalFeatureInput object.
#include <Fusion/MeshBody/MeshReverseNormalFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshReverseNormalFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshReverseNormalFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshReverseNormalFeatures Object

MeshReverseNormalFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing MeshReverseNormal features in a component and supports the ability to create new MeshReverseNormal features.

Methods

Name | Description
add | Creates a mesh 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().
createInput | Creates a MeshReverseNormalFeatureInput object. Use properties and methods on this object to define the mesh reverse normal you want to create and then use the add method, passing in the MeshReverseNormalFeatureInput object.
item | Function that returns the specified mesh reverse normal feature using an index into the collection.
itemByName | Function that returns the specified MeshReverseNormal feature using the name of the feature.

Properties

Name | Description
count | The number of mesh 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version July 2025


MeshReverseNormalFeatures.add Method

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Creates a mesh reverse normal feature.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
returnValue = meshReverseNormalFeatures_var.add(input)
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

returnValue = meshReverseNormalFeatures_var->add(input);

Return Value

Type | Description
MeshReverseNormalFeature | Returns the newly created MeshReverseNormalFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshReverseNormalFeatureInput | A MeshReverseNormalFeatureInput object that defines the desired MeshReverseNormal feature. Use the createInput method to create a new MeshReverseNormalFeatureInput object and then use methods on it (the MeshReverseNormalFeatureInput object) to define the normal reversion.

Version

Introduced in version July 2025


MeshReverseNormalFeatures.classType Method

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshReverseNormalFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

returnValue = adsk::fusion::MeshReverseNormalFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshReverseNormalFeatures.count Property

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

The number of mesh reverse normal features in the collection.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatures_var.count
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshReverseNormalFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2025


MeshReverseNormalFeatures.createInput Method

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Creates a MeshReverseNormalFeatureInput object. Use properties and methods on this object to define the mesh reverse normal you want to create and then use the add method, passing in the MeshReverseNormalFeatureInput object.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
returnValue = meshReverseNormalFeatures_var.createInput(mesh)
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

returnValue = meshReverseNormalFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshReverseNormalFeatureInput | Returns the newly created MeshReverseNormalFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A mesh body or an object collection with face groups in either a parametric or direct modeling design.

Version

Introduced in version July 2025


MeshReverseNormalFeatures.isValid Property

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatures_var.isValid
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

// Get the value of the property.
boolean propertyValue = meshReverseNormalFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshReverseNormalFeatures.item Method

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Function that returns the specified mesh reverse normal feature using an index into the collection.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
returnValue = meshReverseNormalFeatures_var.item(index)
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

returnValue = meshReverseNormalFeatures_var->item(index);

Return Value

Type | Description
MeshReverseNormalFeature | 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 2025


MeshReverseNormalFeatures.itemByName Method

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

Function that returns the specified MeshReverseNormal feature using the name of the feature.

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
returnValue = meshReverseNormalFeatures_var.itemByName(name)
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

returnValue = meshReverseNormalFeatures_var->itemByName(name);

Return Value

Type | Description
MeshReverseNormalFeature | 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 July 2025


MeshReverseNormalFeatures.objectType Property

Parent Object: MeshReverseNormalFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshReverseNormalFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.

# Get the value of the property.
propertyValue = meshReverseNormalFeatures_var.objectType
"meshReverseNormalFeatures_var" is a variable referencing a MeshReverseNormalFeatures object.
#include <Fusion/MeshBody/MeshReverseNormalFeatures.h>

// Get the value of the property.
string propertyValue = meshReverseNormalFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeature Object

MeshSeparateFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing MeshSeparate feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isKeepBody | Preserves a copy of the original mesh body.
isMultipleBodies | Separates each face group into an independent mesh body. Only valid if face groups are used as inputs.
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.
mesh Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
meshSeparateType | Gets and sets the output type of mesh separation.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshSeparateFeature.createForAssemblyContext, MeshSeparateFeature.nativeObject, MeshSeparateFeatures.add, MeshSeparateFeatures.item, MeshSeparateFeatures.itemByName

Version

Introduced in version July 2025


MeshSeparateFeature.assemblyContext Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.assemblyContext
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshSeparateFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2025


MeshSeparateFeature.attributes Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.attributes
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshSeparateFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2025


MeshSeparateFeature.baseFeature Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.baseFeature
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshSeparateFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshSeparateFeature.bodies Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.bodies
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshSeparateFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version July 2025


MeshSeparateFeature.classType Method

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSeparateFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSeparateFeature.h>

returnValue = adsk::fusion::MeshSeparateFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshSeparateFeature.createForAssemblyContext Method

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
returnValue = meshSeparateFeature_var.createForAssemblyContext(occurrence)
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

#include <Fusion/MeshBody/MeshSeparateFeature.h>

returnValue = meshSeparateFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshSeparateFeature | 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 2025


MeshSeparateFeature.deleteMe Method

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
returnValue = meshSeparateFeature_var.deleteMe()
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

#include <Fusion/MeshBody/MeshSeparateFeature.h>

returnValue = meshSeparateFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version July 2025


MeshSeparateFeature.dissolve Method

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
returnValue = meshSeparateFeature_var.dissolve()
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

#include <Fusion/MeshBody/MeshSeparateFeature.h>

returnValue = meshSeparateFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version July 2025


MeshSeparateFeature.entityToken Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.entityToken
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
string propertyValue = meshSeparateFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeature.errorOrWarningMessage Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.errorOrWarningMessage
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
string propertyValue = meshSeparateFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeature.faces Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.faces
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshSeparateFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version July 2025


MeshSeparateFeature.healthState Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.healthState
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshSeparateFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2025


MeshSeparateFeature.isKeepBody Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Preserves a copy of the original mesh body.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.isKeepBody

# Set the value of the property.
meshSeparateFeature_var.isKeepBody = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeature_var->isKeepBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSeparateFeature_var->isKeepBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeature.isMultipleBodies Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Separates each face group into an independent mesh body. Only valid if face groups are used as inputs.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.isMultipleBodies

# Set the value of the property.
meshSeparateFeature_var.isMultipleBodies = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeature_var->isMultipleBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSeparateFeature_var->isMultipleBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeature.isParametric Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.isParametric
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeature.isSuppressed Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.isSuppressed

# Set the value of the property.
meshSeparateFeature_var.isSuppressed = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSeparateFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeature.isValid Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.isValid
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeature.linkedFeatures Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.linkedFeatures
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshSeparateFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version July 2025


MeshSeparateFeature.mesh Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.mesh

# Set the value of the property.
meshSeparateFeature_var.mesh = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshSeparateFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshSeparateFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


MeshSeparateFeature.meshSeparateType Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Gets and sets the output type of mesh separation.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.meshSeparateType

# Set the value of the property.
meshSeparateFeature_var.meshSeparateType = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
MeshSeparateTypes propertyValue = meshSeparateFeature_var->meshSeparateType();

// Set the value of the property, where value_var is a MeshSeparateTypes.
bool returnValue = meshSeparateFeature_var->meshSeparateType(value_var);

Property Value

This is a read/write property whose value is a MeshSeparateTypes.

Version

Introduced in version July 2025


MeshSeparateFeature.name Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.name

# Set the value of the property.
meshSeparateFeature_var.name = propertyValue
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
string propertyValue = meshSeparateFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshSeparateFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeature.nativeObject Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.nativeObject
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<MeshSeparateFeature> propertyValue = meshSeparateFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshSeparateFeature.

Version

Introduced in version July 2025


MeshSeparateFeature.objectType Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.objectType
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
string propertyValue = meshSeparateFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeature.parentComponent Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.parentComponent
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshSeparateFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2025


MeshSeparateFeature.timelineObject Property

Parent Object: MeshSeparateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.

# Get the value of the property.
propertyValue = meshSeparateFeature_var.timelineObject
"meshSeparateFeature_var" is a variable referencing a MeshSeparateFeature object.
#include <Fusion/MeshBody/MeshSeparateFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshSeparateFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2025


MeshSeparateFeatureInput Object

MeshSeparateFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a MeshSeparate feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isKeepBody | Preserves a copy of the original mesh body. Default value is false.
isMultipleBodies
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mesh | Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.
meshSeparateType | Gets and sets the output type of mesh separation, default value is ShellMeshSeparateType. Only valid if the input is a mesh body.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

MeshSeparateFeatures.createInput

Version

Introduced in version July 2025


MeshSeparateFeatureInput.classType Method

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSeparateFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

returnValue = adsk::fusion::MeshSeparateFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.isKeepBody Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Preserves a copy of the original mesh body. Default value is false.

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.isKeepBody

# Set the value of the property.
meshSeparateFeatureInput_var.isKeepBody = propertyValue
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeatureInput_var->isKeepBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSeparateFeatureInput_var->isKeepBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.isMultipleBodies Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.isMultipleBodies

# Set the value of the property.
meshSeparateFeatureInput_var.isMultipleBodies = propertyValue
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeatureInput_var->isMultipleBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSeparateFeatureInput_var->isMultipleBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.isValid Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.isValid
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.mesh Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Gets and sets the input mesh body. This can either be a mesh body or an object collection with face groups.

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.mesh

# Set the value of the property.
meshSeparateFeatureInput_var.mesh = propertyValue
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshSeparateFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshSeparateFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.meshSeparateType Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

Gets and sets the output type of mesh separation, default value is ShellMeshSeparateType. Only valid if the input is a mesh body.

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.meshSeparateType

# Set the value of the property.
meshSeparateFeatureInput_var.meshSeparateType = propertyValue
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
MeshSeparateTypes propertyValue = meshSeparateFeatureInput_var->meshSeparateType();

// Set the value of the property, where value_var is a MeshSeparateTypes.
bool returnValue = meshSeparateFeatureInput_var->meshSeparateType(value_var);

Property Value

This is a read/write property whose value is a MeshSeparateTypes.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.objectType Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.objectType
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
string propertyValue = meshSeparateFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshSeparateFeatureInput.targetBaseFeature Property

Parent Object: MeshSeparateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.

# Get the value of the property.
propertyValue = meshSeparateFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshSeparateFeatureInput_var.targetBaseFeature = propertyValue
"meshSeparateFeatureInput_var" is a variable referencing a MeshSeparateFeatureInput object.
#include <Fusion/MeshBody/MeshSeparateFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshSeparateFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshSeparateFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version July 2025


MeshSeparateFeatures Object

MeshSeparateFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing MeshSeparate features in a component and supports the ability to create new MeshSeparate features.

Methods

Name | Description
add | Creates a mesh separate 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 MeshSeparateFeatureInput object. Use properties and methods on this object to define the mesh separate you want to create and then use the add method, passing in the MeshSeparateFeatureInput object.
item | Function that returns the specified mesh separate feature using an index into the collection.
itemByName | Function that returns the specified MeshSeparate feature using the name of the feature.

Properties

Name | Description
count | The number of mesh separate 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version July 2025


MeshSeparateFeatures.add Method

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Creates a mesh separate feature.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
returnValue = meshSeparateFeatures_var.add(input)
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

#include <Fusion/MeshBody/MeshSeparateFeatures.h>

returnValue = meshSeparateFeatures_var->add(input);

Return Value

Type | Description
MeshSeparateFeature | Returns the newly created MeshSeparateFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshSeparateFeatureInput | A MeshSeparateFeatureInput object that defines the desired MeshSeparate feature. Use the createInput method to create a new MeshSeparateFeatureInput object and then use methods on it (the MeshSeparateFeatureInput object) to define the separation.

Version

Introduced in version July 2025


MeshSeparateFeatures.classType Method

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSeparateFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSeparateFeatures.h>

returnValue = adsk::fusion::MeshSeparateFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MeshSeparateFeatures.count Property

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

The number of mesh separate features in the collection.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

# Get the value of the property.
propertyValue = meshSeparateFeatures_var.count
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
#include <Fusion/MeshBody/MeshSeparateFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshSeparateFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2025


MeshSeparateFeatures.createInput Method

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Creates a MeshSeparateFeatureInput object. Use properties and methods on this object to define the mesh separate you want to create and then use the add method, passing in the MeshSeparateFeatureInput object.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
returnValue = meshSeparateFeatures_var.createInput(mesh)
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

#include <Fusion/MeshBody/MeshSeparateFeatures.h>

returnValue = meshSeparateFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshSeparateFeatureInput | Returns the newly created MeshSeparateFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A mesh body or an object collection with face groups in either a parametric or direct modeling design.

Version

Introduced in version July 2025


MeshSeparateFeatures.isValid Property

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

# Get the value of the property.
propertyValue = meshSeparateFeatures_var.isValid
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
#include <Fusion/MeshBody/MeshSeparateFeatures.h>

// Get the value of the property.
boolean propertyValue = meshSeparateFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MeshSeparateFeatures.item Method

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Function that returns the specified mesh separate feature using an index into the collection.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
returnValue = meshSeparateFeatures_var.item(index)
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

#include <Fusion/MeshBody/MeshSeparateFeatures.h>

returnValue = meshSeparateFeatures_var->item(index);

Return Value

Type | Description
MeshSeparateFeature | 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 2025


MeshSeparateFeatures.itemByName Method

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

Function that returns the specified MeshSeparate feature using the name of the feature.

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
returnValue = meshSeparateFeatures_var.itemByName(name)
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

#include <Fusion/MeshBody/MeshSeparateFeatures.h>

returnValue = meshSeparateFeatures_var->itemByName(name);

Return Value

Type | Description
MeshSeparateFeature | 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 July 2025


MeshSeparateFeatures.objectType Property

Parent Object: MeshSeparateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSeparateFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.

# Get the value of the property.
propertyValue = meshSeparateFeatures_var.objectType
"meshSeparateFeatures_var" is a variable referencing a MeshSeparateFeatures object.
#include <Fusion/MeshBody/MeshSeparateFeatures.h>

// Get the value of the property.
string propertyValue = meshSeparateFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MeshShellFeature Object

MeshShellFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing mesh shell feature in a design.

To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
thickness | Controls the thickness of the shell.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshShellFeature.createForAssemblyContext, MeshShellFeature.nativeObject, MeshShellFeatures.add, MeshShellFeatures.item, MeshShellFeatures.itemByName

Version

Introduced in version March 2024


MeshShellFeature.assemblyContext Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.assemblyContext
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshShellFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshShellFeature.attributes Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.attributes
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshShellFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshShellFeature.baseFeature Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.baseFeature
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshShellFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshShellFeature.bodies Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.bodies
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshShellFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshShellFeature.classType Method

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshShellFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshShellFeature.h>

returnValue = adsk::fusion::MeshShellFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshShellFeature.createForAssemblyContext Method

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
returnValue = meshShellFeature_var.createForAssemblyContext(occurrence)
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

#include <Fusion/MeshBody/MeshShellFeature.h>

returnValue = meshShellFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshShellFeature | 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 2024


MeshShellFeature.deleteMe Method

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
returnValue = meshShellFeature_var.deleteMe()
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

#include <Fusion/MeshBody/MeshShellFeature.h>

returnValue = meshShellFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshShellFeature.dissolve Method

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
returnValue = meshShellFeature_var.dissolve()
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

#include <Fusion/MeshBody/MeshShellFeature.h>

returnValue = meshShellFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshShellFeature.entityToken Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.entityToken
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
string propertyValue = meshShellFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshShellFeature.errorOrWarningMessage Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.errorOrWarningMessage
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
string propertyValue = meshShellFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshShellFeature.faces Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.faces
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshShellFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshShellFeature.healthState Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.healthState
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshShellFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshShellFeature.isParametric Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.isParametric
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
boolean propertyValue = meshShellFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshShellFeature.isSuppressed Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.isSuppressed

# Set the value of the property.
meshShellFeature_var.isSuppressed = propertyValue
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
boolean propertyValue = meshShellFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshShellFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshShellFeature.isValid Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.isValid
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
boolean propertyValue = meshShellFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshShellFeature.linkedFeatures Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.linkedFeatures
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshShellFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshShellFeature.mesh Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.mesh

# Set the value of the property.
meshShellFeature_var.mesh = propertyValue
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshShellFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshShellFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshShellFeature.name Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.name

# Set the value of the property.
meshShellFeature_var.name = propertyValue
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
string propertyValue = meshShellFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshShellFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshShellFeature.nativeObject Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

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.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.nativeObject
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<MeshShellFeature> propertyValue = meshShellFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshShellFeature.

Version

Introduced in version March 2024


MeshShellFeature.objectType Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.objectType
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
string propertyValue = meshShellFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshShellFeature.parentComponent Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.parentComponent
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshShellFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshShellFeature.thickness Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Controls the thickness of the shell.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.thickness
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshShellFeature_var->thickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshShellFeature.timelineObject Property

Parent Object: MeshShellFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.

# Get the value of the property.
propertyValue = meshShellFeature_var.timelineObject
"meshShellFeature_var" is a variable referencing a MeshShellFeature object.
#include <Fusion/MeshBody/MeshShellFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshShellFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshShellFeatureInput Object

MeshShellFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a mesh shell feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
mesh | Gets and sets the input mesh body.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | Controls the thickness of the created shell. The default value is 0.2.

Accessed From

MeshShellFeatures.createInput

Version

Introduced in version March 2024


MeshShellFeatureInput.classType Method

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshShellFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshShellFeatureInput.h>

returnValue = adsk::fusion::MeshShellFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshShellFeatureInput.isValid Property

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.

# Get the value of the property.
propertyValue = meshShellFeatureInput_var.isValid
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.
#include <Fusion/MeshBody/MeshShellFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshShellFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshShellFeatureInput.mesh Property

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.

# Get the value of the property.
propertyValue = meshShellFeatureInput_var.mesh

# Set the value of the property.
meshShellFeatureInput_var.mesh = propertyValue
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.
#include <Fusion/MeshBody/MeshShellFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshShellFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshShellFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshShellFeatureInput.objectType Property

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.

# Get the value of the property.
propertyValue = meshShellFeatureInput_var.objectType
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.
#include <Fusion/MeshBody/MeshShellFeatureInput.h>

// Get the value of the property.
string propertyValue = meshShellFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshShellFeatureInput.targetBaseFeature Property

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.

# Get the value of the property.
propertyValue = meshShellFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshShellFeatureInput_var.targetBaseFeature = propertyValue
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.
#include <Fusion/MeshBody/MeshShellFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshShellFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshShellFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshShellFeatureInput.thickness Property

Parent Object: MeshShellFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatureInput.h>

Description

Controls the thickness of the created shell. The default value is 0.2.

Syntax

  • Python
  • C++
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.

# Get the value of the property.
propertyValue = meshShellFeatureInput_var.thickness

# Set the value of the property.
meshShellFeatureInput_var.thickness = propertyValue
"meshShellFeatureInput_var" is a variable referencing a MeshShellFeatureInput object.
#include <Fusion/MeshBody/MeshShellFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshShellFeatureInput_var->thickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshShellFeatureInput_var->thickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshShellFeatures Object

MeshShellFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing mesh shell features in a component and supports the ability to create new mesh shell features.

Methods

Name | Description
add | Creates a mesh 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 MeshShellFeatureInput object. Use properties and methods on this object to define the mesh shell you want to create and then use the add method, passing in the MeshShellFeatureInput object.
item | Function that returns the specified mesh shell feature using an index into the collection.
itemByName | Function that returns the specified MeshShell feature using the name of the feature.

Properties

Name | Description
count | The number of mesh 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshShellFeatures

Version

Introduced in version March 2024


MeshShellFeatures.add Method

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Creates a mesh shell feature.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
returnValue = meshShellFeatures_var.add(input)
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

#include <Fusion/MeshBody/MeshShellFeatures.h>

returnValue = meshShellFeatures_var->add(input);

Return Value

Type | Description
MeshShellFeature | Returns the newly created MeshShellFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshShellFeatureInput | A MeshShellFeatureInput object that defines the desired shell feature. Use the createInput method to create a new MeshShellFeatureInput object and then use methods on it (the MeshShellFeatureInput object) to define the shell.

Version

Introduced in version March 2024


MeshShellFeatures.classType Method

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshShellFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshShellFeatures.h>

returnValue = adsk::fusion::MeshShellFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshShellFeatures.count Property

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

The number of mesh shell features in the collection.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

# Get the value of the property.
propertyValue = meshShellFeatures_var.count
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
#include <Fusion/MeshBody/MeshShellFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshShellFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


MeshShellFeatures.createInput Method

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Creates a MeshShellFeatureInput object. Use properties and methods on this object to define the mesh shell you want to create and then use the add method, passing in the MeshShellFeatureInput object.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
returnValue = meshShellFeatures_var.createInput(mesh)
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

#include <Fusion/MeshBody/MeshShellFeatures.h>

returnValue = meshShellFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshShellFeatureInput | Returns the newly created MeshShellFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version March 2024


MeshShellFeatures.isValid Property

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

# Get the value of the property.
propertyValue = meshShellFeatures_var.isValid
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
#include <Fusion/MeshBody/MeshShellFeatures.h>

// Get the value of the property.
boolean propertyValue = meshShellFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshShellFeatures.item Method

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Function that returns the specified mesh shell feature using an index into the collection.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
returnValue = meshShellFeatures_var.item(index)
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

#include <Fusion/MeshBody/MeshShellFeatures.h>

returnValue = meshShellFeatures_var->item(index);

Return Value

Type | Description
MeshShellFeature | 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 2024


MeshShellFeatures.itemByName Method

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

Function that returns the specified MeshShell feature using the name of the feature.

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
returnValue = meshShellFeatures_var.itemByName(name)
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

#include <Fusion/MeshBody/MeshShellFeatures.h>

returnValue = meshShellFeatures_var->itemByName(name);

Return Value

Type | Description
MeshShellFeature | 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 March 2024


MeshShellFeatures.objectType Property

Parent Object: MeshShellFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshShellFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.

# Get the value of the property.
propertyValue = meshShellFeatures_var.objectType
"meshShellFeatures_var" is a variable referencing a MeshShellFeatures object.
#include <Fusion/MeshBody/MeshShellFeatures.h>

// Get the value of the property.
string propertyValue = meshShellFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeature Object

MeshSmoothFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing MeshSmooth feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.
mesh Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
smoothness | Gets and sets the smoothness parameter. The range is between 0 and 1. The higher the value the stronger the smoothing.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MeshSmoothFeature.createForAssemblyContext, MeshSmoothFeature.nativeObject, MeshSmoothFeatures.add, MeshSmoothFeatures.item, MeshSmoothFeatures.itemByName

Version

Introduced in version March 2024


MeshSmoothFeature.assemblyContext Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.assemblyContext
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshSmoothFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2024


MeshSmoothFeature.attributes Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.attributes
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshSmoothFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version March 2024


MeshSmoothFeature.baseFeature Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.baseFeature
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshSmoothFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshSmoothFeature.bodies Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.bodies
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = meshSmoothFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version March 2024


MeshSmoothFeature.classType Method

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSmoothFeature.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSmoothFeature.h>

returnValue = adsk::fusion::MeshSmoothFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshSmoothFeature.createForAssemblyContext Method

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
returnValue = meshSmoothFeature_var.createForAssemblyContext(occurrence)
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

#include <Fusion/MeshBody/MeshSmoothFeature.h>

returnValue = meshSmoothFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshSmoothFeature | 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 2024


MeshSmoothFeature.deleteMe Method

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
returnValue = meshSmoothFeature_var.deleteMe()
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

#include <Fusion/MeshBody/MeshSmoothFeature.h>

returnValue = meshSmoothFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2024


MeshSmoothFeature.dissolve Method

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
returnValue = meshSmoothFeature_var.dissolve()
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

#include <Fusion/MeshBody/MeshSmoothFeature.h>

returnValue = meshSmoothFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2024


MeshSmoothFeature.entityToken Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.entityToken
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
string propertyValue = meshSmoothFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeature.errorOrWarningMessage Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.errorOrWarningMessage
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
string propertyValue = meshSmoothFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeature.faces Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.faces
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = meshSmoothFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2024


MeshSmoothFeature.healthState Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.healthState
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = meshSmoothFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version March 2024


MeshSmoothFeature.isParametric Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.isParametric
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
boolean propertyValue = meshSmoothFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshSmoothFeature.isSuppressed Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.isSuppressed

# Set the value of the property.
meshSmoothFeature_var.isSuppressed = propertyValue
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
boolean propertyValue = meshSmoothFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshSmoothFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


MeshSmoothFeature.isValid Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.isValid
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
boolean propertyValue = meshSmoothFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshSmoothFeature.linkedFeatures Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.linkedFeatures
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = meshSmoothFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2024


MeshSmoothFeature.mesh Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Gets and sets the input mesh body.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.mesh

# Set the value of the property.
meshSmoothFeature_var.mesh = propertyValue
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshSmoothFeature_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshSmoothFeature_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshSmoothFeature.name Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.name

# Set the value of the property.
meshSmoothFeature_var.name = propertyValue
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
string propertyValue = meshSmoothFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshSmoothFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeature.nativeObject Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.nativeObject
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<MeshSmoothFeature> propertyValue = meshSmoothFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MeshSmoothFeature.

Version

Introduced in version March 2024


MeshSmoothFeature.objectType Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.objectType
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
string propertyValue = meshSmoothFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeature.parentComponent Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.parentComponent
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshSmoothFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2024


MeshSmoothFeature.smoothness Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Gets and sets the smoothness parameter. The range is between 0 and 1. The higher the value the stronger the smoothing.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.smoothness
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = meshSmoothFeature_var->smoothness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2024


MeshSmoothFeature.timelineObject Property

Parent Object: MeshSmoothFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.

# Get the value of the property.
propertyValue = meshSmoothFeature_var.timelineObject
"meshSmoothFeature_var" is a variable referencing a MeshSmoothFeature object.
#include <Fusion/MeshBody/MeshSmoothFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = meshSmoothFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2024


MeshSmoothFeatureInput Object

MeshSmoothFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a MeshSmooth feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
mesh | Gets and sets the input mesh body.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
smoothness | Gets and sets the smoothness value. The range is between 0 and 1. The default value is 0.02. The higher the value the stronger the smoothing.
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

MeshSmoothFeatures.createInput

Version

Introduced in version March 2024


MeshSmoothFeatureInput.classType Method

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSmoothFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

returnValue = adsk::fusion::MeshSmoothFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshSmoothFeatureInput.isValid Property

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.

# Get the value of the property.
propertyValue = meshSmoothFeatureInput_var.isValid
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.
#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

// Get the value of the property.
boolean propertyValue = meshSmoothFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshSmoothFeatureInput.mesh Property

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Description

Gets and sets the input mesh body.

Syntax

  • Python
  • C++
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.

# Get the value of the property.
propertyValue = meshSmoothFeatureInput_var.mesh

# Set the value of the property.
meshSmoothFeatureInput_var.mesh = propertyValue
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.
#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshSmoothFeatureInput_var->mesh();

// Set the value of the property, where value_var is a Base.
bool returnValue = meshSmoothFeatureInput_var->mesh(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2024


MeshSmoothFeatureInput.objectType Property

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.

# Get the value of the property.
propertyValue = meshSmoothFeatureInput_var.objectType
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.
#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

// Get the value of the property.
string propertyValue = meshSmoothFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MeshSmoothFeatureInput.smoothness Property

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

Description

Gets and sets the smoothness value. The range is between 0 and 1. The default value is 0.02. The higher the value the stronger the smoothing.

Syntax

  • Python
  • C++
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.

# Get the value of the property.
propertyValue = meshSmoothFeatureInput_var.smoothness

# Set the value of the property.
meshSmoothFeatureInput_var.smoothness = propertyValue
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.
#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = meshSmoothFeatureInput_var->smoothness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = meshSmoothFeatureInput_var->smoothness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2024


MeshSmoothFeatureInput.targetBaseFeature Property

Parent Object: MeshSmoothFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatureInput.h>

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.

Syntax

  • Python
  • C++
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.

# Get the value of the property.
propertyValue = meshSmoothFeatureInput_var.targetBaseFeature

# Set the value of the property.
meshSmoothFeatureInput_var.targetBaseFeature = propertyValue
"meshSmoothFeatureInput_var" is a variable referencing a MeshSmoothFeatureInput object.
#include <Fusion/MeshBody/MeshSmoothFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = meshSmoothFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = meshSmoothFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version March 2024


MeshSmoothFeatures Object

MeshSmoothFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing MeshSmooth features in a component and supports the ability to create new MeshSmooth features.

Methods

Name | Description
add | Creates a mesh smooth 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 MeshSmoothFeatureInput object. Use properties and methods on this object to define the mesh smooth you want to create and then use the add method, passing in the MeshSmoothFeatureInput object.
item | Function that returns the specified mesh smooth feature using an index into the collection.
itemByName | Function that returns the specified MeshSmooth feature using the name of the feature.

Properties

Name | Description
count | The number of mesh smooth 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.meshSmoothFeatures

Version

Introduced in version March 2024


MeshSmoothFeatures.add Method

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Creates a mesh smooth feature.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
returnValue = meshSmoothFeatures_var.add(input)
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

#include <Fusion/MeshBody/MeshSmoothFeatures.h>

returnValue = meshSmoothFeatures_var->add(input);

Return Value

Type | Description
MeshSmoothFeature | Returns the newly created MeshSmoothFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MeshSmoothFeatureInput | A MeshSmoothFeatureInput object that defines the desired MeshSmooth feature. Use the createInput method to create a new MeshSmoothFeatureInput object and then use methods on it (the MeshSmoothFeatureInput object) to define the smoothing.

Version

Introduced in version March 2024


MeshSmoothFeatures.classType Method

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshSmoothFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/MeshSmoothFeatures.h>

returnValue = adsk::fusion::MeshSmoothFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


MeshSmoothFeatures.count Property

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

The number of mesh smooth features in the collection.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

# Get the value of the property.
propertyValue = meshSmoothFeatures_var.count
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
#include <Fusion/MeshBody/MeshSmoothFeatures.h>

// Get the value of the property.
uinteger propertyValue = meshSmoothFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


MeshSmoothFeatures.createInput Method

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Creates a MeshSmoothFeatureInput object. Use properties and methods on this object to define the mesh smooth you want to create and then use the add method, passing in the MeshSmoothFeatureInput object.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
returnValue = meshSmoothFeatures_var.createInput(mesh)
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

#include <Fusion/MeshBody/MeshSmoothFeatures.h>

returnValue = meshSmoothFeatures_var->createInput(mesh);

Return Value

Type | Description
MeshSmoothFeatureInput | Returns the newly created MeshSmoothFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
mesh | Base | A MeshBody in either a parametric or direct modeling design.

Version

Introduced in version March 2024


MeshSmoothFeatures.isValid Property

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

# Get the value of the property.
propertyValue = meshSmoothFeatures_var.isValid
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
#include <Fusion/MeshBody/MeshSmoothFeatures.h>

// Get the value of the property.
boolean propertyValue = meshSmoothFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


MeshSmoothFeatures.item Method

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Function that returns the specified mesh smooth feature using an index into the collection.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
returnValue = meshSmoothFeatures_var.item(index)
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

#include <Fusion/MeshBody/MeshSmoothFeatures.h>

returnValue = meshSmoothFeatures_var->item(index);

Return Value

Type | Description
MeshSmoothFeature | 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 2024


MeshSmoothFeatures.itemByName Method

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

Function that returns the specified MeshSmooth feature using the name of the feature.

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
returnValue = meshSmoothFeatures_var.itemByName(name)
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

#include <Fusion/MeshBody/MeshSmoothFeatures.h>

returnValue = meshSmoothFeatures_var->itemByName(name);

Return Value

Type | Description
MeshSmoothFeature | 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 March 2024


MeshSmoothFeatures.objectType Property

Parent Object: MeshSmoothFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/MeshSmoothFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.

# Get the value of the property.
propertyValue = meshSmoothFeatures_var.objectType
"meshSmoothFeatures_var" is a variable referencing a MeshSmoothFeatures object.
#include <Fusion/MeshBody/MeshSmoothFeatures.h>

// Get the value of the property.
string propertyValue = meshSmoothFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MFGDMDataEvent Object

MFGDMDataEvent Object Preview

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A MFGDMDataEvent represents an event related to the state of the MFGDM data structure.

Methods

Name | Description
add | Add a handler to be notified when the data 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.mfgdmDataReady

Version

Introduced in version July 2025


MFGDMDataEvent.add Method

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

Add a handler to be notified when the data event occurs.

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
returnValue = mFGDMDataEvent_var.add(handler)
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

#include <Core/Application/MFGDMDataEvent.h>

returnValue = mFGDMDataEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | MFGDMDataEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version July 2025


MFGDMDataEvent.classType Method

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MFGDMDataEvent.classType()
This is a static method.

#include <Core/Application/MFGDMDataEvent.h>

returnValue = adsk::core::MFGDMDataEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MFGDMDataEvent.isValid Property

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

# Get the value of the property.
propertyValue = mFGDMDataEvent_var.isValid
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
#include <Core/Application/MFGDMDataEvent.h>

// Get the value of the property.
boolean propertyValue = mFGDMDataEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MFGDMDataEvent.name Property

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

# Get the value of the property.
propertyValue = mFGDMDataEvent_var.name
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
#include <Core/Application/MFGDMDataEvent.h>

// Get the value of the property.
string propertyValue = mFGDMDataEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MFGDMDataEvent.objectType Property

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

# Get the value of the property.
propertyValue = mFGDMDataEvent_var.objectType
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
#include <Core/Application/MFGDMDataEvent.h>

// Get the value of the property.
string propertyValue = mFGDMDataEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MFGDMDataEvent.remove Method

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
returnValue = mFGDMDataEvent_var.remove(handler)
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

#include <Core/Application/MFGDMDataEvent.h>

returnValue = mFGDMDataEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | MFGDMDataEventHandler | The handler object to be removed from the event.

Version

Introduced in version July 2025


MFGDMDataEvent.sender Property

Parent Object: MFGDMDataEvent

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.

# Get the value of the property.
propertyValue = mFGDMDataEvent_var.sender
"mFGDMDataEvent_var" is a variable referencing a MFGDMDataEvent object.
#include <Core/Application/MFGDMDataEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = mFGDMDataEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2025


MFGDMDataEventArgs Object

MFGDMDataEventArgs Object Preview

Derived from: EventArgs Object
Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The MFGDMDataEventArgs provides information associated with the MFGDM event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the event is relative to.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


MFGDMDataEventArgs.classType Method

Parent Object: MFGDMDataEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MFGDMDataEventArgs.classType()
This is a static method.

#include <Core/Application/MFGDMDataEventArgs.h>

returnValue = adsk::core::MFGDMDataEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


MFGDMDataEventArgs.document Property

Parent Object: MFGDMDataEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Description

Provides access to the document that the event is relative to.

Syntax

  • Python
  • C++
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.

# Get the value of the property.
propertyValue = mFGDMDataEventArgs_var.document
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.
#include <Core/Application/MFGDMDataEventArgs.h>

// Get the value of the property.
Ptr<Document> propertyValue = mFGDMDataEventArgs_var->document();

Property Value

This is a read only property whose value is a Document.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


MFGDMDataEventArgs.firingEvent Property

Parent Object: MFGDMDataEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.

# Get the value of the property.
propertyValue = mFGDMDataEventArgs_var.firingEvent
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.
#include <Core/Application/MFGDMDataEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = mFGDMDataEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version July 2025


MFGDMDataEventArgs.isValid Property

Parent Object: MFGDMDataEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.

# Get the value of the property.
propertyValue = mFGDMDataEventArgs_var.isValid
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.
#include <Core/Application/MFGDMDataEventArgs.h>

// Get the value of the property.
boolean propertyValue = mFGDMDataEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


MFGDMDataEventArgs.objectType Property

Parent Object: MFGDMDataEventArgs

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.

# Get the value of the property.
propertyValue = mFGDMDataEventArgs_var.objectType
"mFGDMDataEventArgs_var" is a variable referencing a MFGDMDataEventArgs object.
#include <Core/Application/MFGDMDataEventArgs.h>

// Get the value of the property.
string propertyValue = mFGDMDataEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


MFGDMDataEventHandler Object

MFGDMDataEventHandler Object Preview

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventHandler.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The MFGDMDataEventHandler is a client implemented class that can be added as a handler to a MFGDMDataEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


MFGDMDataEventHandler.notify Method

Parent Object: MFGDMDataEventHandler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/Application/MFGDMDataEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"mFGDMDataEventHandler_var" is a variable referencing a MFGDMDataEventHandler object.
returnValue = mFGDMDataEventHandler_var.notify(eventArgs)
"mFGDMDataEventHandler_var" is a variable referencing a MFGDMDataEventHandler object.

#include <Core/Application/MFGDMDataEventHandler.h>

returnValue = mFGDMDataEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | MFGDMDataEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version July 2025


MidPointConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

A midpoint constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: MidPointConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.entityToken
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
string propertyValue = midPointConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


MidPointConstraint.isDeletable Property

Parent Object: MidPointConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Returns the curve defining the midpoint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MidPointConstraint.h>

Description

Returns the sketch point being constrained.

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


Milestone Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

An object that represents a milestone.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets and sets the name of the milestone.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
version | Returns the file version associated with this milestone.

Accessed From

DataFile.createMilestone, DataFile.milestone, DesignDataFile.createMilestone, DesignDataFile.milestone, Milestones.asArray, Milestones.item, Milestones.itemByName

Version

Introduced in version March 2024


Milestone.classType Method

Parent Object: Milestone
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Milestone.classType()
This is a static method.

#include <Core/Dashboard/Milestone.h>

returnValue = adsk::core::Milestone::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


Milestone.isValid Property

Parent Object: Milestone
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"milestone_var" is a variable referencing a Milestone object.

# Get the value of the property.
propertyValue = milestone_var.isValid
"milestone_var" is a variable referencing a Milestone object.
#include <Core/Dashboard/Milestone.h>

// Get the value of the property.
boolean propertyValue = milestone_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


Milestone.name Property

Parent Object: Milestone
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

Gets and sets the name of the milestone.

Syntax

  • Python
  • C++
"milestone_var" is a variable referencing a Milestone object.

# Get the value of the property.
propertyValue = milestone_var.name

# Set the value of the property.
milestone_var.name = propertyValue
"milestone_var" is a variable referencing a Milestone object.
#include <Core/Dashboard/Milestone.h>

// Get the value of the property.
string propertyValue = milestone_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = milestone_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2024


Milestone.objectType Property

Parent Object: Milestone
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"milestone_var" is a variable referencing a Milestone object.

# Get the value of the property.
propertyValue = milestone_var.objectType
"milestone_var" is a variable referencing a Milestone object.
#include <Core/Dashboard/Milestone.h>

// Get the value of the property.
string propertyValue = milestone_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


Milestone.version Property

Parent Object: Milestone
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestone.h>

Description

Returns the file version associated with this milestone.

Syntax

  • Python
  • C++
"milestone_var" is a variable referencing a Milestone object.

# Get the value of the property.
propertyValue = milestone_var.version
"milestone_var" is a variable referencing a Milestone object.
#include <Core/Dashboard/Milestone.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = milestone_var->version();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version March 2024


Milestones Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Returns the milestones associated with a DataFile.

Methods

Name | Description
asArray | Get the current list of all milestones.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 milestone.
itemByName | Returns the milestone specified using its name..

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DataFile.milestones, DesignDataFile.milestones

Version

Introduced in version March 2024


Milestones.asArray Method

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Get the current list of all milestones.

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.
returnValue = milestones_var.asArray()
"milestones_var" is a variable referencing a Milestones object.

#include <Core/Dashboard/Milestones.h>

returnValue = milestones_var->asArray();

Return Value

Type | Description
Milestone[] | Returns the current list of all milestones.

Version

Introduced in version March 2024


Milestones.classType Method

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Milestones.classType()
This is a static method.

#include <Core/Dashboard/Milestones.h>

returnValue = adsk::core::Milestones::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2024


Milestones.count Property

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

The number of data items in this collection.

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.

# Get the value of the property.
propertyValue = milestones_var.count
"milestones_var" is a variable referencing a Milestones object.
#include <Core/Dashboard/Milestones.h>

// Get the value of the property.
uinteger propertyValue = milestones_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2024


Milestones.isValid Property

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.

# Get the value of the property.
propertyValue = milestones_var.isValid
"milestones_var" is a variable referencing a Milestones object.
#include <Core/Dashboard/Milestones.h>

// Get the value of the property.
boolean propertyValue = milestones_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


Milestones.item Method

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Returns the specified milestone.

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.
returnValue = milestones_var.item(index)
"milestones_var" is a variable referencing a Milestones object.

#include <Core/Dashboard/Milestones.h>

returnValue = milestones_var->item(index);

Return Value

Type | Description
Milestone | Returns the specified file or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the milestone to return. The first milestone in the list has an index of 0.

Version

Introduced in version March 2024


Milestones.itemByName Method

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

Returns the milestone specified using its name..

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.
returnValue = milestones_var.itemByName(name)
"milestones_var" is a variable referencing a Milestones object.

#include <Core/Dashboard/Milestones.h>

returnValue = milestones_var->itemByName(name);

Return Value

Type | Description
Milestone | Returns the Milestone object or null if a milestone with the specified name is not found.

Parameters

Name | Type | Description
name | string | The name of the milestone to return.

Version

Introduced in version March 2024


Milestones.objectType Property

Parent Object: Milestones
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Milestones.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"milestones_var" is a variable referencing a Milestones object.

# Get the value of the property.
propertyValue = milestones_var.objectType
"milestones_var" is a variable referencing a Milestones object.
#include <Core/Dashboard/Milestones.h>

// Get the value of the property.
string propertyValue = milestones_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2024


MinimumRadiusAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

Provides access to any minimum radius analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified MinimumRadiusAnalysis object using an index into the collection.
itemByName | A method that returns the specified MinimumRadiusAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of MinimumRadiusAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.minimumRadiusAnalyses

Version

Introduced in version January 2023


MinimumRadiusAnalyses.classType Method

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MinimumRadiusAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

returnValue = adsk::fusion::MinimumRadiusAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MinimumRadiusAnalyses.count Property

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

Returns the number of MinimumRadiusAnalysis objects in the collection.

Syntax

  • Python
  • C++
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.

# Get the value of the property.
propertyValue = minimumRadiusAnalyses_var.count
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.
#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

// Get the value of the property.
uinteger propertyValue = minimumRadiusAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


MinimumRadiusAnalyses.isValid Property

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.

# Get the value of the property.
propertyValue = minimumRadiusAnalyses_var.isValid
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.
#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

// Get the value of the property.
boolean propertyValue = minimumRadiusAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MinimumRadiusAnalyses.item Method

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

A method that returns the specified MinimumRadiusAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.
returnValue = minimumRadiusAnalyses_var.item(index)
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.

#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

returnValue = minimumRadiusAnalyses_var->item(index);

Return Value

Type | Description
MinimumRadiusAnalysis | 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 2023


MinimumRadiusAnalyses.itemByName Method

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

A method that returns the specified MinimumRadiusAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.
returnValue = minimumRadiusAnalyses_var.itemByName(name)
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.

#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

returnValue = minimumRadiusAnalyses_var->itemByName(name);

Return Value

Type | Description
MinimumRadiusAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the MinimumRadiusAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


MinimumRadiusAnalyses.objectType Property

Parent Object: MinimumRadiusAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.

# Get the value of the property.
propertyValue = minimumRadiusAnalyses_var.objectType
"minimumRadiusAnalyses_var" is a variable referencing a MinimumRadiusAnalyses object.
#include <Fusion/Fusion/MinimumRadiusAnalyses.h>

// Get the value of the property.
string propertyValue = minimumRadiusAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MinimumRadiusAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

Represents any existing Minimum Radius Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MinimumRadiusAnalyses.item, MinimumRadiusAnalyses.itemByName

Version

Introduced in version January 2023


MinimumRadiusAnalysis.attributes Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.attributes
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = minimumRadiusAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.classType Method

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MinimumRadiusAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

returnValue = adsk::fusion::MinimumRadiusAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.deleteMe Method

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
returnValue = minimumRadiusAnalysis_var.deleteMe()
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

returnValue = minimumRadiusAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.entityToken Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.entityToken
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
string propertyValue = minimumRadiusAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.isLightBulbOn Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.isLightBulbOn

# Set the value of the property.
minimumRadiusAnalysis_var.isLightBulbOn = propertyValue
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
boolean propertyValue = minimumRadiusAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = minimumRadiusAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.isValid Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.isValid
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
boolean propertyValue = minimumRadiusAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.isVisible Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.isVisible
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
boolean propertyValue = minimumRadiusAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.name Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.name

# Set the value of the property.
minimumRadiusAnalysis_var.name = propertyValue
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
string propertyValue = minimumRadiusAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = minimumRadiusAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


MinimumRadiusAnalysis.objectType Property

Parent Object: MinimumRadiusAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/MinimumRadiusAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.

# Get the value of the property.
propertyValue = minimumRadiusAnalysis_var.objectType
"minimumRadiusAnalysis_var" is a variable referencing a MinimumRadiusAnalysis object.
#include <Fusion/Fusion/MinimumRadiusAnalysis.h>

// Get the value of the property.
string propertyValue = minimumRadiusAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MirrorFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Object that represents an existing mirror feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isCombine Gets and sets whether combine is set when doing the Mirror. When true, the mirrored geometry will be Boolean unioned with the original solid or surface body(s) when they connect within the stitch tolerance defined with the stitchTolerance property. If the bodies cannot be unioned or stitched the result will be separate bodies.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
mirrorPlane Gets and sets the mirror plane. This can be either a planar face or construction plane. This works only for parametric features.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.
stitchTolerance | Returns the parameter controlling the Stitch tolerance to use when stitching mirrored surface bodies with the original bodies. You can edit the tolerance by editing the value of the parameter object.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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.entityToken Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.entityToken
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
string propertyValue = mirrorFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


MirrorFeature.errorOrWarningMessage Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.isCombine Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Gets and sets whether combine is set when doing the Mirror. When true, the mirrored geometry will be Boolean unioned with the original solid or surface body(s) when they connect within the stitch tolerance defined with the stitchTolerance property. If the bodies cannot be unioned or stitched the result will be separate bodies.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.isCombine

# Set the value of the property.
mirrorFeature_var.isCombine = 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->isCombine();

// Set the value of the property, where value_var is a boolean.
bool returnValue = mirrorFeature_var->isCombine(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2020


MirrorFeature.isParametric Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Gets and sets the mirror plane. This can be either a planar face or construction plane. This works only for parametric features.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Gets the PatternElements collection that contains the elements created by this pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Get the features that were created for this mirror. Returns null in the case where the feature is not parametric.

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.stitchTolerance Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the parameter controlling the Stitch tolerance to use when stitching mirrored surface bodies with the original bodies. You can edit the tolerance by editing the value of the parameter object.

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.stitchTolerance
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = mirrorFeature_var->stitchTolerance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2020


MirrorFeature.timelineObject Property

Parent Object: MirrorFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a mirror feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isCombine | Gets and sets whether the mirrored bodies should be combined with the original bodies. When true, the mirrored geometry will be Boolean unioned with the original solid or surface body(s) when they connect within the stitch tolerance defined with the stitchTolerance property. If the bodies cannot be unioned or stitched the result will be separate bodies. If any input object is not a body, then this setting is ignored. 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.
mirrorPlane | Gets and sets the mirror plane. This can be either a planar face or construction plane.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
stitchTolerance | Gets and sets the ValueInput object that defines the Stitching Tolerance (length) to use when doing a mirror and combine for surface bodies.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

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.

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.isCombine Property

Parent Object: MirrorFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

Gets and sets whether the mirrored bodies should be combined with the original bodies. When true, the mirrored geometry will be Boolean unioned with the original solid or surface body(s) when they connect within the stitch tolerance defined with the stitchTolerance property. If the bodies cannot be unioned or stitched the result will be separate bodies. If any input object is not a body, then this setting is ignored. Default is false.

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.isCombine

# Set the value of the property.
mirrorFeatureInput_var.isCombine = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
boolean propertyValue = mirrorFeatureInput_var->isCombine();

// Set the value of the property, where value_var is a boolean.
bool returnValue = mirrorFeatureInput_var->isCombine(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2020


MirrorFeatureInput.isValid Property

Parent Object: MirrorFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

Gets and sets the mirror plane. This can be either a planar face or construction plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

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.

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.stitchTolerance Property

Parent Object: MirrorFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the Stitching Tolerance (length) to use when doing a mirror and combine for surface bodies.

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.stitchTolerance

# Set the value of the property.
mirrorFeatureInput_var.stitchTolerance = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = mirrorFeatureInput_var->stitchTolerance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = mirrorFeatureInput_var->stitchTolerance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version August 2020


MirrorFeatureInput.targetBaseFeature Property

Parent Object: MirrorFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Collection that provides access to all of the existing mirror features in a component and supports the ability to create new mirror features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Creates a new mirror feature.

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.

Samples

Name | Description
mirrorFeatures.add | Demonstrates the mirrorFeatures.add method by mirroring the selected body around the base X-Y construction plane.

Version

Introduced in version November 2014


mirrorFeatures.add

Description

Demonstrates the mirrorFeatures.add method by mirroring the selected body around the base X-Y construction plane.

Code Samples

  • Python
def demo_mirrorFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    body = _ui.selectEntity('Select the body to mirror', 'Bodies').entity
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(body)

    mirrorFeatures = rootComp.features.mirrorFeatures
    mirrorPlane = rootComp.xYConstructionPlane
    mirrorInput = mirrorFeatures.createInput(bodies, mirrorPlane)
    mirrorFeature = mirrorFeatures.add(mirrorInput)


MirrorFeatures.classType Method

Parent Object: MirrorFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

The number of mirror features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

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.

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.

Samples

Name | Description
mirrorFeatures.add | Demonstrates the mirrorFeatures.add method by mirroring the selected body around the base X-Y construction plane.

Version

Introduced in version November 2014


MirrorFeatures.isValid Property

Parent Object: MirrorFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Function that returns the specified mirror feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

Function that returns the specified mirror feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MirrorFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Represents a Model Parameter.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 ModelParameter. As a general rule, model parameters cannot be deleted because features depend on them. However, there are uncommon workflows where a parameter no longer has any dependents and is not automatically deleted. You can use the isDeletable property to see if the parameter is in this state and can successfully be deleted.

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.
dependencyParameters | Returns a list of parameters that this parameter is dependent on.
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
entityToken Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
expression Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".
isDeletable | Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
role | This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a work plane 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 of the parameter

Accessed From

AlongEdgeRipFeatureDefinition.gapDistance, AngleExtentDefinition.angle, Arrange2DDefinition.globalQuantity, Arrange2DDefinition.grainDirection, Arrange3DEnvelopeDefinition.ceilingClearance, Arrange3DEnvelopeDefinition.frameWidth, Arrange3DEnvelopeDefinition.height, Arrange3DEnvelopeDefinition.length, Arrange3DEnvelopeDefinition.objectSpacing, Arrange3DEnvelopeDefinition.originXOffset, Arrange3DEnvelopeDefinition.originYOffset, Arrange3DEnvelopeDefinition.placementClearance, Arrange3DEnvelopeDefinition.width, ArrangeEnvelopeDefinition.frameWidth, ArrangeEnvelopeDefinition.objectSpacing, ArrangeEnvelopeDefinition.placementClearance, ArrangePlaneEnvelopeDefinition.envelopeSpacing, ArrangePlaneEnvelopeDefinition.frameWidth, ArrangePlaneEnvelopeDefinition.length, ArrangePlaneEnvelopeDefinition.objectSpacing, ArrangePlaneEnvelopeDefinition.originXOffset, ArrangePlaneEnvelopeDefinition.originYOffset, ArrangePlaneEnvelopeDefinition.placementClearance, ArrangePlaneEnvelopeDefinition.quantity, ArrangePlaneEnvelopeDefinition.width, ArrangeProfileOrFaceEnvelopeDefinition.frameWidth, ArrangeProfileOrFaceEnvelopeDefinition.objectSpacing, ArrangeProfileOrFaceEnvelopeDefinition.placementClearance, BetweenPointsRipFeatureDefinition.gapDistance, BetweenPointsRipFeatureDefinition.pointOneOffset, BetweenPointsRipFeatureDefinition.pointTwoOffset, BossFeature.alignmentDepth, BossFeature.alignmentDiameter, BossFeature.alignmentDraftAngle, BossFeature.alignmentRootRadius, BossFeature.alignmentTipRadius, BossFeature.diameter, BossFeature.draftAngle, BossFeature.holeCountersinkAngle, BossFeature.holeDepth, BossFeature.holeDiameter, BossFeature.holeDraftAngle, BossFeature.holeEndRadius, BossFeature.holeMajorDepth, BossFeature.holeMajorDiameter, BossFeature.holeMajorDraftAngle, BossFeature.holeMajorRootRadius, BossFeature.holeMajorTipRadius, BossFeature.holeStartRadius, BossFeature.innerRadius, BossFeature.offset, BossFeature.offsetClearance, BossFeature.ribBlendRadius, BossFeature.ribChamferAngle, BossFeature.ribCount, BossFeature.ribCutSize, BossFeature.ribDraftAngle, BossFeature.ribLength, BossFeature.ribOffset, BossFeature.ribOuterDraftAngle, BossFeature.ribRotation, BossFeature.ribThickness, BossFeature.ribTipRadius, BossFeature.ribTotalAngle, BossFeature.rootRadius, BossFeature.screwDiameter, BossFeature.screwHeadAngle, BossFeature.screwHeadDiameter, BossFeature.taperAngle, BossFeature.thickness, BossFeature.tipRadius, ChordLengthFilletEdgeSet.chordLength, ChordLengthFilletEdgeSet.tangencyWeight, CircularPatternConstraint.quantity, CircularPatternConstraint.totalAngle, CircularPatternFeature.quantity, CircularPatternFeature.totalAngle, ConstantRadiusFilletEdgeSet.radius, ConstantRadiusFilletEdgeSet.tangencyWeight, DistanceAndAngleChamferEdgeSet.angle, DistanceAndAngleChamferEdgeSet.distance, DistanceAndAngleChamferTypeDefinition.angle, DistanceAndAngleChamferTypeDefinition.distance, DistanceExtentDefinition.distance, EqualDistanceChamferEdgeSet.distance, EqualDistanceChamferTypeDefinition.distance, ExtendFeature.distance, ExtrudeFeature.taperAngleOne, ExtrudeFeature.taperAngleTwo, ExtrudeFeature.thinExtrudeWallThicknessOne, ExtrudeFeature.thinExtrudeWallThicknessTwo, FilletEdgeSet.tangencyWeight, GeometricRelationship.offsetOrAngle, HoleFeature.counterboreDepth, HoleFeature.counterboreDiameter, HoleFeature.countersinkAngle, HoleFeature.countersinkDiameter, HoleFeature.holeDiameter, HoleFeature.tipAngle, Joint.angle, Joint.offset, Joint.offsetX, Joint.offsetY, JointOrigin.angle, JointOrigin.offsetX, JointOrigin.offsetY, JointOrigin.offsetZ, MeshConvertFeature.numberOfFaces, MeshGenerateFaceGroupsFeature.angleThreshold, MeshGenerateFaceGroupsFeature.boundaryTolerance, MeshGenerateFaceGroupsFeature.minimumFaceGroupSize, MeshReduceFeature.facecount, MeshReduceFeature.maximumDeviation, MeshReduceFeature.proportion, MeshRemeshFeature.density, MeshRemeshFeature.shapePreservation, MeshRepairFeature.density, MeshRepairFeature.offset, MeshShellFeature.thickness, MeshSmoothFeature.smoothness, MirrorFeature.stitchTolerance, ModelParameters.item, ModelParameters.itemByName, MoveFeaturePointToPositionDefinition.xDistance, MoveFeaturePointToPositionDefinition.yDistance, MoveFeaturePointToPositionDefinition.zDistance, MoveFeatureRotateDefinition.angle, MoveFeatureTranslateAlongEntityDefinition.distance, MoveFeatureTranslateXYZDefinition.xDistance, MoveFeatureTranslateXYZDefinition.yDistance, MoveFeatureTranslateXYZDefinition.zDistance, OffsetFeature.distance, PathPatternFeature.distance, PathPatternFeature.quantity, PipeFeature.distanceOne, PipeFeature.distanceTwo, PipeFeature.sectionSize, PipeFeature.sectionThickness, PlaneAndOffsetsHolePositionDefinition.offsetOne, PlaneAndOffsetsHolePositionDefinition.offsetTwo, RectangularPatternConstraint.distanceOne, RectangularPatternConstraint.distanceTwo, RectangularPatternConstraint.quantityOne, RectangularPatternConstraint.quantityTwo, RectangularPatternFeature.distanceOne, RectangularPatternFeature.distanceTwo, RectangularPatternFeature.quantityOne, RectangularPatternFeature.quantityTwo, RuledSurfaceFeature.angle, RuledSurfaceFeature.distance, ScaleFeature.scaleFactor, ScaleFeature.xScale, ScaleFeature.yScale, ScaleFeature.zScale, ShellFeature.insideThickness, ShellFeature.outsideThickness, SketchAngularDimension.parameter, SketchConcentricCircleDimension.parameter, SketchDiameterDimension.parameter, SketchDimension.parameter, SketchDistanceBetweenLineAndPlanarSurfaceDimension.parameter, SketchDistanceBetweenPointAndSurfaceDimension.parameter, SketchEllipseMajorRadiusDimension.parameter, SketchEllipseMinorRadiusDimension.parameter, SketchLinearDiameterDimension.parameter, SketchLinearDimension.parameter, SketchOffsetCurvesDimension.parameter, SketchOffsetDimension.parameter, SketchRadialDimension.parameter, SketchTangentDistanceDimension.parameter, StitchFeature.tolerance, SweepFeature.distanceOne, SweepFeature.distanceTwo, SweepFeature.taperAngle, SweepFeature.twistAngle, TessellateFeature.aspectRatio, TessellateFeature.maximumEdgeLength, TessellateFeature.normalDeviation, TessellateFeature.surfaceDeviation, ThickenFeature.thickness, ThreadFeature.threadLength, ThreadFeature.threadOffset, TwoDistancesChamferEdgeSet.distanceOne, TwoDistancesChamferEdgeSet.distanceTwo, TwoDistancesChamferTypeDefinition.distanceOne, TwoDistancesChamferTypeDefinition.distanceTwo, TwoSidesAngleExtentDefinition.angleOne, TwoSidesAngleExtentDefinition.angleTwo, TwoSidesDistanceExtentDefinition.distanceOne, TwoSidesDistanceExtentDefinition.distanceTwo, UntrimFeature.extensionDistance, VariableRadiusFilletEdgeSet.endRadius, VariableRadiusFilletEdgeSet.startRadius, VariableRadiusFilletEdgeSet.tangencyWeight, VolumetricModelToMeshFeature.elementSize, VolumetricModelToMeshFeature.smallShellThreshold

Derived Classes

CustomFeatureParameter

Version

Introduced in version August 2014


ModelParameter.attributes Property

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

The comment associated with this parameter

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns the Component containing the ModelParameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns the object that created this parameter. For example, a feature, a sketch dimension, or a construction plane.

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.deleteMe Method

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Deletes this ModelParameter. As a general rule, model parameters cannot be deleted because features depend on them. However, there are uncommon workflows where a parameter no longer has any dependents and is not automatically deleted. You can use the isDeletable property to see if the parameter is in this state and can successfully be deleted.

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.
returnValue = modelParameter_var.deleteMe()
"modelParameter_var" is a variable referencing a ModelParameter object.

#include <Fusion/Fusion/ModelParameter.h>

returnValue = modelParameter_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2025


ModelParameter.dependencyParameters Property

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns a list of parameters that this parameter is dependent on.

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.dependencyParameters
"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->dependencyParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version May 2022


ModelParameter.dependentParameters Property

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

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.entityToken Property

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.entityToken
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ModelParameter.expression Property

Parent Object: ModelParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Returns the Collection containing the ModelParameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a work plane it could be "Offset".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameter.h>

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value of the parameter

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Provides access to the Model Parameters within a component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.modelParameters, CustomFeatureParameter.modelParameters, FlatPatternComponent.modelParameters, ModelParameter.modelParameters

Version

Introduced in version August 2014


ModelParameters.classType Method

Parent Object: ModelParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Returns the component that owns the Model Parameters collection

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Returns the number of parameters in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Function that returns the specified Model Parameter using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

Function that returns the specified Model Parameter using the name of the parameter as it is displayed in the parameters dialog.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ModelParameters.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ModifyUtility Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/ModifyUtility.h>

Description

Base class for all modify utilities.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMAdditiveContainer.modifyUtility, CAMFolder.modifyUtility, CAMHoleRecognition.modifyUtility, CAMPattern.modifyUtility, NCProgram.modifyUtility, Operation.modifyUtility, OperationBase.modifyUtility, Setup.modifyUtility

Derived Classes

AdditiveSetupUtility

Version

Introduced in version September 2023


ModifyUtility.classType Method

Parent Object: ModifyUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/ModifyUtility.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ModifyUtility.classType()
This is a static method.

#include <Cam/ModifyUtility/ModifyUtility.h>

returnValue = adsk::cam::ModifyUtility::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


ModifyUtility.isValid Property

Parent Object: ModifyUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/ModifyUtility.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"modifyUtility_var" is a variable referencing a ModifyUtility object.

# Get the value of the property.
propertyValue = modifyUtility_var.isValid
"modifyUtility_var" is a variable referencing a ModifyUtility object.
#include <Cam/ModifyUtility/ModifyUtility.h>

// Get the value of the property.
boolean propertyValue = modifyUtility_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


ModifyUtility.objectType Property

Parent Object: ModifyUtility
Defined in namespace "adsk::cam" and the header file is <Cam/ModifyUtility/ModifyUtility.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"modifyUtility_var" is a variable referencing a ModifyUtility object.

# Get the value of the property.
propertyValue = modifyUtility_var.objectType
"modifyUtility_var" is a variable referencing a ModifyUtility object.
#include <Cam/ModifyUtility/ModifyUtility.h>

// Get the value of the property.
string propertyValue = modifyUtility_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


MouseEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

An event endpoint that supports the connection to client implemented MouseEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

Adds an event handler to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Provides a set of arguments from a firing MouseEvent to a MouseEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets which mouse button(s) are pressed. The returned value is bitwise and can indicate that more than one button is pressed.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets the number of times the button was pressed and released.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets which modifier keys are currently pressed. The returned value is bitwise and can indicate that more than one button is pressed.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets the coordinate of the mouse in screen space.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets a signed count of the number of detents the mouse wheel has rotated.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"mouseEventHandler_var" is a variable referencing a MouseEventHandler object.
returnValue = mouseEventHandler_var.notify(eventArgs)
"mouseEventHandler_var" is a variable referencing a MouseEventHandler object.

#include <Core/UserInterface/MouseEventHandler.h>

returnValue = 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Object that represents an existing move feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
redefineAsFreeMove | Redefines the move feature to be described by an arbitrary translation and orientation which is defined using a transformation matrix. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
redefineAsPointToPoint | Redefines the move feature to be a translation from one point to another. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
redefineAsPointToPosition | Redefines a move feature to be described by a point and an offset. The distances define offsets in the X, Y, and Z directions in either design or component space. To not move the input entities at all the offset distances should be set to the current location of the point in either design or component space. Adding or subtracting to those values will then move the entities that distance. It's best to experiment with the command interactively to understand the behavior. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
redefineAsRotate | Redefines the move feature to be described by an axis and rotation angle. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
redefineAsTranslateAlongEntity | Redefines the move feature to be a translation along a specified entity. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
redefineAsTranslateXYZ | Redefines the move feature to be described by a translation in X, Y, and Z. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
definition | Returns the MoveFeatureDefinition object which provides access to the information that specifies how this MoveFeature is defined.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputEntities Gets and sets the entities to move. This is done by using an ObjectCollection containing the objects to move. For a parametric model, the collection can contain BRepBody or BRepFace objects but not a combination of both.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
transform **RETIRED** Gets and sets the move transform of the input bodies or faces.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Accessed From

MoveFeature.createForAssemblyContext, MoveFeature.nativeObject, MoveFeatureDefinition.parentMoveFeature, MoveFeatureFreeMoveDefinition.parentMoveFeature, MoveFeaturePointToPointDefinition.parentMoveFeature, MoveFeaturePointToPositionDefinition.parentMoveFeature, MoveFeatureRotateDefinition.parentMoveFeature, MoveFeatures.add, MoveFeatures.item, MoveFeatures.itemByName, MoveFeatureTranslateAlongEntityDefinition.parentMoveFeature, MoveFeatureTranslateXYZDefinition.parentMoveFeature

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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.definition Property

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the MoveFeatureDefinition object which provides access to the information that specifies how this MoveFeature is defined.

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.definition
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<MoveFeatureDefinition> propertyValue = moveFeature_var->definition();

Property Value

This is a read only property whose value is a MoveFeatureDefinition.

Version

Introduced in version January 2023


MoveFeature.deleteMe Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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.entityToken Property

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.entityToken
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
string propertyValue = moveFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


MoveFeature.errorOrWarningMessage Property

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Gets and sets the entities to move. This is done by using an ObjectCollection containing the objects to move. For a parametric model, the collection can contain BRepBody or BRepFace objects but not a combination of both.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the parent component that owns this feature.

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.redefineAsFreeMove Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines the move feature to be described by an arbitrary translation and orientation which is defined using a transformation matrix.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsFreeMove(transform)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsFreeMove(transform);

Return Value

Type | Description
boolean | Returns true if the re-definition is successful.

Parameters

Name | Type | Description
transform | Matrix3D | The transformation matrix that defines the transform to apply. The matrix must be an orthogonal matrix; that is the axes are perpendicular to each other and there isn't any scaling or mirroring defined.

Version

Introduced in version January 2023


MoveFeature.redefineAsPointToPoint Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines the move feature to be a translation from one point to another.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsPointToPoint(originPoint, targetPoint)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsPointToPoint(originPoint, targetPoint);

Return Value

Type | Description
boolean | Returns true if the redefinition is successful.

Parameters

Name | Type | Description
originPoint | Base | The first point that defines the start position of the move.
targetPoint | Base | The second point that defines the direction and distance of the move.

Version

Introduced in version January 2023


MoveFeature.redefineAsPointToPosition Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines a move feature to be described by a point and an offset. The distances define offsets in the X, Y, and Z directions in either design or component space. To not move the input entities at all the offset distances should be set to the current location of the point in either design or component space. Adding or subtracting to those values will then move the entities that distance. It's best to experiment with the command interactively to understand the behavior.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsPointToPosition(point, xDistance, yDistance, zDistance, isDesignSpace)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsPointToPosition(point, xDistance, yDistance, zDistance, isDesignSpace);

Return Value

Type | Description
boolean | Returns true if the redefinition is successful.

Parameters

Name | Type | Description
point | Base | An entity that defines a point in space. This can be a sketch point, a construction point, or a BRepVertex.
xDistance | ValueInput | A ValueInput object that defines the offset in the X direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
yDistance | ValueInput | A ValueInput object that defines the offset in the Y direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
zDistance | ValueInput | A ValueInput object that defines the offset in the Z direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
isDesignSpace | boolean | Defines if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

Version

Introduced in version January 2023


MoveFeature.redefineAsRotate Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines the move feature to be described by an axis and rotation angle.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsRotate(axisEntity, angle)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsRotate(axisEntity, angle);

Return Value

Type | Description
boolean | Returns true if the redefinition is successful.

Parameters

Name | Type | Description
axisEntity | Base | A linear entity that defines the axis of rotation. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The natural direction of the entity defines a right-hand rule for the rotation direction.
angle | ValueInput | A ValueInput object that defines the rotation angle. If the ValueInput is created using a real value, the angle is in radians. If it's defined using a string, the default document units will be used.

Version

Introduced in version January 2023


MoveFeature.redefineAsTranslateAlongEntity Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines the move feature to be a translation along a specified entity.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsTranslateAlongEntity(linearEntity, distance)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsTranslateAlongEntity(linearEntity, distance);

Return Value

Type | Description
boolean | Returns true if the redefinition is successful.

Parameters

Name | Type | Description
linearEntity | Base | A linear entity that defines the direction of the move. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The entity defines the direction, not the distance. The natural direction of the entity defines the translation direction.
distance | ValueInput | A ValueInput object that defines the offset distance. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.

Version

Introduced in version January 2023


MoveFeature.redefineAsTranslateXYZ Method

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Redefines the move feature to be described by a translation in X, Y, and Z.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.redefineAsTranslateXYZ(xDistance, yDistance, zDistance, isDesignSpace)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->redefineAsTranslateXYZ(xDistance, yDistance, zDistance, isDesignSpace);

Return Value

Type | Description
boolean | Returns true if the re-definition is successful.

Parameters

Name | Type | Description
xDistance | ValueInput | A ValueInput object that defines the offset in the X direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
yDistance | ValueInput | A ValueInput object that defines the offset in the Y direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
zDistance | ValueInput | A ValueInput object that defines the offset in the Z direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
isDesignSpace | boolean | Defines if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

Version

Introduced in version January 2023


MoveFeature.timelineObject Property

Parent Object: MoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the move transform of the input bodies or faces.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Remarks

This property is obsolete. The move feature now supports more than a simple transform. This property can still work in the case where a move feature was created using the FreeMove type of move but will fail in all other cases.

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
Retired in version January 2023


MoveFeatureDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureDefinition.h>

Description

A Base class to return the information used to define a Move feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object

Accessed From

MoveFeature.definition

Derived Classes

MoveFeatureFreeMoveDefinition, MoveFeaturePointToPointDefinition, MoveFeaturePointToPositionDefinition, MoveFeatureRotateDefinition, MoveFeatureTranslateAlongEntityDefinition, MoveFeatureTranslateXYZDefinition

Version

Introduced in version January 2023


MoveFeatureDefinition.classType Method

Parent Object: MoveFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureDefinition.h>

returnValue = adsk::fusion::MoveFeatureDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeatureDefinition.isValid Property

Parent Object: MoveFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.

# Get the value of the property.
propertyValue = moveFeatureDefinition_var.isValid
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.
#include <Fusion/Features/MoveFeatureDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureDefinition.objectType Property

Parent Object: MoveFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.

# Get the value of the property.
propertyValue = moveFeatureDefinition_var.objectType
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.
#include <Fusion/Features/MoveFeatureDefinition.h>

// Get the value of the property.
string propertyValue = moveFeatureDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeatureDefinition.parentMoveFeature Property

Parent Object: MoveFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.

# Get the value of the property.
propertyValue = moveFeatureDefinition_var.parentMoveFeature
"moveFeatureDefinition_var" is a variable referencing a MoveFeatureDefinition object.
#include <Fusion/Features/MoveFeatureDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeatureDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

The MoveFeatureFreeMoveDefinition object defines a move feature described by a transformation matrix.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object
transform Gets and sets the transform that's applied to the face or body. The matrix must be an orthogonal matrix; that is the axes are perpendicular to each other and there isn't any scaling or mirroring defined.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition.classType Method

Parent Object: MoveFeatureFreeMoveDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureFreeMoveDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

returnValue = adsk::fusion::MoveFeatureFreeMoveDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition.isValid Property

Parent Object: MoveFeatureFreeMoveDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.

# Get the value of the property.
propertyValue = moveFeatureFreeMoveDefinition_var.isValid
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.
#include <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureFreeMoveDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition.objectType Property

Parent Object: MoveFeatureFreeMoveDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.

# Get the value of the property.
propertyValue = moveFeatureFreeMoveDefinition_var.objectType
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.
#include <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

// Get the value of the property.
string propertyValue = moveFeatureFreeMoveDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition.parentMoveFeature Property

Parent Object: MoveFeatureFreeMoveDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.

# Get the value of the property.
propertyValue = moveFeatureFreeMoveDefinition_var.parentMoveFeature
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.
#include <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeatureFreeMoveDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeatureFreeMoveDefinition.transform Property

Parent Object: MoveFeatureFreeMoveDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

Description

Gets and sets the transform that's applied to the face or body. The matrix must be an orthogonal matrix; that is the axes are perpendicular to each other and there isn't any scaling or mirroring defined.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.

# Get the value of the property.
propertyValue = moveFeatureFreeMoveDefinition_var.transform

# Set the value of the property.
moveFeatureFreeMoveDefinition_var.transform = propertyValue
"moveFeatureFreeMoveDefinition_var" is a variable referencing a MoveFeatureFreeMoveDefinition object.
#include <Fusion/Features/MoveFeatureFreeMoveDefinition.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = moveFeatureFreeMoveDefinition_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = moveFeatureFreeMoveDefinition_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version January 2023


MoveFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a move feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
defineAsFreeMove | This method will define a move feature whose translation and orientation is defined using a transformation matrix. A matrix can define any translation and orientation.
defineAsPointToPoint | This method defines a move feature described by a translation from one point to another.
defineAsPointToPosition | This method defines a move feature described by a point and an offset. The distances define offsets in the X, Y, and Z directions in either design or component space. To not move the input entities at all the offset distances should be set to the current location of the point in either design or component space. Adding or subtracting to those values will then move the entities that distance. It's best to experiment with the command interactively to understand the behavior.
defineAsRotate | This method defines a move feature that is described by an axis and rotation angle.
defineAsTranslateAlongEntity | This method will define a move feature that defines a translation along a specified entity.
defineAsTranslateXYZ | This method will define a move feature that defines a translation in X, Y, and Z.

Properties

Name | Description
inputEntities | An ObjectCollection containing the objects to move. The collection can contain BRepBody or BRepFace objects but not a mixture of the two types.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | **RETIRED** Gets and sets 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.

Accessed From

MoveFeatures.createInput, MoveFeatures.createInput2

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.defineAsFreeMove Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method will define a move feature whose translation and orientation is defined using a transformation matrix. A matrix can define any translation and orientation.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsFreeMove(transform)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsFreeMove(transform);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
transform | Matrix3D | The transformation matrix that defines the transform to apply. The matrix must be an orthogonal matrix; that is the axes are perpendicular to each other and there isn't any scaling or mirroring defined.

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version January 2023


MoveFeatureInput.defineAsPointToPoint Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method defines a move feature described by a translation from one point to another.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsPointToPoint(originPoint, targetPoint)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsPointToPoint(originPoint, targetPoint);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
originPoint | Base | The first point that defines the start position of the move.
targetPoint | Base | The second point that defines the direction and distance of the move.

Version

Introduced in version January 2023


MoveFeatureInput.defineAsPointToPosition Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method defines a move feature described by a point and an offset. The distances define offsets in the X, Y, and Z directions in either design or component space. To not move the input entities at all the offset distances should be set to the current location of the point in either design or component space. Adding or subtracting to those values will then move the entities that distance. It's best to experiment with the command interactively to understand the behavior.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsPointToPosition(point, xDistance, yDistance, zDistance, isDesignSpace)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsPointToPosition(point, xDistance, yDistance, zDistance, isDesignSpace);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
point | Base | An entity that defines a point in space. This can be a sketch point, a construction point, or a BRepVertex.
xDistance | ValueInput | A ValueInput object that defines the offset in the X direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
yDistance | ValueInput | A ValueInput object that defines the offset in the Y direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
zDistance | ValueInput | A ValueInput object that defines the offset in the Z direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units will be used.
isDesignSpace | boolean | Defines if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

Version

Introduced in version January 2023


MoveFeatureInput.defineAsRotate Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method defines a move feature that is described by an axis and rotation angle.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsRotate(axisEntity, angle)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsRotate(axisEntity, angle);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
axisEntity | Base | A linear entity that defines the axis of rotation. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The natural direction of the entity defines a right-hand rule for the rotation direction.
angle | ValueInput | A ValueInput object that defines the rotation angle. If the ValueInput is created using a real value, the angle is in radians. If it's defined using a string, the default document units will be used.

Version

Introduced in version January 2023


MoveFeatureInput.defineAsTranslateAlongEntity Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method will define a move feature that defines a translation along a specified entity.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsTranslateAlongEntity(linearEntity, distance)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsTranslateAlongEntity(linearEntity, distance);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
linearEntity | Base | A linear entity that defines the direction of the move. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The entity defines the direction, not the distance. The natural direction of the entity defines the translation direction.
distance | ValueInput | A ValueInput object that defines the offset distance. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units are used.

Version

Introduced in version January 2023


MoveFeatureInput.defineAsTranslateXYZ Method

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This method will define a move feature that defines a translation in X, Y, and Z.

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
returnValue = moveFeatureInput_var.defineAsTranslateXYZ(xDistance, yDistance, zDistance, isDesignSpace)
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = moveFeatureInput_var->defineAsTranslateXYZ(xDistance, yDistance, zDistance, isDesignSpace);

Return Value

Type | Description
boolean | Returns true if defining the type of move is successful.

Parameters

Name | Type | Description
xDistance | ValueInput | A ValueInput object that defines the offset in the X direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units are used.
yDistance | ValueInput | A ValueInput object that defines the offset in the Y direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units are used.
zDistance | ValueInput | A ValueInput object that defines the offset in the Z direction. If the ValueInput is created using a real value, the distance is in centimeters. If it's defined using a string, the default document units are used.
isDesignSpace | boolean | Defines if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

Version

Introduced in version January 2023


MoveFeatureInput.inputEntities Property

Parent Object: MoveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

An ObjectCollection containing the objects to move. The collection can contain BRepBody or BRepFace objects but not a mixture of the two types.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets 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.

Remarks

This property is obsolete. You should now use the setToFreeMove for the equivalent functionality.

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
Retired in version January 2023


MoveFeaturePointToPointDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

The MoveFeaturePointToPointDefinition object defines a move feature described by the translation from one point to another.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
originPoint Gets and sets the first point that defines the start position of the move.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
parentMoveFeature | Returns the parent MoveFeature object
targetPoint Gets and sets the second point that defines the direction and distance of the move.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.classType Method

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeaturePointToPointDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

returnValue = adsk::fusion::MoveFeaturePointToPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.isValid Property

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPointDefinition_var.isValid
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.
#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeaturePointToPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.objectType Property

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPointDefinition_var.objectType
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.
#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

// Get the value of the property.
string propertyValue = moveFeaturePointToPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.originPoint Property

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

Gets and sets the first point that defines the start position of the move.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPointDefinition_var.originPoint

# Set the value of the property.
moveFeaturePointToPointDefinition_var.originPoint = propertyValue
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.
#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = moveFeaturePointToPointDefinition_var->originPoint();

// Set the value of the property, where value_var is a Base.
bool returnValue = moveFeaturePointToPointDefinition_var->originPoint(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.parentMoveFeature Property

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPointDefinition_var.parentMoveFeature
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.
#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeaturePointToPointDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeaturePointToPointDefinition.targetPoint Property

Parent Object: MoveFeaturePointToPointDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPointDefinition.h>

Description

Gets and sets the second point that defines the direction and distance of the move.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPointDefinition_var.targetPoint

# Set the value of the property.
moveFeaturePointToPointDefinition_var.targetPoint = propertyValue
"moveFeaturePointToPointDefinition_var" is a variable referencing a MoveFeaturePointToPointDefinition object.
#include <Fusion/Features/MoveFeaturePointToPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = moveFeaturePointToPointDefinition_var->targetPoint();

// Set the value of the property, where value_var is a Base.
bool returnValue = moveFeaturePointToPointDefinition_var->targetPoint(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

The MoveFeaturePointToPositionDefinition object defines a move feature described by a point and an offset. The distances define offsets in the X, Y, and Z directions in either design or component space. To not move the input entities at all the offset distances should be set to the current location of the point in either design or component space. Adding or subtracting to those values will then move the entities that distance. It's best to experiment with the command interactively to understand the behavior.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isDesignSpace Gets and sets if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object
point Gets and sets the entity that defines a point in space. This can be a sketch point, a construction point, or a BRepVertex.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
xDistance | Gets the model parameter that controls the offset in the X direction. You can use properties
yDistance | Gets the model parameter that controls the offset in the Y direction. You can use properties
zDistance | Gets the model parameter that controls the offset in the Z direction. You can use properties

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.classType Method

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeaturePointToPositionDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

returnValue = adsk::fusion::MoveFeaturePointToPositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.isDesignSpace Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Gets and sets if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.isDesignSpace

# Set the value of the property.
moveFeaturePointToPositionDefinition_var.isDesignSpace = propertyValue
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeaturePointToPositionDefinition_var->isDesignSpace();

// Set the value of the property, where value_var is a boolean.
bool returnValue = moveFeaturePointToPositionDefinition_var->isDesignSpace(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.isValid Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.isValid
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeaturePointToPositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.objectType Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.objectType
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
string propertyValue = moveFeaturePointToPositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.parentMoveFeature Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.parentMoveFeature
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeaturePointToPositionDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.point Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Gets and sets the entity that defines a point in space. This can be a sketch point, a construction point, or a BRepVertex.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.point

# Set the value of the property.
moveFeaturePointToPositionDefinition_var.point = propertyValue
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = moveFeaturePointToPositionDefinition_var->point();

// Set the value of the property, where value_var is a Base.
bool returnValue = moveFeaturePointToPositionDefinition_var->point(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.xDistance Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Gets the model parameter that controls the offset in the X direction. You can use properties

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.xDistance
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeaturePointToPositionDefinition_var->xDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.yDistance Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Gets the model parameter that controls the offset in the Y direction. You can use properties

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.yDistance
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeaturePointToPositionDefinition_var->yDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeaturePointToPositionDefinition.zDistance Property

Parent Object: MoveFeaturePointToPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

Description

Gets the model parameter that controls the offset in the Z direction. You can use properties

Syntax

  • Python
  • C++
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.

# Get the value of the property.
propertyValue = moveFeaturePointToPositionDefinition_var.zDistance
"moveFeaturePointToPositionDefinition_var" is a variable referencing a MoveFeaturePointToPositionDefinition object.
#include <Fusion/Features/MoveFeaturePointToPositionDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeaturePointToPositionDefinition_var->zDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

The MoveFeatureRotateDefinition object defines a move feature described by a rotation around a specified entity.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 model parameter that controls the rotation angle. You can use properties on the returned ModelParameter object to edit the offset distance.
axisEntity Gets and sets the linear entity that defines the axis of rotation. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The natural direction of the entity defines a right-hand rule for the rotation direction.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.angle Property

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

Gets the model parameter that controls the rotation angle. You can use properties on the returned ModelParameter object to edit the offset distance.

Syntax

  • Python
  • C++
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.

# Get the value of the property.
propertyValue = moveFeatureRotateDefinition_var.angle
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.
#include <Fusion/Features/MoveFeatureRotateDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeatureRotateDefinition_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.axisEntity Property

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

Gets and sets the linear entity that defines the axis of rotation. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The natural direction of the entity defines a right-hand rule for the rotation direction.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.

# Get the value of the property.
propertyValue = moveFeatureRotateDefinition_var.axisEntity

# Set the value of the property.
moveFeatureRotateDefinition_var.axisEntity = propertyValue
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.
#include <Fusion/Features/MoveFeatureRotateDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = moveFeatureRotateDefinition_var->axisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = moveFeatureRotateDefinition_var->axisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.classType Method

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureRotateDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureRotateDefinition.h>

returnValue = adsk::fusion::MoveFeatureRotateDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.isValid Property

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.

# Get the value of the property.
propertyValue = moveFeatureRotateDefinition_var.isValid
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.
#include <Fusion/Features/MoveFeatureRotateDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureRotateDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.objectType Property

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.

# Get the value of the property.
propertyValue = moveFeatureRotateDefinition_var.objectType
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.
#include <Fusion/Features/MoveFeatureRotateDefinition.h>

// Get the value of the property.
string propertyValue = moveFeatureRotateDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeatureRotateDefinition.parentMoveFeature Property

Parent Object: MoveFeatureRotateDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureRotateDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.

# Get the value of the property.
propertyValue = moveFeatureRotateDefinition_var.parentMoveFeature
"moveFeatureRotateDefinition_var" is a variable referencing a MoveFeatureRotateDefinition object.
#include <Fusion/Features/MoveFeatureRotateDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeatureRotateDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Collection that provides access to all of the existing move features in a component and supports the ability to create new move features.

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 | **RETIRED** 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.
createInput2 | Creates a MoveFeatureInput object. Use properties and methods on this object to define how the move is defined and then use the MoveFeatues.add method, passing in the MoveFeatureInput object to create a move feature.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Creates a new move feature.

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 createInput2 method to create a new MoveFeatureInput object and then use methods on the MoveFeatureInput object to define the move feature.

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


moveFeatures.add

Description

Demonstrates the moveFeatures.add method.

Code Samples

  • Python
def demo_moveFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the body to move selected.
    selection = _ui.selectEntity('Select a body', 'Bodies').entity
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(selection)

    # Define a matrix that will move the body 10 cm in the Y direction.
    vector = adsk.core.Vector3D.create(0.0, 10.0, 0.0)
    transform = adsk.core.Matrix3D.create()
    transform.translation = vector

    moveFeatures = rootComp.features.moveFeatures
    input = moveFeatures.createInput2(bodies, transform)
    input.defineAsFreeMove(transform)
    moveFeature = moveFeatures.add(input)


MoveFeatures.classType Method

Parent Object: MoveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

The number of move features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This method is obsolete. You should use the createInput2 method instead.

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 | An ObjectCollection containing 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 must be perpendicular to each other and there can't be any scaling or mirroring defined.

Version

Introduced in version March 2015
Retired in version January 2023


MoveFeatures.createInput2 Method

Parent Object: MoveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Creates a MoveFeatureInput object. Use properties and methods on this object to define how the move is defined and then use the MoveFeatues.add method, passing in the MoveFeatureInput object to create a move feature.

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.
returnValue = moveFeatures_var.createInput2(inputEntities)
"moveFeatures_var" is a variable referencing a MoveFeatures object.

#include <Fusion/Features/MoveFeatures.h>

returnValue = moveFeatures_var->createInput2(inputEntities);

Return Value

Type | Description
MoveFeatureInput | Returns the newly created MoveFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | An ObjectCollection containing the objects to move. For a parametric model, the collection can contain BRepBody or BRepFace objects but not a combination of both.

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version January 2023


MoveFeatures.isValid Property

Parent Object: MoveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Function that returns the specified move feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

Function that returns the specified move feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


MoveFeatureTranslateAlongEntityDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

The MoveFeatureTranslateAlongEntityDefinition object defines a move feature described by a translation in the direction defined by a specified entity.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 the model parameter that controls the offset distance. You can use properties on the returned ModelParameter object to edit the offset distance.
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 and sets the linear entity that defines the direction of the move. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The entity defines the direction, not the distance. The natural direction of the entity defines the translation direction.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.classType Method

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureTranslateAlongEntityDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

returnValue = adsk::fusion::MoveFeatureTranslateAlongEntityDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.distance Property

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

Gets the model parameter that controls the offset distance. You can use properties on the returned ModelParameter object to edit the offset distance.

Syntax

  • Python
  • C++
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateAlongEntityDefinition_var.distance
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.
#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeatureTranslateAlongEntityDefinition_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.isValid Property

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateAlongEntityDefinition_var.isValid
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.
#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureTranslateAlongEntityDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.linearEntity Property

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

Gets and sets the linear entity that defines the direction of the move. This can be a linear BRepEdge, ConstructionAxis, or a SketchLine. The entity defines the direction, not the distance. The natural direction of the entity defines the translation direction.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateAlongEntityDefinition_var.linearEntity

# Set the value of the property.
moveFeatureTranslateAlongEntityDefinition_var.linearEntity = propertyValue
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.
#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = moveFeatureTranslateAlongEntityDefinition_var->linearEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = moveFeatureTranslateAlongEntityDefinition_var->linearEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.objectType Property

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateAlongEntityDefinition_var.objectType
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.
#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

// Get the value of the property.
string propertyValue = moveFeatureTranslateAlongEntityDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeatureTranslateAlongEntityDefinition.parentMoveFeature Property

Parent Object: MoveFeatureTranslateAlongEntityDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateAlongEntityDefinition_var.parentMoveFeature
"moveFeatureTranslateAlongEntityDefinition_var" is a variable referencing a MoveFeatureTranslateAlongEntityDefinition object.
#include <Fusion/Features/MoveFeatureTranslateAlongEntityDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeatureTranslateAlongEntityDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition Object

Derived from: MoveFeatureDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

The MoveFeatureTranslateXYZDefinition object defines a move feature described by offsets in the X, Y, and Z directions.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isDesignSpace Gets and sets if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentMoveFeature | Returns the parent MoveFeature object
xDistance | Gets the model parameter that controls the X distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.
yDistance | Gets the model parameter that controls the Y distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.
zDistance | Gets the model parameter that controls the Z distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.classType Method

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureTranslateXYZDefinition.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

returnValue = adsk::fusion::MoveFeatureTranslateXYZDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.isDesignSpace Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Gets and sets if the translation is defined with respect to the design or component space. Design space is the same as the root component space.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.isDesignSpace

# Set the value of the property.
moveFeatureTranslateXYZDefinition_var.isDesignSpace = propertyValue
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureTranslateXYZDefinition_var->isDesignSpace();

// Set the value of the property, where value_var is a boolean.
bool returnValue = moveFeatureTranslateXYZDefinition_var->isDesignSpace(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.isValid Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.isValid
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
boolean propertyValue = moveFeatureTranslateXYZDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.objectType Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.objectType
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
string propertyValue = moveFeatureTranslateXYZDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.parentMoveFeature Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Returns the parent MoveFeature object

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.parentMoveFeature
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeatureTranslateXYZDefinition_var->parentMoveFeature();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.xDistance Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Gets the model parameter that controls the X distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.xDistance
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeatureTranslateXYZDefinition_var->xDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.yDistance Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Gets the model parameter that controls the Y distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.yDistance
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeatureTranslateXYZDefinition_var->yDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MoveFeatureTranslateXYZDefinition.zDistance Property

Parent Object: MoveFeatureTranslateXYZDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

Description

Gets the model parameter that controls the Z distance of the translation. You can use properties on the returned ModelParameter object to edit the offset distance.

Syntax

  • Python
  • C++
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.

# Get the value of the property.
propertyValue = moveFeatureTranslateXYZDefinition_var.zDistance
"moveFeatureTranslateXYZDefinition_var" is a variable referencing a MoveFeatureTranslateXYZDefinition object.
#include <Fusion/Features/MoveFeatureTranslateXYZDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = moveFeatureTranslateXYZDefinition_var->zDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2023


MultiLineTextDefinition Object

Derived from: SketchTextDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Defines the information for multi-line text.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
rotate | Rotates the text box.

Properties

Name | Description
characterSpacing | Gets and sets the spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.
horizontalAlignment | Gets and sets the horizontal alignment of the text with respect to the text rectangle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketchText | Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.
rectangleLines | 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. If the MultiLineTextDefinition object is obtained from a SketchTextInput object, this property will return null because the text and it's associated lines have not been created yet.
verticalAlignment | Gets and sets the vertical alignment of the text with respect to the text rectangle.

Version

Introduced in version December 2020


MultiLineTextDefinition.characterSpacing Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Gets and sets the spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.characterSpacing

# Set the value of the property.
multiLineTextDefinition_var.characterSpacing = propertyValue
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
double propertyValue = multiLineTextDefinition_var->characterSpacing();

// Set the value of the property, where value_var is a double.
bool returnValue = multiLineTextDefinition_var->characterSpacing(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2021


MultiLineTextDefinition.classType Method

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MultiLineTextDefinition.classType()
This is a static method.

#include <Fusion/Sketch/MultiLineTextDefinition.h>

returnValue = adsk::fusion::MultiLineTextDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


MultiLineTextDefinition.horizontalAlignment Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Gets and sets the horizontal alignment of the text with respect to the text rectangle.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.horizontalAlignment

# Set the value of the property.
multiLineTextDefinition_var.horizontalAlignment = propertyValue
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
HorizontalAlignments propertyValue = multiLineTextDefinition_var->horizontalAlignment();

// Set the value of the property, where value_var is a HorizontalAlignments.
bool returnValue = multiLineTextDefinition_var->horizontalAlignment(value_var);

Property Value

This is a read/write property whose value is a HorizontalAlignments.

Version

Introduced in version December 2020


MultiLineTextDefinition.isValid Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.isValid
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
boolean propertyValue = multiLineTextDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


MultiLineTextDefinition.objectType Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.objectType
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
string propertyValue = multiLineTextDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


MultiLineTextDefinition.parentSketchText Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.parentSketchText
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
Ptr<SketchText> propertyValue = multiLineTextDefinition_var->parentSketchText();

Property Value

This is a read only property whose value is a SketchText.

Version

Introduced in version July 2022


MultiLineTextDefinition.rectangleLines Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

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. If the MultiLineTextDefinition object is obtained from a SketchTextInput object, this property will return null because the text and it's associated lines have not been created yet.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.rectangleLines
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
std::vector<Ptr<SketchLine>> propertyValue = multiLineTextDefinition_var->rectangleLines();

Property Value

This is a read only property whose value is an array of type SketchLine.

Version

Introduced in version December 2020


MultiLineTextDefinition.rotate Method

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Rotates the text box.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
# Uses no optional arguments.
returnValue = multiLineTextDefinition_var.rotate(angle)

# Uses optional arguments.
returnValue = multiLineTextDefinition_var.rotate(angle, keyPoint)
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Uses no optional arguments.
returnValue = multiLineTextDefinition_var->rotate(angle);

// Uses optional arguments.
returnValue = multiLineTextDefinition_var->rotate(angle, keyPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
angle | double | The angle to rotate the text, specified in radians.
keyPoint | TextBoxKeyPoints | The key point the rotation is defined around. This is optional and defaults the center of the text box. This is an optional argument whose default value is TextBoxKeyPoints.MiddleTextBoxKeyPoint.

Version

Introduced in version December 2020


MultiLineTextDefinition.verticalAlignment Property

Parent Object: MultiLineTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/MultiLineTextDefinition.h>

Description

Gets and sets the vertical alignment of the text with respect to the text rectangle.

Syntax

  • Python
  • C++
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.

# Get the value of the property.
propertyValue = multiLineTextDefinition_var.verticalAlignment

# Set the value of the property.
multiLineTextDefinition_var.verticalAlignment = propertyValue
"multiLineTextDefinition_var" is a variable referencing a MultiLineTextDefinition object.
#include <Fusion/Sketch/MultiLineTextDefinition.h>

// Get the value of the property.
VerticalAlignments propertyValue = multiLineTextDefinition_var->verticalAlignment();

// Set the value of the property, where value_var is a VerticalAlignments.
bool returnValue = multiLineTextDefinition_var->verticalAlignment(value_var);

Property Value

This is a read/write property whose value is a VerticalAlignments.

Version

Introduced in version December 2020


NamedValues Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Wraps a list of named values.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

NamedValues.create, PostProcessInput.postProperties, ToolQuery.criteria

Version

Introduced in version August 2014


NamedValues.add Method

Parent Object: NamedValues
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Adds a name value pair to the NamedValues object

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Returns the number of name value pairs in this object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Creates a transient NamedValues object.

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();

Return Value

Type | Description
NamedValues | Returns the created NamedValue object.

Version

Introduced in version August 2014


NamedValues.getByIndex Method

Parent Object: NamedValues
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Function that returns the name and ValueInput object of a name value pair by specifying an index number

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Function that returns the ValueInput object of a name value pair by specifying its name

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedValues.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


NamedView Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Represents a named view as seen in the browser.

Methods

Name | Description
apply | This updates the active viewport to use the camera associated with this named view.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 named view. This method will fail for any of the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.

Properties

Name | Description
camera | Gets and sets the camera associated with this named view. This property acts as read-only for the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.
isBuiltIn | Indicates if this named view is one of the four standard named views ("TOP", "FRONT", "RIGHT", and "HOME"). There is limited functionality with the four standard named views.
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 named view. This property acts as read-only for the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentProduct | Returns the parent product of this named view.

Accessed From

NamedViews.add, NamedViews.frontNamedView, NamedViews.homeNamedView, NamedViews.item, NamedViews.itemByName, NamedViews.rightNamedView, NamedViews.topNamedView

Version

Introduced in version September 2023


NamedView.apply Method

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

This updates the active viewport to use the camera associated with this named view.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.
returnValue = namedView_var.apply()
"namedView_var" is a variable referencing a NamedView object.

#include <Core/Application/NamedView.h>

returnValue = namedView_var->apply();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version September 2023


NamedView.camera Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Gets and sets the camera associated with this named view. This property acts as read-only for the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.camera

# Set the value of the property.
namedView_var.camera = propertyValue
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
Ptr<Camera> propertyValue = namedView_var->camera();

// Set the value of the property, where value_var is a Camera.
bool returnValue = namedView_var->camera(value_var);

Property Value

This is a read/write property whose value is a Camera.

Version

Introduced in version September 2023


NamedView.classType Method

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NamedView.classType()
This is a static method.

#include <Core/Application/NamedView.h>

returnValue = adsk::core::NamedView::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


NamedView.deleteMe Method

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Deletes this named view. This method will fail for any of the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.
returnValue = namedView_var.deleteMe()
"namedView_var" is a variable referencing a NamedView object.

#include <Core/Application/NamedView.h>

returnValue = namedView_var->deleteMe();

Version

Introduced in version September 2023


NamedView.isBuiltIn Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Indicates if this named view is one of the four standard named views ("TOP", "FRONT", "RIGHT", and "HOME"). There is limited functionality with the four standard named views.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.isBuiltIn
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
boolean propertyValue = namedView_var->isBuiltIn();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


NamedView.isValid Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.isValid
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
boolean propertyValue = namedView_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


NamedView.name Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Gets and sets the name of this named view. This property acts as read-only for the four standard named views. This can be determined by checking to see if the isBuiltIn property is true.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.name

# Set the value of the property.
namedView_var.name = propertyValue
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
string propertyValue = namedView_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = namedView_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2023


NamedView.objectType Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.objectType
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
string propertyValue = namedView_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


NamedView.parentProduct Property

Parent Object: NamedView
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedView.h>

Description

Returns the parent product of this named view.

Syntax

  • Python
  • C++
"namedView_var" is a variable referencing a NamedView object.

# Get the value of the property.
propertyValue = namedView_var.parentProduct
"namedView_var" is a variable referencing a NamedView object.
#include <Core/Application/NamedView.h>

// Get the value of the property.
Ptr<Product> propertyValue = namedView_var->parentProduct();

Property Value

This is a read only property whose value is a Product.

Version

Introduced in version September 2023


NamedViews Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Collection that provides access to all of the existing named views associated with a Product and supports the creation of new named views.

Methods

Name | Description
add | Creates a new named view.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 named view using an index into the collection. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not accessible through this method. For the predefined view use the properties on this collection that provide direct access to the specific named view.
itemByName | Returns the specified named view using the name of the named view. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not accessible through this method. For the predefined view use the properties on this collection that provide direct access to the specific named view.

Properties

Name | Description
count | Returns the number of named views associated with the product. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not included in this count. Only user-created named view are counted.
frontNamedView | Returns the standard named view called "FRONT".
homeNamedView | Returns the standard named view called "HOME".
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
rightNamedView | Returns the standard named view called "RIGHT".
topNamedView | Returns the standard named view called "TOP".

Accessed From

CAM.namedViews, Design.namedViews, Drawing.namedViews, FlatPatternProduct.namedViews, Product.namedViews, WorkingModel.namedViews

Version

Introduced in version September 2023


NamedViews.add Method

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Creates a new named view.

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.
# Uses no optional arguments.
returnValue = namedViews_var.add(camera)

# Uses optional arguments.
returnValue = namedViews_var.add(camera, name)
"namedViews_var" is a variable referencing a NamedViews object.

#include <Core/Application/NamedViews.h>

// Uses no optional arguments.
returnValue = namedViews_var->add(camera);

// Uses optional arguments.
returnValue = namedViews_var->add(camera, name);

Return Value

Type | Description
NamedView | Returns the newly created NamedView object or fails if invalid input was provided.

Parameters

Name | Type | Description
camera | Camera | The camera that defines the view. To create a named view for the active viewport you can get a camera from the active viewport and provide it as input to this method.
name | string | The name of the named view. This must be unique with respect to other named views in the product. This is optional and if not provided a default unique name will be generated. This is an optional argument whose default value is "".

Version

Introduced in version September 2023


NamedViews.classType Method

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NamedViews.classType()
This is a static method.

#include <Core/Application/NamedViews.h>

returnValue = adsk::core::NamedViews::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


NamedViews.count Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the number of named views associated with the product. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not included in this count. Only user-created named view are counted.

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.count
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
uinteger propertyValue = namedViews_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2023


NamedViews.frontNamedView Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the standard named view called "FRONT".

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.frontNamedView
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
Ptr<NamedView> propertyValue = namedViews_var->frontNamedView();

Property Value

This is a read only property whose value is a NamedView.

Version

Introduced in version September 2023


NamedViews.homeNamedView Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the standard named view called "HOME".

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.homeNamedView
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
Ptr<NamedView> propertyValue = namedViews_var->homeNamedView();

Property Value

This is a read only property whose value is a NamedView.

Version

Introduced in version September 2023


NamedViews.isValid Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.isValid
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
boolean propertyValue = namedViews_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


NamedViews.item Method

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the specified named view using an index into the collection. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not accessible through this method. For the predefined view use the properties on this collection that provide direct access to the specific named view.

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.
returnValue = namedViews_var.item(index)
"namedViews_var" is a variable referencing a NamedViews object.

#include <Core/Application/NamedViews.h>

returnValue = namedViews_var->item(index);

Return Value

Type | Description
NamedView | Returns the specified named view or an error if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the named view within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2023


NamedViews.itemByName Method

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the specified named view using the name of the named view. The four standard named views ("TOP", "FRONT", "RIGHT", and "HOME") are not accessible through this method. For the predefined view use the properties on this collection that provide direct access to the specific named view.

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.
returnValue = namedViews_var.itemByName(name)
"namedViews_var" is a variable referencing a NamedViews object.

#include <Core/Application/NamedViews.h>

returnValue = namedViews_var->itemByName(name);

Return Value

Type | Description
NamedView | Returns null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the named view within the collection to return.

Version

Introduced in version September 2023


NamedViews.objectType Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.objectType
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
string propertyValue = namedViews_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


NamedViews.rightNamedView Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the standard named view called "RIGHT".

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.rightNamedView
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
Ptr<NamedView> propertyValue = namedViews_var->rightNamedView();

Property Value

This is a read only property whose value is a NamedView.

Version

Introduced in version September 2023


NamedViews.topNamedView Property

Parent Object: NamedViews
Defined in namespace "adsk::core" and the header file is <Core/Application/NamedViews.h>

Description

Returns the standard named view called "TOP".

Syntax

  • Python
  • C++
"namedViews_var" is a variable referencing a NamedViews object.

# Get the value of the property.
propertyValue = namedViews_var.topNamedView
"namedViews_var" is a variable referencing a NamedViews object.
#include <Core/Application/NamedViews.h>

// Get the value of the property.
Ptr<NamedView> propertyValue = namedViews_var->topNamedView();

Property Value

This is a read only property whose value is a NamedView.

Version

Introduced in version September 2023


NavigationEvent Object

Derived from: Event Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

A NavigationEvent is fired when a link is navigated on the page in a palette.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.navigatingURL, Palette.navigatingURL, TextCommandPalette.navigatingURL

Version

Introduced in version March 2021


NavigationEvent.add Method

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

Add a handler to be notified when the event occurs.

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.
returnValue = navigationEvent_var.add(handler)
"navigationEvent_var" is a variable referencing a NavigationEvent object.

#include <Core/UserInterface/NavigationEvent.h>

returnValue = navigationEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | NavigationEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version March 2021


NavigationEvent.classType Method

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NavigationEvent.classType()
This is a static method.

#include <Core/UserInterface/NavigationEvent.h>

returnValue = adsk::core::NavigationEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2021


NavigationEvent.isValid Property

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.

# Get the value of the property.
propertyValue = navigationEvent_var.isValid
"navigationEvent_var" is a variable referencing a NavigationEvent object.
#include <Core/UserInterface/NavigationEvent.h>

// Get the value of the property.
boolean propertyValue = navigationEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2021


NavigationEvent.name Property

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.

# Get the value of the property.
propertyValue = navigationEvent_var.name
"navigationEvent_var" is a variable referencing a NavigationEvent object.
#include <Core/UserInterface/NavigationEvent.h>

// Get the value of the property.
string propertyValue = navigationEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2021


NavigationEvent.objectType Property

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.

# Get the value of the property.
propertyValue = navigationEvent_var.objectType
"navigationEvent_var" is a variable referencing a NavigationEvent object.
#include <Core/UserInterface/NavigationEvent.h>

// Get the value of the property.
string propertyValue = navigationEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2021


NavigationEvent.remove Method

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.
returnValue = navigationEvent_var.remove(handler)
"navigationEvent_var" is a variable referencing a NavigationEvent object.

#include <Core/UserInterface/NavigationEvent.h>

returnValue = navigationEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | NavigationEventHandler | The handler object to be removed from the event.

Version

Introduced in version March 2021


NavigationEvent.sender Property

Parent Object: NavigationEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"navigationEvent_var" is a variable referencing a NavigationEvent object.

# Get the value of the property.
propertyValue = navigationEvent_var.sender
"navigationEvent_var" is a variable referencing a NavigationEvent object.
#include <Core/UserInterface/NavigationEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = navigationEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2021


NavigationEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

The NavigationEventArgs provides access to the information sent from the browser within a palette on a navigation event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
browserCommandInput | When the event is fired from a BrowserCommandInput object, this property returns the specific BrowserCommandInput that caused the event to fire. In all other cases this property returns null.
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.
launchExternally | If True, the URL will be navigated to in an external browser by the operating system. If False, the default value, the URL will be navigated to in the palette's browser.
navigationURL | The URL that is being navigated to.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
preventDefault | If True, the default handling of this navigation event will not continue. If False, the default value, the default handling of this navigation event will continue.

Version

Introduced in version March 2021


NavigationEventArgs.browserCommandInput Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

When the event is fired from a BrowserCommandInput object, this property returns the specific BrowserCommandInput that caused the event to fire. In all other cases this property returns null.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.browserCommandInput
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
Ptr<BrowserCommandInput> propertyValue = navigationEventArgs_var->browserCommandInput();

Property Value

This is a read only property whose value is a BrowserCommandInput.

Version

Introduced in version July 2021


NavigationEventArgs.classType Method

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NavigationEventArgs.classType()
This is a static method.

#include <Core/UserInterface/NavigationEventArgs.h>

returnValue = adsk::core::NavigationEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2021


NavigationEventArgs.firingEvent Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.firingEvent
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = navigationEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version March 2021


NavigationEventArgs.isValid Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.isValid
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
boolean propertyValue = navigationEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2021


NavigationEventArgs.launchExternally Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

If True, the URL will be navigated to in an external browser by the operating system. If False, the default value, the URL will be navigated to in the palette's browser.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.launchExternally

# Set the value of the property.
navigationEventArgs_var.launchExternally = propertyValue
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
boolean propertyValue = navigationEventArgs_var->launchExternally();

// Set the value of the property, where value_var is a boolean.
bool returnValue = navigationEventArgs_var->launchExternally(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


NavigationEventArgs.navigationURL Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

The URL that is being navigated to.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.navigationURL

# Set the value of the property.
navigationEventArgs_var.navigationURL = propertyValue
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
string propertyValue = navigationEventArgs_var->navigationURL();

// Set the value of the property, where value_var is a string.
bool returnValue = navigationEventArgs_var->navigationURL(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2021


NavigationEventArgs.objectType Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.objectType
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
string propertyValue = navigationEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2021


NavigationEventArgs.preventDefault Property

Parent Object: NavigationEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventArgs.h>

Description

If True, the default handling of this navigation event will not continue. If False, the default value, the default handling of this navigation event will continue.

Syntax

  • Python
  • C++
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.

# Get the value of the property.
propertyValue = navigationEventArgs_var.preventDefault

# Set the value of the property.
navigationEventArgs_var.preventDefault = propertyValue
"navigationEventArgs_var" is a variable referencing a NavigationEventArgs object.
#include <Core/UserInterface/NavigationEventArgs.h>

// Get the value of the property.
boolean propertyValue = navigationEventArgs_var->preventDefault();

// Set the value of the property, where value_var is a boolean.
bool returnValue = navigationEventArgs_var->preventDefault(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


NavigationEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventHandler.h>

Description

The NavigationEventHandler is a client implemented class that can be added as a handler to a Navigation event which is triggered by the browser within a palette.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version March 2021


NavigationEventHandler.notify Method

Parent Object: NavigationEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/NavigationEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"navigationEventHandler_var" is a variable referencing a NavigationEventHandler object.
returnValue = navigationEventHandler_var.notify(eventArgs)
"navigationEventHandler_var" is a variable referencing a NavigationEventHandler object.

#include <Core/UserInterface/NavigationEventHandler.h>

returnValue = navigationEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | NavigationEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version March 2021


NCProgram Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Object that represents an existing NC program.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.
postProcess | Creates machine-specific NC code for this NC program.
updatePostParameters | Overrides the default post parameters of this NC program with the given user's input.

Properties

Name | Description
attributes | Returns the collection of attributes associated with this object.
error | Returns a message corresponding to any active error associated with the value of this parameter.
filteredOperations | Gets all valid operations derived from the operations property. The list is ordered with respect to the nc_program_oderByTool parameter and considers the number of instances in a setup.
fusionHubFolder | Preview Gets and sets the DataFolder to which the exported files should be uploaded to if the parameter nc_program_postToFusionTeam is set to true. When a DataFolder is set, nc_program_postToFusionTeam is automatically set to true. An exception will be thrown if the DataFolder to set is not valid or not accessible. Depending on the FusionHubExecutionBehaviors used for the export the design may be saved at this location as well.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
machine | Gets and sets the machine of this NC program. When a machine is set, "use machine configuration" is automatically set to true. If this machine has a default post assigned, this post will be set for the NC program as well.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | Gets and sets the operations which will be included in the NC program. Valid input contains any number of operations, setups or folders. For setups and folders all child operations will be added. Operations will be post processed in setup order, with operations from the same setup grouped together. Setting the nc_program_orderByTool BooleanParameterValue on the parameters property to true will reorder operations across multiple setups to reduce the number of tool changes.
parameters | Gets the CAMParameters collection for this operation.
parentSetup | Gets the Setup this operation belongs to.
postConfiguration | Gets and sets the post configuration of this NC program.
postParameters | Gets the post parameters of this NC program.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

NCPrograms.add, NCPrograms.item, NCPrograms.itemByName, NCPrograms.itemByOperationId

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgram.attributes Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.attributes
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = nCProgram_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version April 2023


NCProgram.classType Method

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.NCProgram.classType()
This is a static method.

#include <Cam/NCProgram/NCProgram.h>

returnValue = adsk::cam::NCProgram::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


NCProgram.copyAfter Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.copyAfter(operation)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


NCProgram.copyBefore Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.copyBefore(operation)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


NCProgram.copyInto Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.copyInto(container)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


NCProgram.deleteMe Method

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.deleteMe()
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


NCProgram.duplicate Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.duplicate()
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


NCProgram.error Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.error
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NCProgram.filteredOperations Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets all valid operations derived from the operations property. The list is ordered with respect to the nc_program_oderByTool parameter and considers the number of instances in a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.filteredOperations
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
std::vector<Ptr<OperationBase>> propertyValue = nCProgram_var->filteredOperations();

Property Value

This is a read only property whose value is an array of type OperationBase.

Version

Introduced in version April 2023


NCProgram.fusionHubFolder Property

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the DataFolder to which the exported files should be uploaded to if the parameter nc_program_postToFusionTeam is set to true. When a DataFolder is set, nc_program_postToFusionTeam is automatically set to true. An exception will be thrown if the DataFolder to set is not valid or not accessible. Depending on the FusionHubExecutionBehaviors used for the export the design may be saved at this location as well.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.fusionHubFolder

# Set the value of the property.
nCProgram_var.fusionHubFolder = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = nCProgram_var->fusionHubFolder();

// Set the value of the property, where value_var is a DataFolder.
bool returnValue = nCProgram_var->fusionHubFolder(value_var);

Property Value

This is a read/write property whose value is a DataFolder.

Version

Introduced in version July 2024


NCProgram.generatedDataCollection Property

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.generatedDataCollection
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = nCProgram_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


NCProgram.hasError Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.hasError
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.hasWarning Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.hasWarning
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isLightBulbOn Property

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isLightBulbOn

# Set the value of the property.
nCProgram_var.isLightBulbOn = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = nCProgram_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


NCProgram.isOptional Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isOptional

# Set the value of the property.
nCProgram_var.isOptional = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = nCProgram_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isProtected Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isProtected

# Set the value of the property.
nCProgram_var.isProtected = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = nCProgram_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isSelected Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets if this operation is selected in the 'Setups' browser.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isSelected
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isSuppressed Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isSuppressed

# Set the value of the property.
nCProgram_var.isSuppressed = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = nCProgram_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isValid Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isValid
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCProgram.isVisible Property

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.isVisible
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
boolean propertyValue = nCProgram_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


NCProgram.machine Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the machine of this NC program. When a machine is set, "use machine configuration" is automatically set to true. If this machine has a default post assigned, this post will be set for the NC program as well.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.machine

# Set the value of the property.
nCProgram_var.machine = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<Machine> propertyValue = nCProgram_var->machine();

// Set the value of the property, where value_var is a Machine.
bool returnValue = nCProgram_var->machine(value_var);

Property Value

This is a read/write property whose value is a Machine.

Version

Introduced in version April 2023


NCProgram.modifyUtility Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.modifyUtility(utility)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


NCProgram.moveAfter Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.moveAfter(operation)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


NCProgram.moveBefore Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.moveBefore(operation)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


NCProgram.moveInto Method

Parent Object: NCProgram

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.moveInto(container)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


NCProgram.name Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

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.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.name

# Set the value of the property.
nCProgram_var.name = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = nCProgram_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


NCProgram.notes Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the notes of the operation.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.notes

# Set the value of the property.
nCProgram_var.notes = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = nCProgram_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


NCProgram.objectType Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.objectType
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NCProgram.operationId Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

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.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.operationId
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
integer propertyValue = nCProgram_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version April 2023


NCProgram.operations Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the operations which will be included in the NC program. Valid input contains any number of operations, setups or folders. For setups and folders all child operations will be added. Operations will be post processed in setup order, with operations from the same setup grouped together. Setting the nc_program_orderByTool BooleanParameterValue on the parameters property to true will reorder operations across multiple setups to reduce the number of tool changes.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.operations

# Set the value of the property.
nCProgram_var.operations = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
std::vector<Ptr<OperationBase>> propertyValue = nCProgram_var->operations();

// Set the value of the property, where value_var is an OperationBase.
bool returnValue = nCProgram_var->operations(value_var);

Property Value

This is a read/write property whose value is an array of type OperationBase.

Version

Introduced in version April 2023


NCProgram.parameters Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.parameters
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = nCProgram_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version April 2023


NCProgram.parentSetup Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets the Setup this operation belongs to.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.parentSetup
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<Setup> propertyValue = nCProgram_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version April 2023


NCProgram.postConfiguration Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets and sets the post configuration of this NC program.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.postConfiguration

# Set the value of the property.
nCProgram_var.postConfiguration = propertyValue
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<PostConfiguration> propertyValue = nCProgram_var->postConfiguration();

// Set the value of the property, where value_var is a PostConfiguration.
bool returnValue = nCProgram_var->postConfiguration(value_var);

Property Value

This is a read/write property whose value is a PostConfiguration.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgram.postParameters Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets the post parameters of this NC program.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.postParameters
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = nCProgram_var->postParameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgram.postProcess Method

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Creates machine-specific NC code for this NC program.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.postProcess(options)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->postProcess(options);

Return Value

Type | Description
boolean | Returns true if the post process was successful.

Parameters

Name | Type | Description
options | NCProgramPostProcessOptions | NCProgramPostProcessOptions to speficy the behavior on internal warning. Can be null if the default values should be used. If needed it can be created by its static create() method.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgram.strategy Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.strategy
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NCProgram.updatePostParameters Method

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Overrides the default post parameters of this NC program with the given user's input.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.
returnValue = nCProgram_var.updatePostParameters(parameters)
"nCProgram_var" is a variable referencing a NCProgram object.

#include <Cam/NCProgram/NCProgram.h>

returnValue = nCProgram_var->updatePostParameters(parameters);

Return Value

Type | Description
boolean | Returns true if the update was successful. False otherwise

Parameters

Name | Type | Description
parameters | CAMParameters |

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgram.warning Property

Parent Object: NCProgram
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgram.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"nCProgram_var" is a variable referencing a NCProgram object.

# Get the value of the property.
propertyValue = nCProgram_var.warning
"nCProgram_var" is a variable referencing a NCProgram object.
#include <Cam/NCProgram/NCProgram.h>

// Get the value of the property.
string propertyValue = nCProgram_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NCProgramInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

The NCProgramInput holds all necessary information to create a new NC program. It is needed for the NCPrograms.add method to instantiate a new NC program.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Optionally specify the display name that appears in the browser-tree to override the default.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operations | Gets and sets the operations which will be included in the NC program. Valid input contains any number of operations, setups or folders. For setups and folders all child operations will be added. Operations will be post processed in setup order, with operations from the same setup grouped together. Setting the nc_program_orderByTool BooleanParameterValue on the parameters property to true will reorder operations across multiple setups to reduce the number of tool changes.
parameters | Get all parameters for the current NC program. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.

Accessed From

NCPrograms.createInput

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgramInput.classType Method

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.NCProgramInput.classType()
This is a static method.

#include <Cam/NCProgram/NCProgramInput.h>

returnValue = adsk::cam::NCProgramInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


NCProgramInput.displayName Property

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

Optionally specify the display name that appears in the browser-tree to override the default.

Syntax

  • Python
  • C++
"nCProgramInput_var" is a variable referencing a NCProgramInput object.

# Get the value of the property.
propertyValue = nCProgramInput_var.displayName

# Set the value of the property.
nCProgramInput_var.displayName = propertyValue
"nCProgramInput_var" is a variable referencing a NCProgramInput object.
#include <Cam/NCProgram/NCProgramInput.h>

// Get the value of the property.
string propertyValue = nCProgramInput_var->displayName();

// Set the value of the property, where value_var is a string.
bool returnValue = nCProgramInput_var->displayName(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgramInput.isValid Property

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"nCProgramInput_var" is a variable referencing a NCProgramInput object.

# Get the value of the property.
propertyValue = nCProgramInput_var.isValid
"nCProgramInput_var" is a variable referencing a NCProgramInput object.
#include <Cam/NCProgram/NCProgramInput.h>

// Get the value of the property.
boolean propertyValue = nCProgramInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCProgramInput.objectType Property

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"nCProgramInput_var" is a variable referencing a NCProgramInput object.

# Get the value of the property.
propertyValue = nCProgramInput_var.objectType
"nCProgramInput_var" is a variable referencing a NCProgramInput object.
#include <Cam/NCProgram/NCProgramInput.h>

// Get the value of the property.
string propertyValue = nCProgramInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NCProgramInput.operations Property

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

Gets and sets the operations which will be included in the NC program. Valid input contains any number of operations, setups or folders. For setups and folders all child operations will be added. Operations will be post processed in setup order, with operations from the same setup grouped together. Setting the nc_program_orderByTool BooleanParameterValue on the parameters property to true will reorder operations across multiple setups to reduce the number of tool changes.

Syntax

  • Python
  • C++
"nCProgramInput_var" is a variable referencing a NCProgramInput object.

# Get the value of the property.
propertyValue = nCProgramInput_var.operations

# Set the value of the property.
nCProgramInput_var.operations = propertyValue
"nCProgramInput_var" is a variable referencing a NCProgramInput object.
#include <Cam/NCProgram/NCProgramInput.h>

// Get the value of the property.
std::vector<Ptr<OperationBase>> propertyValue = nCProgramInput_var->operations();

// Set the value of the property, where value_var is an OperationBase.
bool returnValue = nCProgramInput_var->operations(value_var);

Property Value

This is a read/write property whose value is an array of type OperationBase.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgramInput.parameters Property

Parent Object: NCProgramInput
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramInput.h>

Description

Get all parameters for the current NC program. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.

Syntax

  • Python
  • C++
"nCProgramInput_var" is a variable referencing a NCProgramInput object.

# Get the value of the property.
propertyValue = nCProgramInput_var.parameters
"nCProgramInput_var" is a variable referencing a NCProgramInput object.
#include <Cam/NCProgram/NCProgramInput.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = nCProgramInput_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCProgramPostProcessOptions Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

The NCProgramPostProcessOptions provides settings to control the post processing of NC programs. It is needed for the NCPrograms.postProcess method for posting toolpaths and generating CNC files and setup sheets.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 NCProgramPostProcessOptions object to be used as an input argument by the postProcess() method.

Properties

Name | Description
fusionHubExecutionBehavior | Preview Gets and sets the post process behavior for exporting to Fusion Hub. Uses fusionHubExecutionBehavior_ExportWithRelationship by default.
isFailOnToolNumberDuplication | Toggles whether the post processing should abort if two tools with the same tool number have been detected. True by default. If true, an exception will be thrown if at least two tools map to the same tool number. If false, the post processor will not perform a tool change if the tool number is the same, which may mean that the wrong tool is used for an 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
postProcessExecutionBehavior | Gets and sets the post process behavior with regards to the operations' error or out of date states. Uses PostProcessExecutionBehavior_OmitInvalidAndEmptyOperations by default.

Accessed From

NCProgramPostProcessOptions.create

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.classType Method

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.NCProgramPostProcessOptions.classType()
This is a static method.

#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

returnValue = adsk::cam::NCProgramPostProcessOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.create Method

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Creates a new NCProgramPostProcessOptions object to be used as an input argument by the postProcess() method.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.NCProgramPostProcessOptions.create()
This is a static method.

#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

returnValue = adsk::cam::NCProgramPostProcessOptions::create();

Return Value

Type | Description
NCProgramPostProcessOptions | Returns the newly created NCProgramPostProcessOptions object or null if the creation failed.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.fusionHubExecutionBehavior Property

Parent Object: NCProgramPostProcessOptions

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Gets and sets the post process behavior for exporting to Fusion Hub. Uses fusionHubExecutionBehavior_ExportWithRelationship by default.

Syntax

  • Python
  • C++
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.

# Get the value of the property.
propertyValue = nCProgramPostProcessOptions_var.fusionHubExecutionBehavior

# Set the value of the property.
nCProgramPostProcessOptions_var.fusionHubExecutionBehavior = propertyValue
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.
#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

// Get the value of the property.
FusionHubExecutionBehaviors propertyValue = nCProgramPostProcessOptions_var->fusionHubExecutionBehavior();

// Set the value of the property, where value_var is a FusionHubExecutionBehaviors.
bool returnValue = nCProgramPostProcessOptions_var->fusionHubExecutionBehavior(value_var);

Property Value

This is a read/write property whose value is a FusionHubExecutionBehaviors.

Version

Introduced in version July 2024


NCProgramPostProcessOptions.isFailOnToolNumberDuplication Property

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Toggles whether the post processing should abort if two tools with the same tool number have been detected. True by default. If true, an exception will be thrown if at least two tools map to the same tool number. If false, the post processor will not perform a tool change if the tool number is the same, which may mean that the wrong tool is used for an operation.

Syntax

  • Python
  • C++
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.

# Get the value of the property.
propertyValue = nCProgramPostProcessOptions_var.isFailOnToolNumberDuplication

# Set the value of the property.
nCProgramPostProcessOptions_var.isFailOnToolNumberDuplication = propertyValue
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.
#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

// Get the value of the property.
boolean propertyValue = nCProgramPostProcessOptions_var->isFailOnToolNumberDuplication();

// Set the value of the property, where value_var is a boolean.
bool returnValue = nCProgramPostProcessOptions_var->isFailOnToolNumberDuplication(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.isValid Property

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.

# Get the value of the property.
propertyValue = nCProgramPostProcessOptions_var.isValid
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.
#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

// Get the value of the property.
boolean propertyValue = nCProgramPostProcessOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.objectType Property

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.

# Get the value of the property.
propertyValue = nCProgramPostProcessOptions_var.objectType
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.
#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

// Get the value of the property.
string propertyValue = nCProgramPostProcessOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


NCProgramPostProcessOptions.postProcessExecutionBehavior Property

Parent Object: NCProgramPostProcessOptions
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCProgramPostProcessOptions.h>

Description

Gets and sets the post process behavior with regards to the operations' error or out of date states. Uses PostProcessExecutionBehavior_OmitInvalidAndEmptyOperations by default.

Syntax

  • Python
  • C++
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.

# Get the value of the property.
propertyValue = nCProgramPostProcessOptions_var.postProcessExecutionBehavior

# Set the value of the property.
nCProgramPostProcessOptions_var.postProcessExecutionBehavior = propertyValue
"nCProgramPostProcessOptions_var" is a variable referencing a NCProgramPostProcessOptions object.
#include <Cam/NCProgram/NCProgramPostProcessOptions.h>

// Get the value of the property.
PostProcessExecutionBehaviors propertyValue = nCProgramPostProcessOptions_var->postProcessExecutionBehavior();

// Set the value of the property, where value_var is a PostProcessExecutionBehaviors.
bool returnValue = nCProgramPostProcessOptions_var->postProcessExecutionBehavior(value_var);

Property Value

This is a read/write property whose value is a PostProcessExecutionBehaviors.

Version

Introduced in version May 2023


NCPrograms Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Container for all NC programs. Referenced from CAM product to access NC programs in a document, similar to what Setups is for all setup objects.

Methods

Name | Description
add | Creates a new NC program.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 new NCProgramInput object. Use properties and methods on this object to define the NC program you want to create and then use the Add method, passing in the NCProgramInput object.
item | Function that returns the specified NC program using an index into the collection.
itemByName | Returns the NC program with the specified name.
itemByOperationId | Returns the NC program 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.ncPrograms

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCPrograms.add Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Creates a new NC program.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.
returnValue = nCPrograms_var.add(input)
"nCPrograms_var" is a variable referencing a NCPrograms object.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = nCPrograms_var->add(input);

Return Value

Type | Description
NCProgram | Returns the created NC program.

Parameters

Name | Type | Description
input | NCProgramInput | NCProgramInput which will be used to create the NC program.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCPrograms.classType Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.NCPrograms.classType()
This is a static method.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = adsk::cam::NCPrograms::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


NCPrograms.count Property

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.

# Get the value of the property.
propertyValue = nCPrograms_var.count
"nCPrograms_var" is a variable referencing a NCPrograms object.
#include <Cam/NCProgram/NCPrograms.h>

// Get the value of the property.
uinteger propertyValue = nCPrograms_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


NCPrograms.createInput Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Create a new NCProgramInput object. Use properties and methods on this object to define the NC program you want to create and then use the Add method, passing in the NCProgramInput object.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.
returnValue = nCPrograms_var.createInput()
"nCPrograms_var" is a variable referencing a NCPrograms object.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = nCPrograms_var->createInput();

Return Value

Type | Description
NCProgramInput | Returns a new NCProgramInput object.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


NCPrograms.isValid Property

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.

# Get the value of the property.
propertyValue = nCPrograms_var.isValid
"nCPrograms_var" is a variable referencing a NCPrograms object.
#include <Cam/NCProgram/NCPrograms.h>

// Get the value of the property.
boolean propertyValue = nCPrograms_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


NCPrograms.item Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Function that returns the specified NC program using an index into the collection.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.
returnValue = nCPrograms_var.item(index)
"nCPrograms_var" is a variable referencing a NCPrograms object.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = nCPrograms_var->item(index);

Return Value

Type | Description
NCProgram | 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 2023


NCPrograms.itemByName Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Returns the NC program with the specified name.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.
returnValue = nCPrograms_var.itemByName(name)
"nCPrograms_var" is a variable referencing a NCPrograms object.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = nCPrograms_var->itemByName(name);

Return Value

Type | Description
NCProgram | Returns the specified NC program or null in the case where there is no NC program with the specified name. If there are multiple NC programs with the same name, the first item in the tree will be returned.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the operation.

Version

Introduced in version April 2023


NCPrograms.itemByOperationId Method

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

Returns the NC program with the specified operation id.

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.
returnValue = nCPrograms_var.itemByOperationId(id)
"nCPrograms_var" is a variable referencing a NCPrograms object.

#include <Cam/NCProgram/NCPrograms.h>

returnValue = nCPrograms_var->itemByOperationId(id);

Return Value

Type | Description
NCProgram | Returns the specified NC program or null in the case where there is no NC program with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the NC program.

Version

Introduced in version April 2023


NCPrograms.objectType Property

Parent Object: NCPrograms
Defined in namespace "adsk::cam" and the header file is <Cam/NCProgram/NCPrograms.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"nCPrograms_var" is a variable referencing a NCPrograms object.

# Get the value of the property.
propertyValue = nCPrograms_var.objectType
"nCPrograms_var" is a variable referencing a NCPrograms object.
#include <Cam/NCProgram/NCPrograms.h>

// Get the value of the property.
string propertyValue = nCPrograms_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


NetworkPreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

The NetworkPreferences object provides access to network related preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

Gets and sets the network proxy setting.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

Gets and sets the proxy host.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/NetworkPreferences.h>

Description

Gets and sets the proxy host.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. The curves are merged with the end point of the current curve merging with the start point of the other curve. The curves are forced to join even if they are not physically touching so you will typically want to make sure the end and start points of the curves are where you expect them to be.
reverse | Reverses the orientation of the curve so the start and end points are swapped. The shape of the curve remains unchanged. This is especially useful to prepare the curves to use with the merge method.
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 | Returns if the curve is closed
isPeriodic | Returns if the curve is periodic.
isRational | Returns 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arc2D.asNurbsCurve, Circle2D.asNurbsCurve, Ellipse2D.asNurbsCurve, EllipticalArc2D.asNurbsCurve, Line2D.asNurbsCurve, NurbsCurve2D.copy, NurbsCurve2D.createNonRational, NurbsCurve2D.createRational, NurbsCurve2D.extract, NurbsCurve2D.merge, Polyline2D.asNurbsCurve

Version

Introduced in version August 2014


NurbsCurve2D.classType Method

Parent Object: NurbsCurve2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Gets the number of control points that define the curve

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns an array of Point2D objects that define the control points of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Creates and returns an independent copy of this NurbsCurve2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Creates a transient 2D NURBS non-rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Creates a transient 2D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns the degree of the curve

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Defines a new NURBS curve that is the subset of this NURBS curve in the parameter range of [startParam, endParam]

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Gets the data that defines a transient 2D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns if the curve is closed

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns if the curve is periodic.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns if the curve is rational or non-rational type

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns the knot count of the curve

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Returns an array of numbers that define the Knots of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Define a new NURBS curve that is the result of combining this NURBS curve with another NURBS curve. The curves are merged with the end point of the current curve merging with the start point of the other curve. The curves are forced to join even if they are not physically touching so you will typically want to make sure the end and start points of the curves are where you expect them to be.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.reverse Method

Parent Object: NurbsCurve2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Reverses the orientation of the curve so the start and end points are swapped. The shape of the curve remains unchanged. This is especially useful to prepare the curves to use with the merge method.

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.reverse()
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->reverse();

Version

Introduced in version October 2022


NurbsCurve2D.set Method

Parent Object: NurbsCurve2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Sets the data that defines a transient 2D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Transforms this curve in 2D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
reverse | Reverses the orientation of the curve so the start and end points are swapped. The shape of the curve remains unchanged. This is especially useful to prepare the curves to use with the merge method.
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 | Gets if the curve is closed.
isPeriodic | Gets if the curve is periodic.
isRational | Gets 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arc3D.asNurbsCurve, Circle3D.asNurbsCurve, Ellipse3D.asNurbsCurve, EllipticalArc3D.asNurbsCurve, Line3D.asNurbsCurve, NurbsCurve3D.copy, NurbsCurve3D.createNonRational, NurbsCurve3D.createRational, NurbsCurve3D.extract, NurbsCurve3D.merge, Polyline3D.asNurbsCurve, SketchConicCurve.geometry, SketchConicCurve.worldGeometry, SketchControlPointSpline.geometry, SketchControlPointSpline.worldGeometry, SketchFittedSpline.geometry, SketchFittedSpline.worldGeometry, SketchFixedSpline.geometry, SketchFixedSpline.worldGeometry

Version

Introduced in version August 2014


NurbsCurve3D.classType Method

Parent Object: NurbsCurve3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Gets the number of control points that define the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns an array of Point3D objects that define the control points of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Creates and returns an independent copy of this NurbsCurve3D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Creates a transient 3D NURBS non-rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Creates a transient 3D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns the type of geometry this curve represents.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns the degree of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Defines a new NURBS curve that is the subset of this NURBS curve in the parameter range of [startParam, endParam]

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Gets the data that defines a transient 3D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Gets if the curve is closed.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Gets if the curve is periodic.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Gets if the curve is rational or non-rational type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns the knot count of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Returns an array of numbers that define the knot vector of the curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Define a new NURBS curve that is the result of combining this NURBS curve with another NURBS curve.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.reverse Method

Parent Object: NurbsCurve3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Reverses the orientation of the curve so the start and end points are swapped. The shape of the curve remains unchanged. This is especially useful to prepare the curves to use with the merge method.

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.reverse()
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->reverse();

Version

Introduced in version October 2022


NurbsCurve3D.set Method

Parent Object: NurbsCurve3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Sets the data that defines a transient 3D NURBS rational b-spline object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve3D.h>

Description

Transforms this curve in 3D space.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the number of control points in the U direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the number of control points in the V direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets an array of control points from the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Creates and returns an independent copy of this NurbsSurface object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Creates a transient NURBS surface object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the degree in the U direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the degree in the V direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the data that defines the NURBS surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the knot count in the U direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets thekKnot count in the V direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Get the knot vector from the U direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Get the knot vector from the V direction

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the properties (NurbsSurfaceProperties) of the surface in the U direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Gets the properties (NurbsSurfaceProperties) of the surface in the V direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Sets the data that defines the NURBS surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsSurface.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Generic collection used to handle lists of any object type.

Methods

Name | Description
add | Adds an object to the end of the collection. Duplicates can be added to the collection.
asArray | Returns the content of the ObjectCollection as an 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().
clear | Clears the entire contents of the collection.
contains | Returns whether the specified object exists within the collection.
create | Creates a new ObjectCollection object.
createWithArray | Creates a new ObjectCollection that is initialized with the content of the provided array.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Appearance.usedBy, Attribute.otherParents, BaseComponent.findBRepUsingPoint, BaseComponent.findBRepUsingRay, BoundaryFillFeature.tools, BoundaryFillFeatureInput.tools, BRepCell.sourceTools, BRepEdge.tangentiallyConnectedEdges, CAM.allOperations, CAMAdditiveContainer.allOperations, CAMFolder.allOperations, CAMFolder.createFromTemplate, CAMPattern.allOperations, CAMPattern.createFromTemplate, ChamferFeature.edges, ChamferFeatureInput.edges, ChordLengthFilletEdgeSet.edges, ChordLengthFilletEdgeSetInput.entities, CircularPatternFeature.inputEntities, CircularPatternFeature.resultFeatures, CircularPatternFeatureInput.inputEntities, CombineFeature.toolBodies, CombineFeatureInput.toolBodies, Component.findBRepUsingPoint, Component.findBRepUsingRay, ConstantRadiusFilletEdgeSet.edges, ConstantRadiusFilletEdgeSetInput.entities, CopyPasteBody.sourceBody, CutPasteBody.sourceBody, DistanceAndAngleChamferEdgeSet.edges, DXF2DImportOptions.results, EqualDistanceChamferEdgeSet.edges, ExtendFeature.edges, ExtendFeatureInput.edges, FilletEdgeSetInput.entities, FlatPatternComponent.findBRepUsingPoint, FlatPatternComponent.findBRepUsingRay, 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, ObjectCollection.createWithArray, OffsetFeature.entities, OffsetFeatureInput.entities, PatchFeature.interiorRailsAndPoints, PatchFeatureInput.interiorRailsAndPoints, 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.createFromTemplate, Setup.fixtures, Setup.models, Setup.stockSolids, 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, SketchControlPointSpline.breakCurve, SketchControlPointSpline.extend, SketchControlPointSpline.intersections, SketchControlPointSpline.split, SketchControlPointSpline.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, SketchPointsBossPositionDefinition.sketchPoints, 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, TwoDistancesChamferEdgeSet.edges, UnstitchFeature.inputFaces, VariableRadiusFilletEdgeSet.edges, VariableRadiusFilletEdgeSetInput.entities

Samples

Name | Description
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.

Version

Introduced in version August 2014


ObjectCollection.add Method

Parent Object: ObjectCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Adds an object to the end of the collection. Duplicates can be added to the collection.

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.asArray Method

Parent Object: ObjectCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Returns the content of the ObjectCollection as an array.

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.asArray()
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->asArray();

Return Value

Type | Description
Base[] | Returns an array of the Fusion objects in the ObjectCollection.

Version

Introduced in version May 2023


ObjectCollection.classType Method

Parent Object: ObjectCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Clears the entire contents of the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Returns whether the specified object exists within the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Returns the number of occurrences in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Creates a new ObjectCollection object.

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.createWithArray Method

Parent Object: ObjectCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Creates a new ObjectCollection that is initialized with the content of the provided array.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ObjectCollection.createWithArray(array)
This is a static method.

#include <Core/Application/ObjectCollection.h>

returnValue = adsk::core::ObjectCollection::createWithArray(array);

Return Value

Type | Description
ObjectCollection | Returns the newly created ObjectCollection or null in the case of failure.

Parameters

Name Type Description
array Base[] An array of Fusion objects that are used to populate the ObjectCollection. For this method to succeed, getting the input type correct is critical. The term "array" is used generically in the API documentation and describes different things depending on the language being used.

When using C++, std::vector is used to input and output a list of items.However, this particular method requires that the content of the vector be of type core.base. If you have a vector of other types, you need to convert it to core.base. The sample below illustrates converting a vector of Occurrence objects into a vector of core.Base objects.

std::vector<Ptr<adsk::fusion::Occurrence>> occArray = rootComp->occurrences()->asArray();

std::vector<Ptr<adsk::core::Base>> occs{ occArray.begin(), occArray.end() };

Ptr<ObjectCollection> objColl = ObjectCollection::createWithArray(occs);

When using Python, a Python List or Tuple is used as input. Something not obvious is that when an array is returned from a method or property it's not returned as a standard Python List but is a special API-specific class called "vector". Typically, you don't notice this isn't a List because it supports Python iteration like a List does. Because the createWithArray method requires a standard Python list as input, you need to convert it to a standard list before using it in the createWithArray method. For example, the Occurrences.asArray method returns an "array" of the occurrences, which really returns a vector object of the occurrences. The code below converts the vector into a standard list so it can be used to create an ObjectCollection.

occList = list(root.Occurrences.asArray())

objColl = adsk.core.ObjectCollection.craeteWithArray(occList)

Samples

Name Description
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version May 2023


ObjectCollection.find Method

Parent Object: ObjectCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Finds the specified component in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Function that returns the specified object using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Function that removes an item from the list. Will fail if the list is read only.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ObjectCollection.h>

Description

Function that removes an item from the collection.

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


OBJExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Defines that an OBJ export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 OBJ 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
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 centimeter. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
printUtility | Specifies which print utility to use when opening the OBJ 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 known 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 OBJ file will be sent to the print utility specified by the printUtility property. If this is false a filename must be defined. The default is false.
surfaceDeviation | Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.
unitType | Gets and sets the units to use for the created OBJ file. The default is Centimeters.

Accessed From

ExportManager.createOBJExportOptions

Version

Introduced in version October 2022


OBJExportOptions.aspectRatio Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.aspectRatio

# Set the value of the property.
oBJExportOptions_var.aspectRatio = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
double propertyValue = oBJExportOptions_var->aspectRatio();

// Set the value of the property, where value_var is a double.
bool returnValue = oBJExportOptions_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version October 2022


OBJExportOptions.availablePrintUtilities Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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 OBJ file in.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.availablePrintUtilities
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
std::vector<string> propertyValue = oBJExportOptions_var->availablePrintUtilities();

Property Value

This is a read only property whose value is an array of type string.

Version

Introduced in version October 2022


OBJExportOptions.classType Method

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OBJExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/OBJExportOptions.h>

returnValue = adsk::fusion::OBJExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


OBJExportOptions.filename Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.filename

# Set the value of the property.
oBJExportOptions_var.filename = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
string propertyValue = oBJExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = oBJExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


OBJExportOptions.geometry Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.geometry

# Set the value of the property.
oBJExportOptions_var.geometry = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = oBJExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = oBJExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version October 2022


OBJExportOptions.isOneFilePerBody Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.isOneFilePerBody

# Set the value of the property.
oBJExportOptions_var.isOneFilePerBody = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
boolean propertyValue = oBJExportOptions_var->isOneFilePerBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = oBJExportOptions_var->isOneFilePerBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


OBJExportOptions.isValid Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.isValid
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
boolean propertyValue = oBJExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


OBJExportOptions.maximumEdgeLength Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Gets and sets the maximum length of any mesh edge. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.maximumEdgeLength

# Set the value of the property.
oBJExportOptions_var.maximumEdgeLength = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
double propertyValue = oBJExportOptions_var->maximumEdgeLength();

// Set the value of the property, where value_var is a double.
bool returnValue = oBJExportOptions_var->maximumEdgeLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version October 2022


OBJExportOptions.meshRefinement Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.meshRefinement

# Set the value of the property.
oBJExportOptions_var.meshRefinement = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
MeshRefinementSettings propertyValue = oBJExportOptions_var->meshRefinement();

// Set the value of the property, where value_var is a MeshRefinementSettings.
bool returnValue = oBJExportOptions_var->meshRefinement(value_var);

Property Value

This is a read/write property whose value is a MeshRefinementSettings.

Version

Introduced in version October 2022


OBJExportOptions.normalDeviation Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.normalDeviation

# Set the value of the property.
oBJExportOptions_var.normalDeviation = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
double propertyValue = oBJExportOptions_var->normalDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = oBJExportOptions_var->normalDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version October 2022


OBJExportOptions.objectType Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.objectType
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
string propertyValue = oBJExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


OBJExportOptions.printUtility Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Specifies which print utility to use when opening the OBJ 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 known 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.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.printUtility

# Set the value of the property.
oBJExportOptions_var.printUtility = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
string propertyValue = oBJExportOptions_var->printUtility();

// Set the value of the property, where value_var is a string.
bool returnValue = oBJExportOptions_var->printUtility(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


OBJExportOptions.sendToPrintUtility Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Gets and sets whether the created OBJ file will be sent to the print utility specified by the printUtility property. If this is false a filename must be defined. The default is false.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.sendToPrintUtility

# Set the value of the property.
oBJExportOptions_var.sendToPrintUtility = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
boolean propertyValue = oBJExportOptions_var->sendToPrintUtility();

// Set the value of the property, where value_var is a boolean.
bool returnValue = oBJExportOptions_var->sendToPrintUtility(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


OBJExportOptions.surfaceDeviation Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.surfaceDeviation

# Set the value of the property.
oBJExportOptions_var.surfaceDeviation = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
double propertyValue = oBJExportOptions_var->surfaceDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = oBJExportOptions_var->surfaceDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version October 2022


OBJExportOptions.unitType Property

Parent Object: OBJExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/OBJExportOptions.h>

Description

Gets and sets the units to use for the created OBJ file. The default is Centimeters.

Syntax

  • Python
  • C++
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.

# Get the value of the property.
propertyValue = oBJExportOptions_var.unitType

# Set the value of the property.
oBJExportOptions_var.unitType = propertyValue
"oBJExportOptions_var" is a variable referencing an OBJExportOptions object.
#include <Fusion/Fusion/OBJExportOptions.h>

// Get the value of the property.
DistanceUnits propertyValue = oBJExportOptions_var->unitType();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = oBJExportOptions_var->unitType(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version October 2022


Occurrence Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Represents an occurrence of a component at any level within a subassembly.

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.
boundingBox2 | Returns the bounding box of the specified entity types within the occurrence.
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.
replace | Replaces this occurrence or all occurrences that reference the same external component with a new component. This method will fail if the occurrence is not referencing an external component.
switchConfiguration | Changes which configuration is used for this occurrence. Use the isConfiguration property to determine if this occurrence references a configuration.

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.
configurationRow | If this occurrence is a configuration, this property returns the row that defines it. If it isn't a configuration, null is returned.
configuredDataFile | Returns the DataFile object that represents the specific version of the design used by this occurrence. From the DataFile you can access other version of the file, most importantly, you can access the latest version and get the top configuration table from it.
dataComponent | Preview Gets the DataComponent for the target component in the source component's document. This only applies for Occurrence's with an assembly context whose source component is a top level opened design.
documentReference When the component this occurrence references is an external reference (the isReferencedComponent property returns true), this will return the object that represents that reference. Through the DocumentReference object you can modify the version and get other information associated with the reference.

This property will fail if the occurrence is not referencing an external component.
entityToken Returns a token for the Occurrence object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same occurrence.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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".
initialTransform | Gets and sets the initial position of the occurrence. Setting the initial transform is not valid for all occurrences. For instance, this operation could fail if the occurrence is created by a pattern among other cases. To determine if setting the initial transform is possible, use the isValidForEditInitialPosition property. If this property returns false, attempting to set the initial transform will result in failure.
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.
isConfiguration | Returns if this occurrence represents a configuration or not. If true, you can access the full configuration from the parent component.
isGrounded | Gets and sets whether this occurrence is pinned or not.
isGroundToParent | Gets and sets whether this occurrence is grounded to parent 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 un-isolate an occurrence that is currently isolated. Setting this property to false for an occurrence that is current isolated will un-isolate 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.
isVaildForEditInitialPosition | Gets whether this occurrence is valid for edit initial position.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
orientedMinimumBoundingBox | Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the occurrence. All other geometry types are ignored.
physicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence. Property values will be calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.
preciseBoundingBox | Returns a bounding box that tightly fits around all B-Rep bodies in the occurrence. All other geometry types are ignored.
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 | **RETIRED** Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context.
transform2 | Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context. This property replaces the transform property, which has been retired because there are cases where it returns the incorrect results.
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 occurrence. To set the opacity use the opacity property of the Component object.

Accessed From

ArrangeComponent.occurrence, ArrangeFeature.assemblyContext, ArrangeOccurrenceResult.occurrence, AsBuiltJoint.assemblyContext, AsBuiltJoint.occurrenceOne, AsBuiltJoint.occurrenceTwo, AsBuiltJointInput.occurrenceOne, AsBuiltJointInput.occurrenceTwo, AssemblyConstraint.assemblyContext, BaseFeature.assemblyContext, BossFeature.assemblyContext, BossFeatureInput.creationOccurrence, BoundaryFillFeature.assemblyContext, BoundaryFillFeatureInput.creationOccurrence, BoxFeature.assemblyContext, BRepBody.assemblyContext, BRepCoEdge.assemblyContext, BRepEdge.assemblyContext, BRepFace.assemblyContext, BRepLoop.assemblyContext, BRepLump.assemblyContext, BRepShell.assemblyContext, BRepVertex.assemblyContext, BRepWire.assemblyContext, CAM.designRootOccurrence, Canvas.assemblyContext, ChamferFeature.assemblyContext, CircularPatternConstraint.assemblyContext, CircularPatternFeature.assemblyContext, CoilFeature.assemblyContext, CoincidentConstraint.assemblyContext, CoincidentToSurfaceConstraint.assemblyContext, CollinearConstraint.assemblyContext, CombineFeature.assemblyContext, ConcentricConstraint.assemblyContext, ConfigurationInsertColumn.occurrence, ConstructionAxis.assemblyContext, ConstructionAxisInput.creationOccurrence, ConstructionPlane.assemblyContext, ConstructionPlaneInput.creationOccurrence, ConstructionPoint.assemblyContext, ConstructionPointInput.creationOccurrence, CopyPasteBody.assemblyContext, CustomFeature.assemblyContext, CutPasteBody.assemblyContext, CylinderFeature.assemblyContext, Decal.assemblyContext, DeleteFaceFeature.assemblyContext, Design.activeOccurrence, DraftFeature.assemblyContext, EqualConstraint.assemblyContext, ExtendFeature.assemblyContext, ExtrudeFeature.assemblyContext, ExtrudeFeatureInput.creationOccurrence, FaceGroup.assemblyContext, Feature.assemblyContext, FilletFeature.assemblyContext, FlangeFeature.assemblyContext, FlatPattern.assemblyContext, FlatPatternProduct.activeOccurrence, FormFeature.assemblyContext, GeometricConstraint.assemblyContext, HoleFeature.assemblyContext, HoleFeatureInput.creationOccurrence, HorizontalConstraint.assemblyContext, HorizontalPointsConstraint.assemblyContext, Joint.assemblyContext, Joint.occurrenceOne, Joint.occurrenceTwo, JointOrigin.assemblyContext, LineOnPlanarSurfaceConstraint.assemblyContext, LineParallelToPlanarSurfaceConstraint.assemblyContext, LoftFeature.assemblyContext, LoftFeatureInput.creationOccurrence, ManufacturingModel.occurrence, MergeFacesFeatureInput.creationOccurrence, MeshBody.assemblyContext, MeshCombineFaceGroupsFeature.assemblyContext, MeshCombineFeature.assemblyContext, MeshConvertFeature.assemblyContext, MeshFeature.assemblyContext, MeshGenerateFaceGroupsFeature.assemblyContext, MeshReduceFeature.assemblyContext, MeshRemeshFeature.assemblyContext, MeshRepairFeature.assemblyContext, MeshReverseNormalFeature.assemblyContext, MeshSeparateFeature.assemblyContext, MeshShellFeature.assemblyContext, MeshSmoothFeature.assemblyContext, MidPointConstraint.assemblyContext, MirrorFeature.assemblyContext, MoveFeature.assemblyContext, Occurrence.assemblyContext, Occurrence.createForAssemblyContext, Occurrence.moveToComponent, Occurrence.nativeObject, OccurrenceList.item, OccurrenceList.itemByName, Occurrences.addByInsert, Occurrences.addExistingComponent, Occurrences.addFromConfiguration, Occurrences.addNewComponent, Occurrences.addNewComponentCopy, Occurrences.asArray, 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, PerpendicularToSurfaceConstraint.assemblyContext, PipeFeature.assemblyContext, PipeFeatureInput.creationOccurrence, PolygonConstraint.assemblyContext, Profile.assemblyContext, ProfileCurve.assemblyContext, ProfileLoop.assemblyContext, RectangularPatternConstraint.assemblyContext, RectangularPatternFeature.assemblyContext, RefoldFeature.assemblyContext, RemoveFeature.assemblyContext, ReplaceFaceFeature.assemblyContext, ReverseNormalFeature.assemblyContext, RevolveFeature.assemblyContext, RevolveFeatureInput.creationOccurrence, RibFeature.assemblyContext, RigidGroup.assemblyContext, RipFeature.assemblyContext, RuledSurfaceFeature.assemblyContext, RuledSurfaceFeatureInput.creationOccurrence, RuleFilletFeature.assemblyContext, ScaleFeature.assemblyContext, ShellFeature.assemblyContext, ShellFeatureInput.creationOccurrence, SilhouetteSplitFeature.assemblyContext, Sketch.assemblyContext, SketchAngularDimension.assemblyContext, SketchArc.assemblyContext, SketchCircle.assemblyContext, SketchConcentricCircleDimension.assemblyContext, SketchConicCurve.assemblyContext, SketchControlPointSpline.assemblyContext, SketchCurve.assemblyContext, SketchDiameterDimension.assemblyContext, SketchDimension.assemblyContext, SketchDistanceBetweenLineAndPlanarSurfaceDimension.assemblyContext, SketchDistanceBetweenPointAndSurfaceDimension.assemblyContext, SketchEllipse.assemblyContext, SketchEllipseMajorRadiusDimension.assemblyContext, SketchEllipseMinorRadiusDimension.assemblyContext, SketchEllipticalArc.assemblyContext, SketchEntity.assemblyContext, SketchFittedSpline.assemblyContext, SketchFixedSpline.assemblyContext, SketchLine.assemblyContext, SketchLinearDiameterDimension.assemblyContext, SketchLinearDimension.assemblyContext, SketchOffsetCurvesDimension.assemblyContext, SketchOffsetDimension.assemblyContext, SketchPoint.assemblyContext, SketchRadialDimension.assemblyContext, SketchTangentDistanceDimension.assemblyContext, SketchText.assemblyContext, SmoothConstraint.assemblyContext, SphereFeature.assemblyContext, SplitBodyFeature.assemblyContext, SplitFaceFeature.assemblyContext, StitchFeature.assemblyContext, SurfaceDeleteFaceFeature.assemblyContext, SweepFeature.assemblyContext, SweepFeatureInput.creationOccurrence, SymmetryConstraint.assemblyContext, TangentConstraint.assemblyContext, TangentRelationship.assemblyContext, TangentRelationship.occurrenceOne, TangentRelationship.occurrenceTwo, TessellateFeature.assemblyContext, ThickenFeature.assemblyContext, ThickenFeatureInput.creationOccurrence, ThreadFeature.assemblyContext, TorusFeature.assemblyContext, TransformRefGraphNodeProperty.value, TrimFeature.assemblyContext, UnfoldFeature.assemblyContext, UnstitchFeature.assemblyContext, UntrimFeature.assemblyContext, VerticalConstraint.assemblyContext, VerticalPointsConstraint.assemblyContext, VolumetricCustomFeature.assemblyContext, VolumetricModelToMeshFeature.assemblyContext, WebFeature.assemblyContext, WorkingModel.activeOccurrence

Samples

Name | Description
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Occurrence.activate Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the bounding box of this occurrence.

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.boundingBox2 Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the bounding box of the specified entity types within the occurrence.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.boundingBox2(entityTypes)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->boundingBox2(entityTypes);

Return Value

Type | Description
BoundingBox3D | Returns a BoundingBox3D object if the calculation was successful and null in the case where there is no valid geometry and the bounding box is empty.

Parameters

Name | Type | Description
entityTypes | BoundingBoxEntityTypes | Bitwise value that specifies the types of entities to include in the calculation of the bounding box.

Version

Introduced in version January 2024


Occurrence.breakLink Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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 API Sample | Iterates over all top-level occurrences and if it's a referenced component, it will break the link.

Version

Introduced in version September 2017


Occurrence.bRepBodies Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns a read only list of child occurrences where only the occurrences in this occurrence's AssemblyContext are returned .

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

The component this occurrence references.

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
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


Occurrence.configurationRow Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

If this occurrence is a configuration, this property returns the row that defines it. If it isn't a configuration, null is returned.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.configurationRow
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<ConfigurationRow> propertyValue = occurrence_var->configurationRow();

Property Value

This is a read only property whose value is a ConfigurationRow.

Version

Introduced in version March 2024


Occurrence.configuredDataFile Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the DataFile object that represents the specific version of the design used by this occurrence. From the DataFile you can access other version of the file, most importantly, you can access the latest version and get the top configuration table from it.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.configuredDataFile
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = occurrence_var->configuredDataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version March 2024


Occurrence.createForAssemblyContext Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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.dataComponent Property

Parent Object: Occurrence

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets the DataComponent for the target component in the source component's document. This only applies for Occurrence's with an assembly context whose source component is a top level opened design.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.dataComponent
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = occurrence_var->dataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Samples

Name | Description
Get part number using GraphQL | Fetches part number of root component and from occurrences via GQL query.

Version

Introduced in version July 2025


Occurrence.deleteMe Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Deletes the occurrence from the design. If this is the last occurrence referencing a specific Component, the component is also deleted.

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


Occurrence.documentReference Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

When the component this occurrence references is an external reference (the isReferencedComponent property returns true), this will return the object that represents that reference. Through the DocumentReference object you can modify the version and get other information associated with the reference.

This property will fail if the occurrence is not referencing an external component.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.documentReference
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<DocumentReference> propertyValue = occurrence_var->documentReference();

Property Value

This is a read only property whose value is a DocumentReference.

Version

Introduced in version November 2022


Occurrence.entityToken Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns a token for the Occurrence object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same occurrence.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.entityToken
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
string propertyValue = occurrence_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Occurrence.fullPathName Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence.

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);

Return Value

Type | Description
PhysicalProperties | Returns a PhysicalProperties object that can be used to get the various physical property related values.

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 CalculationAccuracy.LowCalculationAccuracy.

Samples

Name | Description
Get Physical Properties API Sample | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


Occurrence.initialTransform Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets and sets the initial position of the occurrence. Setting the initial transform is not valid for all occurrences. For instance, this operation could fail if the occurrence is created by a pattern among other cases. To determine if setting the initial transform is possible, use the isValidForEditInitialPosition property. If this property returns false, attempting to set the initial transform will result in failure.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.initialTransform

# Set the value of the property.
occurrence_var.initialTransform = 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->initialTransform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = occurrence_var->initialTransform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version November 2024


Occurrence.isActive Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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.isConfiguration Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns if this occurrence represents a configuration or not. If true, you can access the full configuration from the parent component.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isConfiguration
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isConfiguration();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


Occurrence.isGrounded Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets and sets whether this occurrence is pinned or not.

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.isGroundToParent Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets and sets whether this occurrence is grounded to parent or not.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isGroundToParent

# Set the value of the property.
occurrence_var.isGroundToParent = 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->isGroundToParent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = occurrence_var->isGroundToParent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Component Sample | Component related functions

Version

Introduced in version May 2024


Occurrence.isIsolated Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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 un-isolate an occurrence that is currently isolated. Setting this property to false for an occurrence that is current isolated will un-isolate it so that no occurrence will be isolated.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets if this occurrence is referencing an external component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets and sets whether this occurrence is selectable or not.

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.isVaildForEditInitialPosition Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets whether this occurrence is valid for edit initial position.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isVaildForEditInitialPosition
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isVaildForEditInitialPosition();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2024


Occurrence.isValid Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets whether the occurrence is visible. This property is affected by the assembly context.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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').

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.orientedMinimumBoundingBox Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns an oriented bounding box that is best oriented to tightly fit all B-Rep bodies in the occurrence. All other geometry types are ignored.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.orientedMinimumBoundingBox
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<OrientedBoundingBox3D> propertyValue = occurrence_var->orientedMinimumBoundingBox();

Property Value

This is a read only property whose value is an OrientedBoundingBox3D.

Version

Introduced in version January 2024


Occurrence.physicalProperties Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence. Property values will be calculated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


Occurrence.preciseBoundingBox Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns a bounding box that tightly fits around all B-Rep bodies in the occurrence. All other geometry types are ignored.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.preciseBoundingBox
"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->preciseBoundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version January 2024


Occurrence.replace Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Replaces this occurrence or all occurrences that reference the same external component with a new component.

This method will fail if the occurrence is not referencing an external component.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.replace(newFile, replaceAll)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->replace(newFile, replaceAll);

Return Value

Type | Description
boolean | Returns true if the replacement was successful.

Parameters

Name | Type | Description
newFile | DataFile | Specifies the DataFile you want to use as the replacement. The DataFile specified must exist in the same hub as the parent assembly.
replaceAll | boolean | Indicates if you want to replace only this single occurrence or all occurrences that reference the same external design.

Version

Introduced in version October 2023


Occurrence.rigidGroups Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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.

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.switchConfiguration Method

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Changes which configuration is used for this occurrence. Use the isConfiguration property to determine if this occurrence references a configuration.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.switchConfiguration(newRow)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->switchConfiguration(newRow);

Return Value

Type | Description
boolean | Returns true if the switch was successful.

Parameters

Name | Type | Description
newRow | ConfigurationRow | The row to switch to. This row must be from the same ConfigurationTopTable as the current row. You can access the table from the parent design.

Version

Introduced in version January 2024


Occurrence.timelineObject Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Returns the timeline object associated with the creation of this occurrence.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context.

Remarks

This property has been retired and replaced by the transform2 property. This method remains and has the same behavior as before. It returns incorrect results in some cases but some existing programs may be relying on these bad results so this property remains unchanged. It will be best to use the transform2 property.

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
Retired in version July 2025


Occurrence.transform2 Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

Description

Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context. This property replaces the transform property, which has been retired because there are cases where it returns the incorrect results.

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.transform2

# Set the value of the property.
occurrence_var.transform2 = 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->transform2();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = occurrence_var->transform2(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version January 2022


Occurrence.visibleOpacity Property

Parent Object: Occurrence
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrence.h>

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 occurrence. To set the opacity use the opacity property of the Component object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Provides a list of occurrences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.allOccurrences, BaseComponent.allOccurrencesByComponent, BaseComponent.occurrencesByComponent, Component.allOccurrences, Component.allOccurrencesByComponent, Component.occurrencesByComponent, FlatPatternComponent.allOccurrences, FlatPatternComponent.allOccurrencesByComponent, FlatPatternComponent.occurrencesByComponent, Occurrence.childOccurrences, Occurrences.asList, RigidGroup.occurrences

Samples

Name | Description
Assembly traversal using recursion API Sample | 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.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2014


OccurrenceList.classType Method

Parent Object: OccurrenceList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Returns the number of occurrences in the collection.

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 API Sample | 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.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Returns the specified occurrence using an index into the collection.

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 API Sample | 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.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

Returns the specified occurrence using the name of the occurrence.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/OccurrenceList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Provides access to occurrences within a component and provides methods to create new occurrences.

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.
addFromConfiguration | Method that inserts a configuration from a configured design. The insert will fail if the configured design being used is not from the same project as the file it is being inserted into.
addNewComponent | Method that creates a new component and an occurrence that references it.
addNewComponentCopy | Method that creates a new occurrence by creating a new component that is a copy of an existing component. This is the equivalent of copying and using the "Paste New" command in the user interface. This is different from the addExistingComponent in that it's not a new instance to the existing component but a new component is created that has it's own definition (sketches, features, etc.) and a new occurrence instance is created to reference this new component.
asArray | Get the current list of all occurrences. The occurrences are returned in the same order as they appear in the browser.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.occurrences, Component.occurrences, FlatPatternComponent.occurrences

Samples

Name | Description
Assembly traversal using recursion API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Method that inserts an existing file.

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.

Samples

Name | Description
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version September 2015


Occurrences.addExistingComponent Method

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

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.

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

Samples

Name | Description
Component Sample | Component related functions

Version

Introduced in version August 2014


Occurrences.addFromConfiguration Method

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Method that inserts a configuration from a configured design. The insert will fail if the configured design being used is not from the same project as the file it is being inserted into.

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addFromConfiguration(configurationRow, transform)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addFromConfiguration(configurationRow, transform);

Return Value

Type | Description
Occurrence | Returns the newly created occurrence or null if the add failed.

Parameters

Name | Type | Description
configurationRow | ConfigurationRow | The row that specifies which configuration to use.
transform | Matrix3D | A transform that defines the location for the new occurrence.

Version

Introduced in version January 2024


Occurrences.addNewComponent Method

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Method that creates a new component and an occurrence that references it.

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.

Samples

Name | Description
Component Sample | Component related functions

Version

Introduced in version August 2014


Occurrences.addNewComponentCopy Method

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Method that creates a new occurrence by creating a new component that is a copy of an existing component. This is the equivalent of copying and using the "Paste New" command in the user interface. This is different from the addExistingComponent in that it's not a new instance to the existing component but a new component is created that has it's own definition (sketches, features, etc.) and a new occurrence instance is created to reference this new component.

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addNewComponentCopy(component, transform)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addNewComponentCopy(component, transform);

Return Value

Type | Description
Occurrence | Returns the newly created occurrence or null if the creation failed. The newly created component can be obtained by using the component property of the returned Occurrence.

Parameters

Name | Type | Description
component | Component | The existing component to create a copy of.
transform | Matrix3D | A transform that defines the location for the new occurrence

Version

Introduced in version September 2022


Occurrences.asArray Method

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Get the current list of all occurrences. The occurrences are returned in the same order as they appear in the browser.

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.asArray()
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->asArray();

Return Value

Type | Description
Occurrence[] | Returns the current list of all occurrences.

Version

Introduced in version November 2021


Occurrences.asList Property

Parent Object: Occurrences
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Returns the contents of this collection as an OccurrencesList object. This is useful when writing a function that traverses an assembly.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Returns the number of occurrences in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Function that returns the specified occurrence using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

Returns the specified occurrence using the name of the occurrence.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/Occurrences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

An offset constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 a 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isDeletable | Indicates if this constraint is deletable.
isTopologyMatched | Gets the setting that controls if the offset curves match the topology of the original curves.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

GeometricConstraints.addOffset, GeometricConstraints.addOffset2, GeometricConstraints.addTwoSidesOffset, OffsetConstraint.createForAssemblyContext, OffsetConstraint.nativeObject, SketchOffsetCurvesDimension.offsetConstraint

Version

Introduced in version March 2016


OffsetConstraint.assemblyContext Property

Parent Object: OffsetConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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 a SketchOffsetDimension. A SketchOffsetCurvesDimension is created automatically when curves are offset but if it is deleted the offset can also be controlled by a SketchOffsetDimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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.entityToken Property

Parent Object: OffsetConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.entityToken
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
string propertyValue = offsetConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


OffsetConstraint.isDeletable Property

Parent Object: OffsetConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Indicates if this constraint is deletable.

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.isTopologyMatched Property

Parent Object: OffsetConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Gets the setting that controls if the offset curves match the topology of the original curves.

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.isTopologyMatched
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
boolean propertyValue = offsetConstraint_var->isTopologyMatched();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


OffsetConstraint.isValid Property

Parent Object: OffsetConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraint.h>

Description

Returns the parent sketch object.

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


OffsetConstraintInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Used to define the inputs needed to create an offset constraint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
curves | Gets and sets an array of SketchCurve objects that defines the connected curves that will be offset. The Sketch.FindConnectedCurves method is a convenient way to get this set of curves.
dimensionPoint A location on one of the curves where the offset dimension will be created. A value of null can be used to indicate that a default location should be used.

When the OffsetContraintInput is created this property defaults to null.
isTopologyMatched Specifies if the offset curves must match the topology of the original curves. For example, if you have a sketch containing two lines with a fillet (arc) connecting them and offset them inward more than the arc radius, the resulting offset will be two lines. This is a change in topology because the original curves were line-arc-line, and the offset is line-line. An offset of less than the radius still results in a line-arc-line result. If this property is true, indicating the topology must match, creating the offset with a value greater than the arc radius will fail because the result will not have a matching topology.

When the OffsetConstraintInput is created, this property default 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
offset Gets and sets the value that defines the offset. This is a ValueInput object so it can be a float value to define the offset in centimeters or it can be a string defining an expression that will be used by the parameter controlling the offset. A positive offset value creates the offset curve to the "right" and a negative offset value goes to the "left".

The flow direction of the provided curves implies the offset direction. For example, if two connected lines are offset, the flow direction is from line 1 to line 2. Left and right are evaluated relative to the input geometry. If you are standing on line 1 and looking towards line 2, the offset's left side is on your left, and the right side is to your right. Closed single curves like circles and ellipses always have a counterclockwise flow, so a positive offset is always to the outside. For closed splines, the positive direction is based on the spline's parameterization.

Accessed From

GeometricConstraints.createOffsetInput

Version

Introduced in version September 2024


OffsetConstraintInput.classType Method

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetConstraintInput.classType()
This is a static method.

#include <Fusion/Sketch/OffsetConstraintInput.h>

returnValue = adsk::fusion::OffsetConstraintInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


OffsetConstraintInput.curves Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Gets and sets an array of SketchCurve objects that defines the connected curves that will be offset. The Sketch.FindConnectedCurves method is a convenient way to get this set of curves.

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.curves

# Set the value of the property.
offsetConstraintInput_var.curves = propertyValue
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
std::vector<Ptr<SketchCurve>> propertyValue = offsetConstraintInput_var->curves();

// Set the value of the property, where value_var is a SketchCurve.
bool returnValue = offsetConstraintInput_var->curves(value_var);

Property Value

This is a read/write property whose value is an array of type SketchCurve.

Version

Introduced in version September 2024


OffsetConstraintInput.dimensionPoint Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

A location on one of the curves where the offset dimension will be created. A value of null can be used to indicate that a default location should be used.

When the OffsetContraintInput is created this property defaults to null.

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.dimensionPoint

# Set the value of the property.
offsetConstraintInput_var.dimensionPoint = propertyValue
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = offsetConstraintInput_var->dimensionPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = offsetConstraintInput_var->dimensionPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2024


OffsetConstraintInput.isTopologyMatched Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Specifies if the offset curves must match the topology of the original curves. For example, if you have a sketch containing two lines with a fillet (arc) connecting them and offset them inward more than the arc radius, the resulting offset will be two lines. This is a change in topology because the original curves were line-arc-line, and the offset is line-line. An offset of less than the radius still results in a line-arc-line result. If this property is true, indicating the topology must match, creating the offset with a value greater than the arc radius will fail because the result will not have a matching topology.

When the OffsetConstraintInput is created, this property default to true.

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.isTopologyMatched

# Set the value of the property.
offsetConstraintInput_var.isTopologyMatched = propertyValue
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
boolean propertyValue = offsetConstraintInput_var->isTopologyMatched();

// Set the value of the property, where value_var is a boolean.
bool returnValue = offsetConstraintInput_var->isTopologyMatched(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2024


OffsetConstraintInput.isValid Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.isValid
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
boolean propertyValue = offsetConstraintInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


OffsetConstraintInput.objectType Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.objectType
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
string propertyValue = offsetConstraintInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


OffsetConstraintInput.offset Property

Parent Object: OffsetConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/OffsetConstraintInput.h>

Description

Gets and sets the value that defines the offset. This is a ValueInput object so it can be a float value to define the offset in centimeters or it can be a string defining an expression that will be used by the parameter controlling the offset. A positive offset value creates the offset curve to the "right" and a negative offset value goes to the "left".

The flow direction of the provided curves implies the offset direction. For example, if two connected lines are offset, the flow direction is from line 1 to line 2. Left and right are evaluated relative to the input geometry. If you are standing on line 1 and looking towards line 2, the offset's left side is on your left, and the right side is to your right. Closed single curves like circles and ellipses always have a counterclockwise flow, so a positive offset is always to the outside. For closed splines, the positive direction is based on the spline's parameterization.

Syntax

  • Python
  • C++
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.

# Get the value of the property.
propertyValue = offsetConstraintInput_var.offset

# Set the value of the property.
offsetConstraintInput_var.offset = propertyValue
"offsetConstraintInput_var" is a variable referencing an OffsetConstraintInput object.
#include <Fusion/Sketch/OffsetConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = offsetConstraintInput_var->offset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = offsetConstraintInput_var->offset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2024


OffsetFacesFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Object that represents an existing Offset Faces feature in a design. Offset Face features are created in the UI using the "Press Pull" command.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

OffsetFacesFeatures.item, OffsetFacesFeatures.itemByName

Version

Introduced in version June 2017


OffsetFacesFeature.assemblyContext Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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.

Version

Introduced in version June 2017


OffsetFacesFeature.classType Method

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

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.

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.entityToken Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.entityToken
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
string propertyValue = offsetFacesFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


OffsetFacesFeature.errorOrWarningMessage Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Indicates if this feature is parametric or not.

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.

Version

Introduced in version June 2017


OffsetFacesFeature.isSuppressed Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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.

Version

Introduced in version June 2017


OffsetFacesFeature.isValid Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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.

Version

Introduced in version June 2017


OffsetFacesFeature.objectType Property

Parent Object: OffsetFacesFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

Collection that provides access to all of the existing Offset Faces features in a design. Offset Face features are created in the UI using the "Press Pull" command.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.offsetFacesFeatures

Version

Introduced in version June 2017


OffsetFacesFeatures.classType Method

Parent Object: OffsetFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

The number of Offset Face features in the collection. Offset Face features are created in the UI using the "Press Pull" command.

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.

Version

Introduced in version June 2017


OffsetFacesFeatures.isValid Property

Parent Object: OffsetFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

Function that returns the specified Offset Face feature using an index into the collection.

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.

Version

Introduced in version June 2017


OffsetFacesFeatures.itemByName Method

Parent Object: OffsetFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

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.

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.

Version

Introduced in version June 2017


OffsetFacesFeatures.objectType Property

Parent Object: OffsetFacesFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFacesFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Object that represents an existing offset feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Gets and sets the faces to be offset.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.entityToken Property

Parent Object: OffsetFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.entityToken
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
string propertyValue = offsetFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


OffsetFeature.errorOrWarningMessage Property

Parent Object: OffsetFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Get if the faces that are tangentially connected to the input faces (if any) are also offset.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Gets the feature operation that was performed when the feature was created, (either 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Sets the faces and sheet bodies to offset.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a offset feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

An ObjectCollection containing the BRepFace objects being offset.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the offset.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

Description

Gets and sets the feature operation to perform. Can be 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Collection that provides access to all of the existing Offset features in a component and supports the ability to create new Offset features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Creates a new offset feature.

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
offsetFeatures.add | Demonstrates the offsetFeatures.add method. This is the equivalent of the Offset command in the SURFACE tab.
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


offsetFeatures.add

Description

Demonstrates the offsetFeatures.add method. This is the equivalent of the Offset command in the SURFACE tab.

Code Samples

  • Python
def demo_offsetFeatures_add(rootComp: adsk.fusion.Design.rootComponent):
    offsetFace = _ui.selectEntity('Select the face to offset.', 'Faces').entity
    offsetFaces = adsk.core.ObjectCollection.create()
    offsetFaces.add(offsetFace)
    distance = adsk.core.ValueInput.createByReal(2)
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation

    offsetFeatures = rootComp.features.offsetFeatures
    input = offsetFeatures.createInput(offsetFaces, distance, operation)
    offsetFeature = offsetFeatures.add(input)


OffsetFeatures.classType Method

Parent Object: OffsetFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

The number of Offset features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

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.

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
offsetFeatures.add | Demonstrates the offsetFeatures.add method. This is the equivalent of the Offset command in the SURFACE tab.
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeatures.isValid Property

Parent Object: OffsetFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Function that returns the specified offset feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

Function that returns the specified offset feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.

Version

Introduced in version November 2016


OffsetStartDefinition.classType Method

Parent Object: OffsetStartDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

Description

Statically creates a new OffsetStartDefinition object. This is used as input when create a new feature and defining the starting condition.

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.

Samples

Name | Description
extrudeFeatures.add using setSymmetricExtent | Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.

Version

Introduced in version November 2016


OffsetStartDefinition.isValid Property

Parent Object: OffsetStartDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OffsetStartDefinition.h>

Description

Returns the geometric definition of the profile plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned on the start, end or center of an edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Returns the edge the hole is positioned on.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Returns the plane that defines the orientation and start of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OnEdgeHolePositionDefinition.h>

Description

Returns the position of the hole on the edge. The hole can be at the start, midpoint, or end of the edge.

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


OneSideToExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Defines the inputs for a OneSideToExtentDefinition object. This defines a feature extent that goes up to a face or construction plane in one direction.

Remarks

This object is retired. Extents are now defined independently for both directions. To get the equivalent of what this object provided, you will create a ToEntityExtentDefinition and use it for the extent direction you want to go to an entity.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
matchShape | Specifies if the face should be extended or use adjacent faces if necessary to define the termination of the extrusion. When used for a revolve feature this is ignored and is always treated as true.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
toEntity | Gets and sets the entity that defines the extent. The valid types of entities can vary depending on the type of feature this is being used with.

Version

Introduced in version August 2014


OneSideToExtentDefinition.classType Method

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OneSideToExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/OneSideToExtentDefinition.h>

returnValue = adsk::fusion::OneSideToExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


OneSideToExtentDefinition.isValid Property

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.

# Get the value of the property.
propertyValue = oneSideToExtentDefinition_var.isValid
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.
#include <Fusion/Features/OneSideToExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = oneSideToExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


OneSideToExtentDefinition.matchShape Property

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

Specifies if the face should be extended or use adjacent faces if necessary to define the termination of the extrusion. When used for a revolve feature this is ignored and is always treated as true.

Syntax

  • Python
  • C++
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.

# Get the value of the property.
propertyValue = oneSideToExtentDefinition_var.matchShape

# Set the value of the property.
oneSideToExtentDefinition_var.matchShape = propertyValue
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.
#include <Fusion/Features/OneSideToExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = oneSideToExtentDefinition_var->matchShape();

// Set the value of the property, where value_var is a boolean.
bool returnValue = oneSideToExtentDefinition_var->matchShape(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2022


OneSideToExtentDefinition.objectType Property

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.

# Get the value of the property.
propertyValue = oneSideToExtentDefinition_var.objectType
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.
#include <Fusion/Features/OneSideToExtentDefinition.h>

// Get the value of the property.
string propertyValue = oneSideToExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


OneSideToExtentDefinition.parentFeature Property

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

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.

Syntax

  • Python
  • C++
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.

# Get the value of the property.
propertyValue = oneSideToExtentDefinition_var.parentFeature
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.
#include <Fusion/Features/OneSideToExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = oneSideToExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version March 2022


OneSideToExtentDefinition.toEntity Property

Parent Object: OneSideToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/OneSideToExtentDefinition.h>

Description

Gets and sets the entity that defines the extent. The valid types of entities can vary depending on the type of feature this is being used with.

Syntax

  • Python
  • C++
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.

# Get the value of the property.
propertyValue = oneSideToExtentDefinition_var.toEntity

# Set the value of the property.
oneSideToExtentDefinition_var.toEntity = propertyValue
"oneSideToExtentDefinition_var" is a variable referencing an OneSideToExtentDefinition object.
#include <Fusion/Features/OneSideToExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = oneSideToExtentDefinition_var->toEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = oneSideToExtentDefinition_var->toEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2022


Operation Object

Derived from: OperationBase Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Object that represents an operation in an existing Setup, Folder or Pattern.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
attributes | Returns the collection of attributes associated with this object.
error | Returns a message corresponding to any active error associated with the value of this parameter.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
generatingProgress | Gets the generation progress value for this operation.
hasError | Gets if errors were encountered when generating the operation.
hasToolpath | Gets if a toolpath currently exists (has been generated) for this operation.
hasWarning | Gets if problems were encountered when generating the operation.
isGenerating | Gets if the operation is being generated.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
strategy | Gets the name of the strategy associated with this operation.
strategyType | **RETIRED** Gets the strategy type for this operation.
tool | Get or set the tool for this operation. The document's tool library will be updated accordingly. The tool instance returned is a copy and therefore is not referenced by the operation. To change the tool of the operation, the new tool must be assigned to the operation. Setting a tool will override the current preset and will fall back to the default preset of the new tool.
toolPreset | Get or set the tool preset to be used. Must be a valid preset of the already assigned tool. Returns null if the operation has no tool or preset.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

AdditiveSetupUtility.assignPartsToBodyPreset, DocumentToolLibrary.operationsByTool, Operations.item, Operations.itemByName, Operations.itemByOperationId

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version January 2016


Operation.attributes Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.attributes
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = operation_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2021


Operation.classType Method

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copyAfter Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.copyAfter(operation)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


Operation.copyBefore Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.copyBefore(operation)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


Operation.copyInto Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.copyInto(container)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


Operation.deleteMe Method

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.deleteMe()
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version May 2023


Operation.duplicate Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.duplicate()
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


Operation.error Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.error
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Operation.generatedDataCollection Property

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.generatedDataCollection
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = operation_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


Operation.generatingProgress Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets the generation progress value for this operation.

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.hasError Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.hasError
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Operation.hasToolpath Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if a toolpath currently exists (has been generated) for this operation.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


Operation.hasWarning Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if problems were encountered when generating the operation.

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 April 2023


Operation.isGenerating Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if the operation is being generated.

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.isLightBulbOn Property

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isLightBulbOn

# Set the value of the property.
operation_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operation_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


Operation.isOptional Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if this operation is selected in the 'Setups' browser.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if the toolpath for this operation is currently valid. (has not become invalidated by model changes).

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isVisible
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


Operation.modifyUtility Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.modifyUtility(utility)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


Operation.moveAfter Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.moveAfter(operation)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


Operation.moveBefore Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.moveBefore(operation)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


Operation.moveInto Method

Parent Object: Operation

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.
returnValue = operation_var.moveInto(container)
"operation_var" is a variable referencing an Operation object.

#include <Cam/Operations/Operation.h>

returnValue = operation_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


Operation.name Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

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.

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.

Samples

Name | Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.

Version

Introduced in version January 2016


Operation.notes Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets and sets the notes of the operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets the current state of this operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets the CAMParameters collection for this operation.

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.

Samples

Name | Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.

Version

Introduced in version September 2020


Operation.parent Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Returns the parent Setup, Folder or Pattern for this operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets the Setup this operation belongs to.

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.strategy Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.strategy
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->strategy();

Property Value

This is a read only property whose value is a string.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version May 2022


Operation.strategyType Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets the strategy type for this operation.

Remarks

This property has been retired. Please use the strategy property instead.

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
Retired in version September 2022


Operation.tool Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Get or set the tool for this operation. The document's tool library will be updated accordingly. The tool instance returned is a copy and therefore is not referenced by the operation. To change the tool of the operation, the new tool must be assigned to the operation. Setting a tool will override the current preset and will fall back to the default preset of the new tool.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.tool

# Set the value of the property.
operation_var.tool = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<Tool> propertyValue = operation_var->tool();

// Set the value of the property, where value_var is a Tool.
bool returnValue = operation_var->tool(value_var);

Property Value

This is a read/write property whose value is a Tool.

Version

Introduced in version April 2023


Operation.toolPreset Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Get or set the tool preset to be used. Must be a valid preset of the already assigned tool. Returns null if the operation has no tool or preset.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.toolPreset

# Set the value of the property.
operation_var.toolPreset = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<ToolPreset> propertyValue = operation_var->toolPreset();

// Set the value of the property, where value_var is a ToolPreset.
bool returnValue = operation_var->toolPreset(value_var);

Property Value

This is a read/write property whose value is a ToolPreset.

Version

Introduced in version April 2023


Operation.warning Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.warning
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationBase Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Base class object representing all operations, folders, patterns and setups.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
attributes | Returns the collection of attributes associated with this object.
error | Returns a message corresponding to any active error associated with the value of this parameter.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
parameters | Gets the CAMParameters collection for this operation.
parentSetup | Gets the Setup this operation belongs to.
strategy | Gets the name of the strategy associated with this operation.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.

Accessed From

CAMFolder.createFromCAMTemplate, CAMFolder.createFromCAMTemplate2, CAMFolder.createFromTemplateXML, CAMHoleRecognition.allOperations, CAMPattern.createFromCAMTemplate, CAMPattern.createFromCAMTemplate2, CAMPattern.createFromTemplateXML, NCProgram.filteredOperations, NCProgram.operations, NCProgramInput.operations, Operations.add, Setup.createFromCAMTemplate, Setup.createFromCAMTemplate2, Setup.createFromTemplateXML

Derived Classes

CAMAdditiveContainer, CAMFolder, CAMHoleRecognition, NCProgram, Operation, Setup

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


OperationBase.attributes Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.attributes
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = operationBase_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2021


OperationBase.classType Method

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copyAfter Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.copyAfter(operation)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


OperationBase.copyBefore Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.copyBefore(operation)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


OperationBase.copyInto Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.copyInto(container)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


OperationBase.deleteMe Method

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.deleteMe()
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


OperationBase.duplicate Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.duplicate()
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Version

Introduced in version May 2024


OperationBase.error Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.error
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationBase.generatedDataCollection Property

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.generatedDataCollection
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = operationBase_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


OperationBase.hasError Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.hasError
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


OperationBase.hasWarning Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.hasWarning
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


OperationBase.isLightBulbOn Property

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isLightBulbOn

# Set the value of the property.
operationBase_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operationBase_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


OperationBase.isOptional Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets if this operation is selected in the 'Setups' browser.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isVisible
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


OperationBase.modifyUtility Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.modifyUtility(utility)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


OperationBase.moveAfter Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.moveAfter(operation)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Version

Introduced in version May 2024


OperationBase.moveBefore Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.moveBefore(operation)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


OperationBase.moveInto Method

Parent Object: OperationBase

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.
returnValue = operationBase_var.moveInto(container)
"operationBase_var" is a variable referencing an OperationBase object.

#include <Cam/Operations/OperationBase.h>

returnValue = operationBase_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


OperationBase.name Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets and sets the notes of the operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

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.

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.parameters Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.parameters
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = operationBase_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version September 2020


OperationBase.parentSetup Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets the Setup this operation belongs to.

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


OperationBase.strategy Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.strategy
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


OperationBase.warning Property

Parent Object: OperationBase
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationBase.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.warning
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

The OperationInput holds all necessary informations to create a new Operation. Can be added to the Operations instance for creation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Optionally specify the display name that appears in the browser-tree to override the default.
generationMode | Defines the automatic generation during the creation of the operation. Can be used to force or skip the generation of the new operation. By default the newly created operation will not be generated. The default value is SkipGeneration.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameters | Get all parameters for the current strategy. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.
strategy | Get the current strategy
tool | Optionally specify the tool used by the operation. The ToolLibraries allows the access to Local and Fusion tools. Setting the tool will overwrite tool parameters in the parameters property.
toolPreset | Optionally specify the preset of the tool. If no preset is specified, the operation gets its default feed and speed. The Tool provides access to available presets. Use one of those presets to override the default. Setting the tool will overwrite a subset of tool parameters in the parameters property. An invalid preset will cause a failure during the creation of the operation.

Accessed From

Operations.createInput

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationInput.classType Method

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OperationInput.classType()
This is a static method.

#include <Cam/Operations/OperationInput.h>

returnValue = adsk::cam::OperationInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


OperationInput.displayName Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Optionally specify the display name that appears in the browser-tree to override the default.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.displayName

# Set the value of the property.
operationInput_var.displayName = propertyValue
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
string propertyValue = operationInput_var->displayName();

// Set the value of the property, where value_var is a string.
bool returnValue = operationInput_var->displayName(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationInput.generationMode Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Defines the automatic generation during the creation of the operation. Can be used to force or skip the generation of the new operation. By default the newly created operation will not be generated. The default value is SkipGeneration.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.generationMode

# Set the value of the property.
operationInput_var.generationMode = propertyValue
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
AutomaticGenerationModes propertyValue = operationInput_var->generationMode();

// Set the value of the property, where value_var is an AutomaticGenerationModes.
bool returnValue = operationInput_var->generationMode(value_var);

Property Value

This is a read/write property whose value is an AutomaticGenerationModes.

Version

Introduced in version April 2023


OperationInput.isValid Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.isValid
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
boolean propertyValue = operationInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


OperationInput.objectType Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.objectType
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
string propertyValue = operationInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationInput.parameters Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Get all parameters for the current strategy. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.parameters
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = operationInput_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationInput.strategy Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Get the current strategy

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.strategy
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
string propertyValue = operationInput_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationInput.tool Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Optionally specify the tool used by the operation. The ToolLibraries allows the access to Local and Fusion tools. Setting the tool will overwrite tool parameters in the parameters property.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.tool

# Set the value of the property.
operationInput_var.tool = propertyValue
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
Ptr<Tool> propertyValue = operationInput_var->tool();

// Set the value of the property, where value_var is a Tool.
bool returnValue = operationInput_var->tool(value_var);

Property Value

This is a read/write property whose value is a Tool.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationInput.toolPreset Property

Parent Object: OperationInput
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationInput.h>

Description

Optionally specify the preset of the tool. If no preset is specified, the operation gets its default feed and speed. The Tool provides access to available presets. Use one of those presets to override the default. Setting the tool will overwrite a subset of tool parameters in the parameters property. An invalid preset will cause a failure during the creation of the operation.

Syntax

  • Python
  • C++
"operationInput_var" is a variable referencing an OperationInput object.

# Get the value of the property.
propertyValue = operationInput_var.toolPreset

# Set the value of the property.
operationInput_var.toolPreset = propertyValue
"operationInput_var" is a variable referencing an OperationInput object.
#include <Cam/Operations/OperationInput.h>

// Get the value of the property.
Ptr<ToolPreset> propertyValue = operationInput_var->toolPreset();

// Set the value of the property, where value_var is a ToolPreset.
bool returnValue = operationInput_var->toolPreset(value_var);

Property Value

This is a read/write property whose value is a ToolPreset.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


Operations Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Collection that provides access to the individual operations within an existing setup, folder or pattern.

Methods

Name | Description
add | Create a new Operation.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 OperationInput object, which is used to define the operation you want to create. Use properties and methods on the returned OperationInput object to define the desired operation and then pass it into the add method to create the operation.
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
compatibleStrategies Gets a list of the strategies that are compatible with the parent setup. This only returns strategies that are allowed to be added based on the active Setup or CAMFolder.

Note: There may be cases where a compatible strategy might not be allowed to be created due to licensing or other issues like disabled preview features.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMFolder.operations, CAMHoleRecognition.operations, CAMPattern.operations, GenerateToolpathFuture.operations, Setup.operations

Samples

Name | Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Generate Setup Sheets API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Operations.add Method

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Create a new Operation.

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.add(input)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->add(input);

Return Value

Type | Description
OperationBase | Returns the newly created Operation.

Parameters

Name | Type | Description
input | OperationInput | The OperationInput object defines the desired Operation. Use the createInput method to create a new OperationInput object and then use methods on it to define the Operation. The new Operation will be appended at the end of the current list of Operations. Throws an error if the strategy type is incompatible with the setup.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


Operations.classType Method

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.compatibleStrategies Property

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Gets a list of the strategies that are compatible with the parent setup. This only returns strategies that are allowed to be added based on the active Setup or CAMFolder.

Note: There may be cases where a compatible strategy might not be allowed to be created due to licensing or other issues like disabled preview features.

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.

# Get the value of the property.
propertyValue = operations_var.compatibleStrategies
"operations_var" is a variable referencing an Operations object.
#include <Cam/Operations/Operations.h>

// Get the value of the property.
std::vector<Ptr<OperationStrategy>> propertyValue = operations_var->compatibleStrategies();

Property Value

This is a read only property whose value is an array of type OperationStrategy.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


Operations.count Property

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

The number of items in the collection.

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 API Sample | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


Operations.createInput Method

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Creates a new OperationInput object, which is used to define the operation you want to create. Use properties and methods on the returned OperationInput object to define the desired operation and then pass it into the add method to create the operation.

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.createInput(strategy)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->createInput(strategy);

Return Value

Type | Description
OperationInput | Returns a new OperationInput object or will fail if an invalid strategy is specified.

Parameters

Name | Type | Description
strategy | string | The name of the strategy type that you want to create. Use the compatibleStrategies property of Operations object to get a list of the names of the strategies.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


Operations.isValid Property

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Function that returns the specified operation using an index into the collection.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Operations.itemByName Method

Parent Object: Operations
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Returns the operation with the specified name (as appears in the browser).

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

Returns the operation with the specified operation id.

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
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operations.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


OperationStrategy Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

The OperationStrategy contains information about a strategy such as its name, title and description.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromString | Create an OperationStrategy for a given name.

Properties

Name | Description
description | Get the localized description of the strategy.
isGenerationAllowed | Returns true if the strategy is allowed to be generated due to licensing and enabled preview features. Some strategies also require Active machining extension to be generated. Returns false otherwise.
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 strategy. This is equivalent to the Operation's strategy property. Use as strategy parameter when creating a OperationInput.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
title | Get the localized title of the strategy.

Accessed From

Operations.compatibleStrategies, OperationStrategy.createFromString

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationStrategy.classType Method

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OperationStrategy.classType()
This is a static method.

#include <Cam/Operations/OperationStrategy.h>

returnValue = adsk::cam::OperationStrategy::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


OperationStrategy.createFromString Method

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Create an OperationStrategy for a given name.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OperationStrategy.createFromString(name)
This is a static method.

#include <Cam/Operations/OperationStrategy.h>

returnValue = adsk::cam::OperationStrategy::createFromString(name);

Return Value

Type | Description
OperationStrategy | Returns the OperationStrategy for given strategy name.

Parameters

Name | Type | Description
name | string | The name of the strategy. Throws an error if the strategy name is unknown.

Version

Introduced in version April 2023


OperationStrategy.description Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Get the localized description of the strategy.

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.description
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
string propertyValue = operationStrategy_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationStrategy.isGenerationAllowed Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Returns true if the strategy is allowed to be generated due to licensing and enabled preview features. Some strategies also require Active machining extension to be generated. Returns false otherwise.

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.isGenerationAllowed
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
boolean propertyValue = operationStrategy_var->isGenerationAllowed();

Property Value

This is a read only property whose value is a boolean.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationStrategy.isValid Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.isValid
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
boolean propertyValue = operationStrategy_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


OperationStrategy.name Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Get the name of the strategy. This is equivalent to the Operation's strategy property. Use as strategy parameter when creating a OperationInput.

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.name
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
string propertyValue = operationStrategy_var->name();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


OperationStrategy.objectType Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.objectType
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
string propertyValue = operationStrategy_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OperationStrategy.title Property

Parent Object: OperationStrategy
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/OperationStrategy.h>

Description

Get the localized title of the strategy.

Syntax

  • Python
  • C++
"operationStrategy_var" is a variable referencing an OperationStrategy object.

# Get the value of the property.
propertyValue = operationStrategy_var.title
"operationStrategy_var" is a variable referencing an OperationStrategy object.
#include <Cam/Operations/OperationStrategy.h>

// Get the value of the property.
string propertyValue = operationStrategy_var->title();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


OptimizedOrientationResult Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The orientation result instance. Contains properties that can be used to create a custom ranking and the orientation matrix. The calculated ranking is based on the orientation operation's ranking priorities.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
boundingBoxVolume | The volume of the bounding box aligned to the world coordinate system of the oriented part. The value is given in cubic centimeters
centerOfGravityHeight | The height of the center of gravity of the oriented part. The value is given 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
partHeight | The resulting height of the oriented part. The value is given in centimeters
rankingValue | The value which the initial ordering is based on. Calculated based on the properties above by the orientation operation.
supportArea | The shadow area of the support hull below the oriented part. The value is given in squared centimeters
supportVolume | The volume of the support hull below the oriented part. The value is given in cubic centimeters
transformation | The transformation matrix to be applied onto the occurrence's existing transformation at the time of the calculation.

Accessed From

OptimizedOrientationResults.currentOrientationResult, OptimizedOrientationResults.initialOrientationResult, OptimizedOrientationResults.item

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


OptimizedOrientationResult.boundingBoxVolume Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The volume of the bounding box aligned to the world coordinate system of the oriented part. The value is given in cubic centimeters

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.boundingBoxVolume
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->boundingBoxVolume();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.centerOfGravityHeight Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The height of the center of gravity of the oriented part. The value is given in centimeters

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.centerOfGravityHeight
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->centerOfGravityHeight();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.classType Method

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OptimizedOrientationResult.classType()
This is a static method.

#include <Cam/GeneratedData/OptimizedOrientationResult.h>

returnValue = adsk::cam::OptimizedOrientationResult::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


OptimizedOrientationResult.isValid Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.isValid
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
boolean propertyValue = optimizedOrientationResult_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


OptimizedOrientationResult.objectType Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.objectType
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
string propertyValue = optimizedOrientationResult_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


OptimizedOrientationResult.partHeight Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The resulting height of the oriented part. The value is given in centimeters

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.partHeight
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->partHeight();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.rankingValue Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The value which the initial ordering is based on. Calculated based on the properties above by the orientation operation.

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.rankingValue
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->rankingValue();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.supportArea Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The shadow area of the support hull below the oriented part. The value is given in squared centimeters

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.supportArea
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->supportArea();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.supportVolume Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The volume of the support hull below the oriented part. The value is given in cubic centimeters

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.supportVolume
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
float propertyValue = optimizedOrientationResult_var->supportVolume();

Property Value

This is a read only property whose value is a float.

Version

Introduced in version July 2023


OptimizedOrientationResult.transformation Property

Parent Object: OptimizedOrientationResult
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResult.h>

Description

The transformation matrix to be applied onto the occurrence's existing transformation at the time of the calculation.

Syntax

  • Python
  • C++
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.

# Get the value of the property.
propertyValue = optimizedOrientationResult_var.transformation
"optimizedOrientationResult_var" is a variable referencing an OptimizedOrientationResult object.
#include <Cam/GeneratedData/OptimizedOrientationResult.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = optimizedOrientationResult_var->transformation();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version July 2023


OptimizedOrientationResults Object

Derived from: GeneratedData Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Collection of OptimizedOrientationResult instances associated with a given optimized orientation object inside an additive setup. The number of instances is the number of results given and the initial orientation result. The initial orientation will contain the orientation matrix, but not the other values calculated by the orientation operation. Setting an OptimizedOrientationResult as the currentOrientationResult will transform the Occurrence assigned to the orientation operation.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets the desired orientation result at the given index. The list is ordered given the orientation parameters of the parent orientation operation.

Properties

Name | Description
count | The number of items in the collection.
currentOrientationResult | Gets or sets the desired OrientationResult. When setting, the orientation matrix is applied to the component selected in the parent orientation operation, possibly invalidating other operations.
initialOrientationResult | Gets the initial orientation of the component before any result has been applied.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


OptimizedOrientationResults.classType Method

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OptimizedOrientationResults.classType()
This is a static method.

#include <Cam/GeneratedData/OptimizedOrientationResults.h>

returnValue = adsk::cam::OptimizedOrientationResults::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


OptimizedOrientationResults.count Property

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

The number of items in the collection.

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

# Get the value of the property.
propertyValue = optimizedOrientationResults_var.count
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
#include <Cam/GeneratedData/OptimizedOrientationResults.h>

// Get the value of the property.
uinteger propertyValue = optimizedOrientationResults_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2023


OptimizedOrientationResults.currentOrientationResult Property

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Gets or sets the desired OrientationResult. When setting, the orientation matrix is applied to the component selected in the parent orientation operation, possibly invalidating other operations.

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

# Get the value of the property.
propertyValue = optimizedOrientationResults_var.currentOrientationResult

# Set the value of the property.
optimizedOrientationResults_var.currentOrientationResult = propertyValue
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
#include <Cam/GeneratedData/OptimizedOrientationResults.h>

// Get the value of the property.
Ptr<OptimizedOrientationResult> propertyValue = optimizedOrientationResults_var->currentOrientationResult();

// Set the value of the property, where value_var is an OptimizedOrientationResult.
bool returnValue = optimizedOrientationResults_var->currentOrientationResult(value_var);

Property Value

This is a read/write property whose value is an OptimizedOrientationResult.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


OptimizedOrientationResults.initialOrientationResult Property

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Gets the initial orientation of the component before any result has been applied.

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

# Get the value of the property.
propertyValue = optimizedOrientationResults_var.initialOrientationResult
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
#include <Cam/GeneratedData/OptimizedOrientationResults.h>

// Get the value of the property.
Ptr<OptimizedOrientationResult> propertyValue = optimizedOrientationResults_var->initialOrientationResult();

Property Value

This is a read only property whose value is an OptimizedOrientationResult.

Version

Introduced in version July 2023


OptimizedOrientationResults.isValid Property

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

# Get the value of the property.
propertyValue = optimizedOrientationResults_var.isValid
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
#include <Cam/GeneratedData/OptimizedOrientationResults.h>

// Get the value of the property.
boolean propertyValue = optimizedOrientationResults_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


OptimizedOrientationResults.item Method

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

Gets the desired orientation result at the given index. The list is ordered given the orientation parameters of the parent orientation operation.

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
returnValue = optimizedOrientationResults_var.item(index)
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

#include <Cam/GeneratedData/OptimizedOrientationResults.h>

returnValue = optimizedOrientationResults_var->item(index);

Parameters

Name | Type | Description
index | integer |

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version July 2023


OptimizedOrientationResults.objectType Property

Parent Object: OptimizedOrientationResults
Defined in namespace "adsk::cam" and the header file is <Cam/GeneratedData/OptimizedOrientationResults.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.

# Get the value of the property.
propertyValue = optimizedOrientationResults_var.objectType
"optimizedOrientationResults_var" is a variable referencing an OptimizedOrientationResults object.
#include <Cam/GeneratedData/OptimizedOrientationResults.h>

// Get the value of the property.
string propertyValue = optimizedOrientationResults_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


OrientedBoundingBox3D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 bounding 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

BRepBody.orientedMinimumBoundingBox, Component.orientedMinimumBoundingBox, FlatPatternComponent.orientedMinimumBoundingBox, MeasureManager.getOrientedBoundingBox, MeshBody.orientedMinimumBoundingBox, Occurrence.orientedMinimumBoundingBox, OrientedBoundingBox3D.copy, OrientedBoundingBox3D.create

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.centerPoint Property

Parent Object: OrientedBoundingBox3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets and sets the centerPoint point of the oriented box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Determines if the specified point lies within the oriented bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Create a copy of this oriented bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Creates a transient oriented bounding box object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets and sets the height of the oriented bounding box in centimeters.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets the direction of the height of the oriented bounding box. A unit vector is always returned.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets and sets the length of the oriented bounding box in centimeters.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets the direction of the length of the oriented bounding box. A unit vector is always returned.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Sets the orientation of the oriented bounding box.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets and sets the width of the oriented bounding box in centimeters.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/OrientedBoundingBox3D.h>

Description

Gets the direction of the width of the oriented bounding box. A unit vector is always returned.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

A Palette is a floating or docked dialog in Fusion. The browser is an example of a built-in palette. The contents of a custom palette are created by displaying an HTML file.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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.
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 currently 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 that will be displayed in the palette. This can be a local file or a URL on the web where the HTML will be read. To avoid reading a file, this can also be the full HTML definition as a string.

If you are providing the HTML content as a string, it should begin with the element. Any references made in the HTML should be to URL's and not local files since the local path is ambiguous.
id | Gets The unique, language independent, ID of this palette.
isNative | Indicates if this is one of the standard Fusion palettes or a custom palette created through the API. If true, it is a standard Fusion palette and will have some restrictions on changing its properties and cannot be deleted.
isTransparent | Returns if this palette was created as a transparent palette.
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 window, a value of zero indicates the left side of the screen and not the Fusion window.
name | Gets and set the name of the palette as seen in the user interface. The name of native palettes cannot be set.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 window, a value of zero indicates the top of the screen and not the Fusion 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.
navigatingURL | This event is fired when a navigation event occurs on the page. This allows the add-in to determine how this navigation should be handled by the browser.

Accessed From

Palettes.add, Palettes.add2, Palettes.addTransparent, 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "palette_closed" is the event handler function.
futil.add_handler(palette_var.closed, palette_closed, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the closed event.
def palette_closed(args: adsk.core.UserInterfaceGeneralEventArgs):
    # Code to react to the event.
    app.log('In palette_closed event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "MyClosedHandler" is the name of the class that handles the event.
onClosed = MyClosedHandler()
palette_var.closed.add(onClosed)
handlers.append(onClosed)

-------- Event handler class definition ---------
# Event handler for the closed event.
class MyClosedHandler(adsk.core.UserInterfaceGeneralEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.UserInterfaceGeneralEventArgs):
        # Code to react to the event.
        app.log('In MyClosedHandler event handler.')
--------- 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Deletes this palette. Fusion native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Gets and sets how the palette is currently docked.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Gets and sets the URL to the HTML file that will be displayed in the palette. This can be a local file or a URL on the web where the HTML will be read. To avoid reading a file, this can also be the full HTML definition as a string.

If you are providing the HTML content as a string, it should begin with the element. Any references made in the HTML should be to URL's and not local files since the local path is ambiguous.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Gets The unique, language independent, ID of this palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "palette_incomingFromHTML" is the event handler function.
futil.add_handler(palette_var.incomingFromHTML, palette_incomingFromHTML, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the incomingFromHTML event.
def palette_incomingFromHTML(args: adsk.core.HTMLEventArgs):
    # Code to react to the event.
    app.log('In palette_incomingFromHTML event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "MyIncomingFromHTMLHandler" is the name of the class that handles the event.
onIncomingFromHTML = MyIncomingFromHTMLHandler()
palette_var.incomingFromHTML.add(onIncomingFromHTML)
handlers.append(onIncomingFromHTML)

-------- Event handler class definition ---------
# Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.HTMLEventArgs):
        # Code to react to the event.
        app.log('In MyIncomingFromHTMLHandler event handler.')
--------- 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Indicates if this is one of the standard Fusion palettes or a custom palette created through the API. If true, it is a standard Fusion palette and will have some restrictions on changing its properties and cannot be deleted.

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.isTransparent Property

Parent Object: Palette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Returns if this palette was created as a transparent palette.

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.isTransparent
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
boolean propertyValue = palette_var->isTransparent();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


Palette.isValid Property

Parent Object: Palette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Gets and sets whether this palette is currently being displayed in the user interface.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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 window, a value of zero indicates the left side of the screen and not the Fusion window.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Gets and set the name of the palette as seen in the user interface. The name of native palettes cannot be set.

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.navigatingURL Event

Parent Object: Palette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

This event is fired when a navigation event occurs on the page. This allows the add-in to determine how this navigation should be handled by the browser.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "palette_navigatingURL" is the event handler function.
futil.add_handler(palette_var.navigatingURL, palette_navigatingURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the navigatingURL event.
def palette_navigatingURL(args: adsk.core.NavigationEventArgs):
    # Code to react to the event.
    app.log('In palette_navigatingURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
# "MyNavigatingURLHandler" is the name of the class that handles the event.
onNavigatingURL = MyNavigatingURLHandler()
palette_var.navigatingURL.add(onNavigatingURL)
handlers.append(onNavigatingURL)

-------- Event handler class definition ---------
# Event handler for the navigatingURL event.
class MyNavigatingURLHandler(adsk.core.NavigationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.NavigationEventArgs):
        # Code to react to the event.
        app.log('In MyNavigatingURLHandler event handler.')
--------- Required include files. ---------
#include <Core/UserInterface/Palette.h>
#include <Core/UserInterface/NavigationEvent.h>
#include <Core/UserInterface/NavigationEventHandler.h>
#include <Core/UserInterface/NavigationEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the navigatingURL event.
class MyNavigatingURLEventHandler : public adsk::core::NavigationEventHandler
{
public:
    void notify(const Ptr<NavigationEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyNavigatingURLEventHandler event handler.");
    }
} _navigatingURL;

--------- Connect the handler to the event. ---------
// "palette_var" is a variable referencing a Palette object.
// Connect the handler function to the event.
Ptr<NavigationEvent> navigatingURLEvent = palette_var->navigatingURL();
if (!navigatingURLEvent)
    return;

bool isOk = navigatingURLEvent->add(&_navigatingURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a NavigationEvent.

Version

Introduced in version March 2021


Palette.objectType Property

Parent Object: Palette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Sends the string to the JavaScript associated with the loaded HTML.

Remarks

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 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.

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 the palette control this API call will be asynchronous and an empty string is returned. Response will 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

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 successful.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

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 successful.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.

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 window, a value of zero indicates the left side of the screen and not the Fusion 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 window, a value of zero indicates the top of the screen and not the Fusion window.

Version

Introduced in version March 2017


Palette.setSize Method

Parent Object: Palette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

Description

Snaps this palette to another palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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 window, a value of zero indicates the top of the screen and not the Fusion window.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Provides access to a set of palettes, which are docked or floating windows that display HTML.

Methods

Name | Description
add | Creates a new Palette.
add2 | Creates a new Palette.
addTransparent | Creates a new transparent 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Creates a new Palette.

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 palette. 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 invisibly, 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 if you want to use the old or new web browser. A palette is essentially a dialog that hosts a web browser. To support this type of functionality, Fusion has used CEF (Chromium Embedded Framework). Fusion is in the process of switching to the Qt Web Browser wherever an embedded browser is needed in the product. As this transition occurs, Fusion is supporting both web browsers. This argument is optional and defaults to False, which means the palette will behave as before and use the CEF browser. Setting the argument to True will cause the palette to use the new QT Web Browser.

When Fusion completes the transition to the QT Web Browser, support for the CEF browser will be removed from Fusion, and you will always get a QT Web Browser regardless of how the argument is set. Because of this, it is highly recommended you set this argument to true to use the new browser because when support for the CEF browser is removed you will automatically be forced to use the QT Web Browser.

This argument is no longer used because the new QT Web Browser is always used regardless of this parameter's value.

This is an optional argument whose default value is True.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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.add2 Method

Parent Object: Palettes
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Creates a new Palette.

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.
# Uses no optional arguments.
returnValue = palettes_var.add2(id, name, htmlFileURL, isVisible, showCloseButton, isResizable)

# Uses optional arguments.
returnValue = palettes_var.add2(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, width, height)
"palettes_var" is a variable referencing a Palettes object.

#include <Core/UserInterface/Palettes.h>

// Uses no optional arguments.
returnValue = palettes_var->add2(id, name, htmlFileURL, isVisible, showCloseButton, isResizable);

// Uses optional arguments.
returnValue = palettes_var->add2(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, width, height);

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 palette. This can be a local file or a URL on the web where the HTML will be read. To avoid reading a file, this can also be the full HTML definition as a string. If you are providing the HTML content as a string, it should begin with the element. Any references made in the HTML should be to URL's and not local files since the local path is ambiguous.
isVisible | boolean | Specifies if the palette is initially visible or not. It's useful to create it invisibly, 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.

Version

Introduced in version March 2022


Palettes.addTransparent Method

Parent Object: Palettes
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Creates a new transparent Palette.

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.
# Uses no optional arguments.
returnValue = palettes_var.addTransparent(id, name, htmlFileURL, isVisible, showCloseButton, isResizable)

# Uses optional arguments.
returnValue = palettes_var.addTransparent(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, isOpaqueWhenUndocked, width, height)
"palettes_var" is a variable referencing a Palettes object.

#include <Core/UserInterface/Palettes.h>

// Uses no optional arguments.
returnValue = palettes_var->addTransparent(id, name, htmlFileURL, isVisible, showCloseButton, isResizable);

// Uses optional arguments.
returnValue = palettes_var->addTransparent(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, isOpaqueWhenUndocked, width, height);

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 palette. 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 invisibly, 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.
isOpaqueWhenUndocked | boolean | Specifies if the palette will be transparent when docked and opaque when undocked. This is an optional argument whose default value is False.
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.

Version

Introduced in version March 2024


Palettes.classType Method

Parent Object: Palettes
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Gets the number of Palettes.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Returns the specified palette using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

Returns the palette at the specified ID.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version March 2017


Palettes.objectType Property

Parent Object: Palettes
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Palettes.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

A parallel constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: ParallelConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.entityToken
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
string propertyValue = parallelConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ParallelConstraint.isDeletable Property

Parent Object: ParallelConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Returns the first line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Returns the second line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ParallelConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

The base class Parameter object that can represent model or user parameters.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
dependencyParameters | Returns a list of parameters that this parameter is dependent on.
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
entityToken Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
expression Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".
isDeletable | Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 of the parameter

Accessed From

ConfigurationParameterColumn.parameter, ConstructionPlaneAtAngleDefinition.angle, ConstructionPlaneDistanceOnPathDefinition.distance, ConstructionPlaneOffsetDefinition.offset, ConstructionPlaneTangentDefinition.angle, ParameterList.item, ParameterList.itemByName

Derived Classes

ModelParameter, UserParameter

Samples

Name | Description
Create Animation API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

The comment associated with this parameter

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.dependencyParameters Property

Parent Object: Parameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Returns a list of parameters that this parameter is dependent on.

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.dependencyParameters
"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->dependencyParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version May 2022


Parameter.dependentParameters Property

Parent Object: Parameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

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.entityToken Property

Parent Object: Parameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.entityToken
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Parameter.expression Property

Parent Object: Parameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Parameter.h>

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value of the parameter

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 API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.

Version

Introduced in version November 2014


ParameterList Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Transient object used to pass a set of parameters.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CustomFeatureParameter.dependencyParameters, CustomFeatureParameter.dependentParameters, Design.allParameters, FlatPatternProduct.allParameters, ModelParameter.dependencyParameters, ModelParameter.dependentParameters, Parameter.dependencyParameters, Parameter.dependentParameters, ParameterList.create, UserParameter.dependencyParameters, UserParameter.dependentParameters, VariableRadiusFilletEdgeSet.midPositions, VariableRadiusFilletEdgeSet.midRadii, WorkingModel.allParameters

Samples

Name | Description
Create Animation API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.

Version

Introduced in version August 2014


ParameterList.add Method

Parent Object: ParameterList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Indicates whether or not ParameterList collection contains a specified parameter

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Returns the number of parameters in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Function that returns the specified parameter using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Returns the specified parameter using the name of the parameter as it is displayed in the parameters dialog

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 API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.

Version

Introduced in version August 2014


ParameterList.objectType Property

Parent Object: ParameterList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ParameterList.h>

Description

Method that removes a parameter from the list by specifying the parameter (item) to remove

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


ParameterValue Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ParameterValue.h>

Description

Base class for representing the value of a parameter. Subclasses implement value handling for available parameter types.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.

Accessed From

CAMParameter.value

Derived Classes

BooleanParameterValue, CadContours2dParameterValue, CadMachineAvoidGroupsParameterValue, CadObjectParameterValue, CAMArrangeParameterValue, ChoiceParameterValue, FloatParameterValue, IntegerParameterValue, StringParameterValue

Version

Introduced in version September 2021


ParameterValue.classType Method

Parent Object: ParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ParameterValue.classType()
This is a static method.

#include <Cam/Operations/ParameterValue.h>

returnValue = adsk::cam::ParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


ParameterValue.isValid Property

Parent Object: ParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"parameterValue_var" is a variable referencing a ParameterValue object.

# Get the value of the property.
propertyValue = parameterValue_var.isValid
"parameterValue_var" is a variable referencing a ParameterValue object.
#include <Cam/Operations/ParameterValue.h>

// Get the value of the property.
boolean propertyValue = parameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


ParameterValue.objectType Property

Parent Object: ParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"parameterValue_var" is a variable referencing a ParameterValue object.

# Get the value of the property.
propertyValue = parameterValue_var.objectType
"parameterValue_var" is a variable referencing a ParameterValue object.
#include <Cam/Operations/ParameterValue.h>

// Get the value of the property.
string propertyValue = parameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


ParameterValue.parent Property

Parent Object: ParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/ParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"parameterValue_var" is a variable referencing a ParameterValue object.

# Get the value of the property.
propertyValue = parameterValue_var.parent
"parameterValue_var" is a variable referencing a ParameterValue object.
#include <Cam/Operations/ParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = parameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


PatchFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

An object that represents an existing patch feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
getContinuity | Gets the continuity used for each edge in the boundary. To call this method, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setContinuity | Sets the continuity to use for each edge in the boundary. The arrays for the arguments correspond to B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges to know their order. This order applies to the arrays provided for the 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
boundaryCurve Returns an ObjectCollection that contains all of the sketch curves or B-Rep edges that defines 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 and B-Rep edges.

If a single open sketch curve or B-Rep edge is input, Fusion will automatically find connected sketch curves or B-Rep edges to define a closed loop.

If an ObjectCollection of sketch curves or B-Rep edges is input, they must define a closed shape.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
continuity **RETIRED** Gets and sets the type of surface continuity used when creating the patch face. This value 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.

To set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
groupContinuity Gets and sets the type of surface continuity to use for all edges when the isGroupEdges property is true. The continuity is used to determine how the patch connects to any B-Rep edges in the boundary. It is ignored for any sketch curves in the boundary. The property defaults to ConnectedSurfaceContinuityType. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
groupIsContinuityDirectionFlipped Gets and sets the continuity direction for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to false. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
groupWeight Gets and sets the weight to use for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to 0.5. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
healthState | Returns the current health state of the feature.
interiorRailsAndPoints Gets and sets any interior curves or points the patch should fit through. Valid entities include object collections of connected curves, paths, sketch curves, sketch points, B-Rep edges, and construction points.

When getting this property, the returned ObjectCollection can contain individual edges, sketch curves, sketch points, construction points, vertices, and ObjectCollection objects that represent a group of the curves and points listed above.

Can be set to null to remove any interior rails and points from the patch.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isGroupEdges Gets and sets if the edges in the boundary curve are treated as a group , and they all use the same continuity. If this property is True (which is the default), the continuity for all edges is controlled by the continuity property. If this property is false; the continuity is set for each edge using the setContinuity method.

When this property is set to true, the continuity and weight of the first edge will be used for all edges. When set to false, each edge will initially have the same continuity and weight. This property is typically set to false by calling the setContinuity method, which has the side effect of changing this to false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns an ObjectCollection that contains all of the sketch curves or B-Rep edges that defines 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 and B-Rep edges.

If a single open sketch curve or B-Rep edge is input, Fusion will automatically find connected sketch curves or B-Rep edges to define a closed loop.

If an ObjectCollection of sketch curves or B-Rep edges is input, they must define a closed shape.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the type of surface continuity used when creating the patch face. This value 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.

To set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Remarks

This property has been retired and replaced by either the groupContinuity property or setContinuity method, depending on if the isGroupEdges property is true or not.

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
Retired in version November 2022


PatchFeature.createForAssemblyContext Method

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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.

Version

Introduced in version July 2016


PatchFeature.deleteMe Method

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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.entityToken Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.entityToken
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
string propertyValue = patchFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


PatchFeature.errorOrWarningMessage Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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.getContinuity Method

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets the continuity used for each edge in the boundary.

To call this method, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

(returnValue, edges, continuity, weight, isContinuityDirectionFlipped) = patchFeature_var.getContinuity()

#include <Fusion/Features/PatchFeature.h

// Declare the output arguments.
BRepEdge[] edges;
integer[] continuity;
double[] weight;
boolean[] isContinuityDirectionFlipped;
boolean returnValue = patchFeature_var->getContinuity(edges, continuity, weight, isContinuityDirectionFlipped);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
edges | BRepEdge[] | Output array containing all of the BRepEdge objects in the boundary.
continuity | integer[] | Output array the same size as the edges array that defines the continuity to apply to the edge in the same index in the edges array. The values are obtained from the SurfaceContinuityTypes enum and passed in as an integers.
weight | double[] | Output array the same size as the edges array that defines the weight applied to the edge in the same index in the edges array. If the continuity of an edge is ConnectedSurfaceContinuityType, the weight value should be ignored.
isContinuityDirectionFlipped | boolean[] | Output array the same size as the edges array that defines which of the two faces the edge connects to is used in computing the continuity direction. If the continuity is ConnectedSurfaceContinuityType or the edge is an open edge and only connected to a single face, the value should be ignored. If false, the face associated with the first co-edge returned by the edge is used.

Version

Introduced in version November 2022


PatchFeature.groupContinuity Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets the type of surface continuity to use for all edges when the isGroupEdges property is true. The continuity is used to determine how the patch connects to any B-Rep edges in the boundary. It is ignored for any sketch curves in the boundary. The property defaults to ConnectedSurfaceContinuityType. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.groupContinuity

# Set the value of the property.
patchFeature_var.groupContinuity = 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->groupContinuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = patchFeature_var->groupContinuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


PatchFeature.groupIsContinuityDirectionFlipped Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets the continuity direction for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to false. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.groupIsContinuityDirectionFlipped

# Set the value of the property.
patchFeature_var.groupIsContinuityDirectionFlipped = 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->groupIsContinuityDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patchFeature_var->groupIsContinuityDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


PatchFeature.groupWeight Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets the weight to use for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to 0.5. The value of this property is ignored if the isGroupEdges property is false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.groupWeight

# Set the value of the property.
patchFeature_var.groupWeight = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
double propertyValue = patchFeature_var->groupWeight();

// Set the value of the property, where value_var is a double.
bool returnValue = patchFeature_var->groupWeight(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


PatchFeature.healthState Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the current health state of the feature.

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.interiorRailsAndPoints Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets any interior curves or points the patch should fit through. Valid entities include object collections of connected curves, paths, sketch curves, sketch points, B-Rep edges, and construction points.

When getting this property, the returned ObjectCollection can contain individual edges, sketch curves, sketch points, construction points, vertices, and ObjectCollection objects that represent a group of the curves and points listed above.

Can be set to null to remove any interior rails and points from the patch.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.interiorRailsAndPoints

# Set the value of the property.
patchFeature_var.interiorRailsAndPoints = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = patchFeature_var->interiorRailsAndPoints();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = patchFeature_var->interiorRailsAndPoints(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


PatchFeature.isGroupEdges Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets if the edges in the boundary curve are treated as a group , and they all use the same continuity. If this property is True (which is the default), the continuity for all edges is controlled by the continuity property. If this property is false; the continuity is set for each edge using the setContinuity method.

When this property is set to true, the continuity and weight of the first edge will be used for all edges. When set to false, each edge will initially have the same continuity and weight. This property is typically set to false by calling the setContinuity method, which has the side effect of changing this to false.

To get or set this property, you need to position the timeline marker immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.isGroupEdges

# Set the value of the property.
patchFeature_var.isGroupEdges = 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->isGroupEdges();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patchFeature_var->isGroupEdges(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


PatchFeature.isParametric Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Gets the type of operation performed by the patch feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the parent component that owns this feature.

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.setContinuity Method

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Sets the continuity to use for each edge in the boundary. The arrays for the arguments correspond to B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges to know their order. This order applies to the arrays provided for the arguments.

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.
returnValue = patchFeature_var.setContinuity(continuity, weight, isContinuityDirectionFlipped)
"patchFeature_var" is a variable referencing a PatchFeature object.

#include <Fusion/Features/PatchFeature.h>

returnValue = patchFeature_var->setContinuity(continuity, weight, isContinuityDirectionFlipped);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
continuity | integer[] | An array whose size of the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The continuity array defines the type of continuity to apply to the edge at the same index. The values are obtained from the SurfaceContinuityTypes enum and passed in as an integer.
weight | double[] | An array whose size is the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The weight array defines the weight to apply to the edge at the same index. If the continuity of an edge is ConnectedSurfaceContinuityType, the weight value is ignored.
isContinuityDirectionFlipped | boolean[] | An array whose size is the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The isContinuityDirectionFlipped array defines which of the two faces the edge connects to and is used in computing the continuity direction. If the continuity is ConnectedSurfaceContinuityType, or the edge is an open edge and only connected to a single face, the value is ignored. If false, the face associated with the first co-edge returned by the edge is used.

Version

Introduced in version November 2022


PatchFeature.timelineObject Property

Parent Object: PatchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a patch feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getContinuity | Gets the continuity used for each edge in the boundary.
setContinuity | Sets the continuity to use for each edge in the boundary. The arrays for the arguments correspond to B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges to know their order. This order applies to the arrays provided for the arguments.

Properties

Name | Description
boundaryCurve Gets and sets 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, an ObjectCollection, or a Path object.

If a single open sketch curve or B-Rep edge is input, Fusion will automatically find connected sketch curves or B-Rep edges to define a closed loop.

If an ObjectCollection is used as input, it must be a set of curves that define a closed shape.

If a Path is used as input, it must define a closed shape.
continuity | **RETIRED** Gets and sets the 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 | 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
groupContinuity | Gets and sets the type of surface continuity to use for all edges when the isGroupEdges property is true. The continuity is used to determine how the patch connects to any B-Rep edges in the boundary. It is ignored for any sketch curves in the boundary. The property defaults to ConnectedSurfaceContinuityType. The value of this property is ignored if the isGroupEdges property is false.
groupIsContinuityDirectionFlipped | Gets and sets the continuity direction for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to false. The value of this property is ignored if the isGroupEdges property is false.
groupWeight | Gets and sets the weight to use for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to 0.5. The value of this property is ignored if the isGroupEdges property is false.
interiorRailsAndPoints Gets and sets any interior curves or points the patch should fit through. Valid entities include object collections of connected curves, paths, sketch curves, sketch points, B-Rep edges, and construction points.

When getting this property, the returned ObjectCollection can contain individual edges, sketch curves, sketch points, construction points, vertices, and ObjectCollection objects that represent a group of the curves and points listed above.

Can be set to null to remove any interior rails and points from the patch.
isGroupEdges Gets and sets if the edges in the boundary curve are treated as a group, and they all use the same continuity. If this property is True (which is the default), the continuity property controls the continuity for all edges. If this property is false; the continuity is set for each edge using the setContinuity method.

When this property is set to true, the continuity and weight of the first edge will be used for all edges. When set to false, each edge will initially have the same continuity and weight. This is typically set to false as a side-effect of calling the setContinuity 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets 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, an ObjectCollection, or a Path object.

If a single open sketch curve or B-Rep edge is input, Fusion will automatically find connected sketch curves or B-Rep edges to define a closed loop.

If an ObjectCollection is used as input, it must be a set of curves that define a closed shape.

If a Path is used as input, it must define a closed shape.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the 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.

Remarks

This property has been retired and replaced by either the groupContinuity property or setContinuity method, depending on if the isGroupEdges property is true or not.

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
Retired in version November 2022


PatchFeatureInput.creationOccurrence Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

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

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.getContinuity Method

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets the continuity used for each edge in the boundary.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

(returnValue, edges, continuity, weight, isContinuityDirectionFlipped) = patchFeatureInput_var.getContinuity()

#include <Fusion/Features/PatchFeatureInput.h

// Declare the output arguments.
BRepEdge[] edges;
integer[] continuity;
double[] weight;
boolean[] isContinuityDirectionFlipped;
boolean returnValue = patchFeatureInput_var->getContinuity(edges, continuity, weight, isContinuityDirectionFlipped);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
edges | BRepEdge[] | Output array containing all of the BRepEdge objects in the boundary.
continuity | integer[] | Output array the same size as the edges array that defines the continuity to apply to the edge in the same index in the edges array. The values are obtained from the SurfaceContinuityTypes enum and passed in as an integers.
weight | double[] | Output array the same size as the edges array that defines the weight applied to the edge in the same index in the edges array. If the continuity of an edge is ConnectedSurfaceContinuityType, the weight value should be ignored.
isContinuityDirectionFlipped | boolean[] | Output array the same size as the edges array that defines which of the two faces the edge connects to is used in computing the continuity direction. If the continuity is ConnectedSurfaceContinuityType or the edge is an open edge and only connected to a single face, the value should be ignored. If false, the face associated with the first co-edge returned by the edge is used.

Version

Introduced in version November 2022


PatchFeatureInput.groupContinuity Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets the type of surface continuity to use for all edges when the isGroupEdges property is true. The continuity is used to determine how the patch connects to any B-Rep edges in the boundary. It is ignored for any sketch curves in the boundary. The property defaults to ConnectedSurfaceContinuityType. The value of this property is ignored if the isGroupEdges property is false.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.groupContinuity

# Set the value of the property.
patchFeatureInput_var.groupContinuity = 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->groupContinuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = patchFeatureInput_var->groupContinuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


PatchFeatureInput.groupIsContinuityDirectionFlipped Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets the continuity direction for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to false. The value of this property is ignored if the isGroupEdges property is false.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.groupIsContinuityDirectionFlipped

# Set the value of the property.
patchFeatureInput_var.groupIsContinuityDirectionFlipped = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
boolean propertyValue = patchFeatureInput_var->groupIsContinuityDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patchFeatureInput_var->groupIsContinuityDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


PatchFeatureInput.groupWeight Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets the weight to use for all edges when the isGroupEdges property is true. It is ignored for any sketch curves in the boundary. The property defaults to 0.5. The value of this property is ignored if the isGroupEdges property is false.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.groupWeight

# Set the value of the property.
patchFeatureInput_var.groupWeight = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
double propertyValue = patchFeatureInput_var->groupWeight();

// Set the value of the property, where value_var is a double.
bool returnValue = patchFeatureInput_var->groupWeight(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


PatchFeatureInput.interiorRailsAndPoints Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets any interior curves or points the patch should fit through. Valid entities include object collections of connected curves, paths, sketch curves, sketch points, B-Rep edges, and construction points.

When getting this property, the returned ObjectCollection can contain individual edges, sketch curves, sketch points, construction points, vertices, and ObjectCollection objects that represent a group of the curves and points listed above.

Can be set to null to remove any interior rails and points from the patch.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.interiorRailsAndPoints

# Set the value of the property.
patchFeatureInput_var.interiorRailsAndPoints = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = patchFeatureInput_var->interiorRailsAndPoints();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = patchFeatureInput_var->interiorRailsAndPoints(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


PatchFeatureInput.isGroupEdges Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets if the edges in the boundary curve are treated as a group, and they all use the same continuity. If this property is True (which is the default), the continuity property controls the continuity for all edges. If this property is false; the continuity is set for each edge using the setContinuity method.

When this property is set to true, the continuity and weight of the first edge will be used for all edges. When set to false, each edge will initially have the same continuity and weight. This is typically set to false as a side-effect of calling the setContinuity method.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.isGroupEdges

# Set the value of the property.
patchFeatureInput_var.isGroupEdges = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
boolean propertyValue = patchFeatureInput_var->isGroupEdges();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patchFeatureInput_var->isGroupEdges(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


PatchFeatureInput.isValid Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Gets and sets the type of operation performed by the patch feature. Only 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are valid operations for patch features.

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.setContinuity Method

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

Description

Sets the continuity to use for each edge in the boundary. The arrays for the arguments correspond to B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges to know their order. This order applies to the arrays provided for the arguments.

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
returnValue = patchFeatureInput_var.setContinuity(continuity, weight, isContinuityDirectionFlipped)
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

#include <Fusion/Features/PatchFeatureInput.h>

returnValue = patchFeatureInput_var->setContinuity(continuity, weight, isContinuityDirectionFlipped);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
continuity | integer[] | An array whose size of the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The continuity array defines the type of continuity to apply to the edge at the same index. The values are obtained from the SurfaceContinuityTypes enum and passed in as an integer.
weight | double[] | An array whose size is the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The weight array defines the weight to apply to the edge at the same index. If the continuity of an edge is ConnectedSurfaceContinuityType, the weight value is ignored.
isContinuityDirectionFlipped | boolean[] | An array whose size is the number of B-Rep edges in the boundary. You can use the getContinuity method to get the list of edges, so you know the number and order of the edges. The isContinuityDirectionFlipped array defines which of the two faces the edge connects to and is used in computing the continuity direction. If the continuity is ConnectedSurfaceContinuityType, or the edge is an open edge and only connected to a single face, the value is ignored. If false, the face associated with the first co-edge returned by the edge is used.

Version

Introduced in version November 2022


PatchFeatureInput.targetBaseFeature Property

Parent Object: PatchFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Collection that provides access to all of the existing Patch features in a component and supports the ability to create new Patch features.

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 is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Creates a new patch feature.

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
patchFeatures.add | Demonstrates the patchFeatures.add method by creating a patch surface on the selected profile.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version July 2016


patchFeatures.add

Description

Demonstrates the patchFeatures.add method by creating a patch surface on the selected profile.

Code Samples

  • Python
def demo_patchFeatures_add(comp: adsk.fusion.Component):
    profile = _ui.selectEntity('Select a profile', 'Profiles').entity
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation

    patchFeatures = comp.features.patchFeatures
    input = patchFeatures.createInput(profile, operation)
    patchFeature = patchFeatures.add(input)


PatchFeatures.classType Method

Parent Object: PatchFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

The number of Patch features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Creates a PatchFeatureInput object. Use properties and methods on the returned PatchFeatureInput object to set other settings. The PatchFeatureInput object is used as input to the add method to create the patch feature.

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 fails.

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, an ObjectCollection, or a Path object. If a single sketch curve or B-Rep edge is an input that is not closed; Fusion will automatically find connected sketch curves or B-Rep edges to define a closed loop. If an ObjectCollection is an input, it must be a set of curves that define a closed shape. If a Path is an input, it must define a closed shape.
operation | FeatureOperations | The feature operation to perform. Only 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are valid operations for patch features.

Samples

Name | Description
patchFeatures.add | Demonstrates the patchFeatures.add method by creating a patch surface on the selected profile.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version July 2016


PatchFeatures.isValid Property

Parent Object: PatchFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Function that returns the specified patch feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

Function that returns the specified patch feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatchFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

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.

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 | 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.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.createPath, Path.create, Path.createForAssemblyContext, Path.nativeObject, PathEntity.parentPath, PathPatternFeature.path, PathPatternFeatureInput.path, PipeFeature.path, PipeFeatureInput.path, SweepFeature.guideRail, SweepFeature.path, SweepFeatureInput.guideRail, SweepFeatureInput.path

Version

Introduced in version November 2014


Path.addCurves Method

Parent Object: Path
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

This property is not supported for the Path object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

The number of curves in the path.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

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.

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.

Samples

Name | Description
pathPatternFeatures.add | Demonstrates the pathPatternFeatures.add method using a selected body and sketch curve as the path.

Version

Introduced in version July 2016


Path.createForAssemblyContext Method

Parent Object: Path
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

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.

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);

Return Value

Type | Description
Path | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence |

Version

Introduced in version November 2014


Path.isClosed Property

Parent Object: Path
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

Indicates if the path is closed or not. Returns True in the case of a closed path.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

Function that returns the specified PathEntity using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

This property is not supported for the Path object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/Path.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

The PathEntity object represents a curve within a path

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

This property is not supported for a PathEntity object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

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.

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);

Return Value

Type | Description
PathEntity | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence |

Version

Introduced in version November 2014


PathEntity.curve Property

Parent Object: PathEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

Property that gets the sketch curve or edge this entity was derived from.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

This property is not supported for a PathEntity object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathEntity.h>

Description

Property that returns the parent Path of the entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Object that represents an existing path pattern feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
distance | Gets the distance. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isFlipDirection Gets and sets if flip the direction from start point.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isOrientationAlongPath Gets and sets if the orientation is along path. If false, the orientation is identical.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
isSymmetric Gets and sets if the pattern is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
path Gets and sets the path to create the pattern on path.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
patternDistanceType Gets and sets how the distance between elements is computed.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
suppressedElementsIds Gets and sets the id's of the elements to suppress.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets the distance. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

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.entityToken Property

Parent Object: PathPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.entityToken
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
string propertyValue = pathPatternFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


PathPatternFeature.errorOrWarningMessage Property

Parent Object: PathPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets if flip the direction from start point.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets if the orientation is along path. If false, the orientation is identical.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets if the pattern is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets the path to create the pattern on path.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets how the distance between elements is computed.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets the PatternElements collection that contains the elements created by this pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets the quantity of the elements. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Get the features that were created for this mirror. Returns null in the case where the feature is parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Gets and sets the id's of the elements to suppress.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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<uinteger> propertyValue = pathPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = pathPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type uinteger.

Version

Introduced in version November 2014


PathPatternFeature.timelineObject Property

Parent Object: PathPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a path pattern feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets the distance.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets if flip the direction from start point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets if the orientation is along path. If false, the orientation is identical.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets if the pattern is in one direction or symmetric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets the path to create the pattern on path.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets how the distance between elements is computed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

Description

Gets and sets quantity of the elements.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

Creates a new path pattern feature.

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.

Samples

Name | Description
pathPatternFeatures.add | Demonstrates the pathPatternFeatures.add method using a selected body and sketch curve as the path.

Version

Introduced in version November 2014


pathPatternFeatures.add

Description

Demonstrates the pathPatternFeatures.add method using a selected body and sketch curve as the path.

Code Samples

  • Python
def demo_pathPatternFeatures_add(rootComp: adsk.fusion.Component):
    # Have the body to pattern and path curve selected.
    body = _ui.selectEntity('Select a body to pattern.', 'Bodies').entity
    path = adsk.fusion.Path.create(_ui.selectEntity('Select a curve', 'SketchCurves').entity, adsk.fusion.ChainedCurveOptions.tangentChainedCurves)

    # Define the required input.
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(body)
    quantity = adsk.core.ValueInput.createByReal(5)
    distance = adsk.core.ValueInput.createByReal(10)
    patternDistance = adsk.fusion.PatternDistanceType.SpacingPatternDistanceType

    patternFeatures = rootComp.features.pathPatternFeatures
    input = patternFeatures.createInput(bodies, path, quantity, distance, patternDistance)
    patternFeature = patternFeatures.add(input)


PathPatternFeatures.classType Method

Parent Object: PathPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

The number of path pattern features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

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.

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.

Samples

Name | Description
pathPatternFeatures.add | Demonstrates the pathPatternFeatures.add method using a selected body and sketch curve as the path.

Version

Introduced in version November 2014


PathPatternFeatures.isValid Property

Parent Object: PathPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

Function that returns the specified path pattern feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

Function that returns the specified path pattern feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PathPatternFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

This class defines the properties that pertain to the pattern element.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Gets the faces generated as a result of this particular element.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Gets the id of this element within the pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Gets and sets whether the element is suppressed or not. A value of True indicates it is suppressed

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Get the name of the pattern element.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

If the patternEntityType property of the parent feature returns OccurrencesPatternType then this property will return the occurrences associated with this particular pattern element.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

Description

Gets the feature pattern this element is a member of.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElement.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

Collection that provides access to pattern elements of mirror and pattern features.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CircularPatternFeature.patternElements, MirrorFeature.patternElements, PathPatternFeature.patternElements, RectangularPatternFeature.patternElements

Version

Introduced in version November 2014


PatternElements.classType Method

Parent Object: PatternElements
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

The number of pattern elements in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

Function that returns the specified pattern element using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PatternElements.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


PDFExportOptions Object

Derived from: DrawingExportOptions Object
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Defines the inputs needed to export the drawing as PDF.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
openPDF | Specifies that the PDF file will be opened after export.
sheetRange | Defines the range of sheets to export. This can be a string like "1-3" or "1-2,5" where you can define a range of sheets and also specific sheets. Setting this property will automatically set the sheetsToExport setting to SelectedPDFSheets.
sheetsToExport Defines which sheets to export. Defaults to AllPDFSheets which will create a single PDF file containing all sheets in the drawing.

the SelectedPDFSheets and CurrentPDFSheet options are dependent on the current selections in the user interface.

To set this to RangePDFSheets, use the sheetRange property to define the range of sheets to print.
useLineWeights | Specifies if line weights should be used in the exported PDF file.

Accessed From

DrawingExportManager.createPDFExportOptions

Version

Introduced in version December 2020


PDFExportOptions.classType Method

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.drawing.PDFExportOptions.classType()
This is a static method.

#include <Drawing/Drawing/PDFExportOptions.h>

returnValue = adsk::drawing::PDFExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


PDFExportOptions.filename Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Gets and sets the filename that the exported file will be written to.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.filename

# Set the value of the property.
pDFExportOptions_var.filename = propertyValue
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
string propertyValue = pDFExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = pDFExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2020


PDFExportOptions.isValid Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.isValid
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
boolean propertyValue = pDFExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


PDFExportOptions.objectType Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.objectType
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
string propertyValue = pDFExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


PDFExportOptions.openPDF Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Specifies that the PDF file will be opened after export.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.openPDF

# Set the value of the property.
pDFExportOptions_var.openPDF = propertyValue
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
boolean propertyValue = pDFExportOptions_var->openPDF();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pDFExportOptions_var->openPDF(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


PDFExportOptions.sheetRange Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Defines the range of sheets to export. This can be a string like "1-3" or "1-2,5" where you can define a range of sheets and also specific sheets. Setting this property will automatically set the sheetsToExport setting to SelectedPDFSheets.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.sheetRange

# Set the value of the property.
pDFExportOptions_var.sheetRange = propertyValue
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
string propertyValue = pDFExportOptions_var->sheetRange();

// Set the value of the property, where value_var is a string.
bool returnValue = pDFExportOptions_var->sheetRange(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2020


PDFExportOptions.sheetsToExport Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Defines which sheets to export. Defaults to AllPDFSheets which will create a single PDF file containing all sheets in the drawing.

the SelectedPDFSheets and CurrentPDFSheet options are dependent on the current selections in the user interface.

To set this to RangePDFSheets, use the sheetRange property to define the range of sheets to print.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.sheetsToExport

# Set the value of the property.
pDFExportOptions_var.sheetsToExport = propertyValue
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
PDFSheetsExport propertyValue = pDFExportOptions_var->sheetsToExport();

// Set the value of the property, where value_var is a PDFSheetsExport.
bool returnValue = pDFExportOptions_var->sheetsToExport(value_var);

Property Value

This is a read/write property whose value is a PDFSheetsExport.

Version

Introduced in version December 2020


PDFExportOptions.useLineWeights Property

Parent Object: PDFExportOptions
Defined in namespace "adsk::drawing" and the header file is <Drawing/Drawing/PDFExportOptions.h>

Description

Specifies if line weights should be used in the exported PDF file.

Syntax

  • Python
  • C++
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.

# Get the value of the property.
propertyValue = pDFExportOptions_var.useLineWeights

# Set the value of the property.
pDFExportOptions_var.useLineWeights = propertyValue
"pDFExportOptions_var" is a variable referencing a PDFExportOptions object.
#include <Drawing/Drawing/PDFExportOptions.h>

// Get the value of the property.
boolean propertyValue = pDFExportOptions_var->useLineWeights();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pDFExportOptions_var->useLineWeights(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


PerpendicularConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

A perpendicular constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: PerpendicularConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.entityToken
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
string propertyValue = perpendicularConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


PerpendicularConstraint.isDeletable Property

Parent Object: PerpendicularConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Returns the first line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Returns the second line.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularConstraint.h>

Description

Returns the parent sketch object.

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


PerpendicularToSurfaceConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

A sketch constraint defining that a curve is perpendicular to a face or construction plane. Line and spline curves are supported.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
curve | Returns the SketchCurve object that is constrained.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
surface | Returns the BRepFace or ConstructionPlane the line is constrained to be perpendicular to.

Accessed From

GeometricConstraints.addPerpendicularToSurface, PerpendicularToSurfaceConstraint.createForAssemblyContext, PerpendicularToSurfaceConstraint.nativeObject

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.assemblyContext Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.assemblyContext
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = perpendicularToSurfaceConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.attributes Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.attributes
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = perpendicularToSurfaceConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.classType Method

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PerpendicularToSurfaceConstraint.classType()
This is a static method.

#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

returnValue = adsk::fusion::PerpendicularToSurfaceConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.createForAssemblyContext Method

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
returnValue = perpendicularToSurfaceConstraint_var.createForAssemblyContext(occurrence)
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

returnValue = perpendicularToSurfaceConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
PerpendicularToSurfaceConstraint | 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 2023


PerpendicularToSurfaceConstraint.curve Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Returns the SketchCurve object that is constrained.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.curve
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = perpendicularToSurfaceConstraint_var->curve();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.deleteMe Method

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
returnValue = perpendicularToSurfaceConstraint_var.deleteMe()
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

returnValue = perpendicularToSurfaceConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.entityToken Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.entityToken
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = perpendicularToSurfaceConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.isDeletable Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Indicates if this constraint is deletable.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.isDeletable
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = perpendicularToSurfaceConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.isValid Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.isValid
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
boolean propertyValue = perpendicularToSurfaceConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.nativeObject Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

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.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.nativeObject
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<PerpendicularToSurfaceConstraint> propertyValue = perpendicularToSurfaceConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a PerpendicularToSurfaceConstraint.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.objectType Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.objectType
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
string propertyValue = perpendicularToSurfaceConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.parentSketch Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.parentSketch
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = perpendicularToSurfaceConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


PerpendicularToSurfaceConstraint.surface Property

Parent Object: PerpendicularToSurfaceConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

Description

Returns the BRepFace or ConstructionPlane the line is constrained to be perpendicular to.

Syntax

  • Python
  • C++
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.

# Get the value of the property.
propertyValue = perpendicularToSurfaceConstraint_var.surface
"perpendicularToSurfaceConstraint_var" is a variable referencing a PerpendicularToSurfaceConstraint object.
#include <Fusion/Sketch/PerpendicularToSurfaceConstraint.h>

// Get the value of the property.
Ptr<Base> propertyValue = perpendicularToSurfaceConstraint_var->surface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


PersonalUseLimits Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Object that provides information about file limits associated with a "Fusion for Personal Use license".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
editableFileCount | Returns the current number of documents that are set by the user to be editable.
editableFiles | Returns a list of the DataFile objects that have been set by the user to be editable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxEditableFileCount | Returns the maximum number of documents that can be set by the user to be editable.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Data.personalUseLimits

Version

Introduced in version May 2021


PersonalUseLimits.classType Method

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.PersonalUseLimits.classType()
This is a static method.

#include <Core/Dashboard/PersonalUseLimits.h>

returnValue = adsk::core::PersonalUseLimits::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2021


PersonalUseLimits.editableFileCount Property

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Returns the current number of documents that are set by the user to be editable.

Syntax

  • Python
  • C++
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.

# Get the value of the property.
propertyValue = personalUseLimits_var.editableFileCount
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.
#include <Core/Dashboard/PersonalUseLimits.h>

// Get the value of the property.
integer propertyValue = personalUseLimits_var->editableFileCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2021


PersonalUseLimits.editableFiles Property

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Returns a list of the DataFile objects that have been set by the user to be editable.

Syntax

  • Python
  • C++
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.

# Get the value of the property.
propertyValue = personalUseLimits_var.editableFiles
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.
#include <Core/Dashboard/PersonalUseLimits.h>

// Get the value of the property.
std::vector<Ptr<DataFile>> propertyValue = personalUseLimits_var->editableFiles();

Property Value

This is a read only property whose value is an array of type DataFile.

Version

Introduced in version May 2021


PersonalUseLimits.isValid Property

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.

# Get the value of the property.
propertyValue = personalUseLimits_var.isValid
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.
#include <Core/Dashboard/PersonalUseLimits.h>

// Get the value of the property.
boolean propertyValue = personalUseLimits_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2021


PersonalUseLimits.maxEditableFileCount Property

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

Returns the maximum number of documents that can be set by the user to be editable.

Syntax

  • Python
  • C++
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.

# Get the value of the property.
propertyValue = personalUseLimits_var.maxEditableFileCount
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.
#include <Core/Dashboard/PersonalUseLimits.h>

// Get the value of the property.
integer propertyValue = personalUseLimits_var->maxEditableFileCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2021


PersonalUseLimits.objectType Property

Parent Object: PersonalUseLimits
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/PersonalUseLimits.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.

# Get the value of the property.
propertyValue = personalUseLimits_var.objectType
"personalUseLimits_var" is a variable referencing a PersonalUseLimits object.
#include <Core/Dashboard/PersonalUseLimits.h>

// Get the value of the property.
string propertyValue = personalUseLimits_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2021


PhysicalProperties Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

The physical properties of a Component, Occurrence or BRepBody

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
volume | Gets the volume in the cubic centimeters.

Accessed From

BRepBody.getPhysicalProperties, BRepBody.physicalProperties, Component.getPhysicalProperties, Component.physicalProperties, Design.physicalProperties, FlatPatternComponent.getPhysicalProperties, FlatPatternComponent.physicalProperties, FlatPatternProduct.physicalProperties, Occurrence.getPhysicalProperties, Occurrence.physicalProperties, WorkingModel.physicalProperties

Samples

Name | Description
Get Physical Properties API Sample | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


PhysicalProperties.accuracy Property

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Returns the accuracy that was used for the calculation.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.area Property

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Gets the area in square centimeters.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


PhysicalProperties.centerOfMass Property

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Returns the center of mass position

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.classType Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Gets the density in kilograms per cubic centimeter.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


PhysicalProperties.getPrincipalAxes Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Method that returns the principal axes.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.getPrincipalMomentsOfInertia Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Method that returns the moments of inertia about the principal axes. Unit for returned values is kg*cm^2.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.getRadiusOfGyration Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.getRotationToPrincipal Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Gets the rotation from the world coordinate system of the target to the principal coordinate system.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.getXYZMomentsOfInertia Method

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Method that gets the moment of inertia about the world coordinate system. Unit for returned values is kg*cm^2.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version May 2016


PhysicalProperties.isValid Property

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Gets the mass in kilograms.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


PhysicalProperties.objectType Property

Parent Object: PhysicalProperties
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>

Description

Gets the volume in the cubic centimeters.

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 | Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

Version

Introduced in version September 2015


PinSlotJointMotion Object

Derived from: JointMotion Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Represents the set of information specific to a pin slot joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion

Version

Introduced in version July 2015


PinSlotJointMotion.classType Method

Parent Object: PinSlotJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Pin Slot Joint Motion API Sample | Demonstrates creating a joint with pin slot joint motion

Version

Introduced in version July 2015


PinSlotJointMotion.rotationValue Property

Parent Object: PinSlotJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PinSlotJointMotion.h>

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Object that represents an existing pipe feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
setThickness | Defines the section thickness of the Pipe. In case the pipe is not already hollow, this also sets the isHollow to 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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
distanceOne Gets the distance for the pipe created while following the path given as input, in the same order.

If the path is open, this value returns the length of Pipe relative to the length of the path. If the path is closed, this value returns the length of the Pipe from the start point going along the curves. Ex: Path is made of curves A-B-C-A. The distanceOne returns the length of the pipe going from A-B-C-A.

This property returns null in the case where the feature is non-parametric.
distanceTwo Gets the distance for the pipe created while following the reversed path given as input.

If the path is open, getting this value returns null, and setting the value is ignored. If the path is closed, this value returns the length of the Pipe from the start point going in the reverse order of the path. Ex: Path is made of curves A-B-C-A. The distanceTwo returns the length of the pipe going from A-C-B-A.

This property returns null in the case where the feature is non-parametric.
endFaces | Property that returns the set of faces that cap one end of the Pipe 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 Pipe 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 null.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isHollow Specifies if the Pipe is hollow or not.

Setting this to true will default the sectionThickness to 0.1 cm.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation | Gets and sets the type of operation performed by the Pipe.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
path Gets and sets the path to create the Pipe. This property returns null in the case where the feature is non-parametric. The path can be either closed (you can reach again the starting point by following the curves) or open (the starting point and end point are different in the path).

The starting point of the Pipe will be the starting point of the first curve in the Path, regardless of it being open or closed. When the desired Pipe has a section that includes the starting point and the path is closed, the curves should be shifted in a circular pattern.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
sectionSize | Gets and sets the section size of the Pipe.
sectionThickness Gets the section thickness of the Pipe.

If the pipe is not hollow, this will return null.
sectionType | Gets and sets the section type of the Pipe. The type can be: Circular, Square, Triangular.
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 faces that cap one end of the Pipe that are coincident with the sketch plane. In the cases where there aren't any start faces this property will return null.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

PipeFeature.createForAssemblyContext, PipeFeature.nativeObject, PipeFeatures.add, PipeFeatures.item, PipeFeatures.itemByName

Version

Introduced in version September 2015


PipeFeature.assemblyContext Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.createForAssemblyContext Method

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.
returnValue = pipeFeature_var.createForAssemblyContext(occurrence)
"pipeFeature_var" is a variable referencing a PipeFeature object.

#include <Fusion/Features/PipeFeature.h>

returnValue = pipeFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
PipeFeature | 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 October 2023


PipeFeature.deleteMe Method

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

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.distanceOne Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets the distance for the pipe created while following the path given as input, in the same order.

If the path is open, this value returns the length of Pipe relative to the length of the path. If the path is closed, this value returns the length of the Pipe from the start point going along the curves. Ex: Path is made of curves A-B-C-A. The distanceOne returns the length of the pipe going from A-B-C-A.

This property returns null in the case where the feature is non-parametric.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.distanceOne
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pipeFeature_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2023


PipeFeature.distanceTwo Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets the distance for the pipe created while following the reversed path given as input.

If the path is open, getting this value returns null, and setting the value is ignored. If the path is closed, this value returns the length of the Pipe from the start point going in the reverse order of the path. Ex: Path is made of curves A-B-C-A. The distanceTwo returns the length of the pipe going from A-C-B-A.

This property returns null in the case where the feature is non-parametric.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.distanceTwo
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pipeFeature_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2023


PipeFeature.endFaces Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Property that returns the set of faces that cap one end of the Pipe 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 Pipe 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 null.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.endFaces
"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->endFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2023


PipeFeature.entityToken Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.entityToken
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
string propertyValue = pipeFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


PipeFeature.errorOrWarningMessage Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the current health state of the feature.

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.isHollow Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Specifies if the Pipe is hollow or not.

Setting this to true will default the sectionThickness to 0.1 cm.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.isHollow

# Set the value of the property.
pipeFeature_var.isHollow = 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->isHollow();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pipeFeature_var->isHollow(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


PipeFeature.isParametric Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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.nativeObject Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

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.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.nativeObject
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<PipeFeature> propertyValue = pipeFeature_var->nativeObject();

Property Value

This is a read only property whose value is a PipeFeature.

Version

Introduced in version October 2023


PipeFeature.objectType Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.operation Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets the type of operation performed by the Pipe.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.operation

# Set the value of the property.
pipeFeature_var.operation = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = pipeFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = pipeFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version October 2023


PipeFeature.parentComponent Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the parent component that owns this feature.

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.participantBodies Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.participantBodies

# Set the value of the property.
pipeFeature_var.participantBodies = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = pipeFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = pipeFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version October 2023


PipeFeature.path Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets the path to create the Pipe. This property returns null in the case where the feature is non-parametric. The path can be either closed (you can reach again the starting point by following the curves) or open (the starting point and end point are different in the path).

The starting point of the Pipe will be the starting point of the first curve in the Path, regardless of it being open or closed. When the desired Pipe has a section that includes the starting point and the path is closed, the curves should be shifted in a circular pattern.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.path

# Set the value of the property.
pipeFeature_var.path = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<Path> propertyValue = pipeFeature_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = pipeFeature_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version October 2023


PipeFeature.sectionSize Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets the section size of the Pipe.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.sectionSize
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pipeFeature_var->sectionSize();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2023


PipeFeature.sectionThickness Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets the section thickness of the Pipe.

If the pipe is not hollow, this will return null.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.sectionThickness
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pipeFeature_var->sectionThickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version October 2023


PipeFeature.sectionType Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Gets and sets the section type of the Pipe. The type can be: Circular, Square, Triangular.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.sectionType

# Set the value of the property.
pipeFeature_var.sectionType = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
PipeSectionTypes propertyValue = pipeFeature_var->sectionType();

// Set the value of the property, where value_var is a PipeSectionTypes.
bool returnValue = pipeFeature_var->sectionType(value_var);

Property Value

This is a read/write property whose value is a PipeSectionTypes.

Version

Introduced in version October 2023


PipeFeature.setThickness Method

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Defines the section thickness of the Pipe.

In case the pipe is not already hollow, this also sets the isHollow to true.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.
returnValue = pipeFeature_var.setThickness(value)
"pipeFeature_var" is a variable referencing a PipeFeature object.

#include <Fusion/Features/PipeFeature.h>

returnValue = pipeFeature_var->setThickness(value);

Parameters

Name | Type | Description
value | ValueInput |

Version

Introduced in version October 2023


PipeFeature.sideFaces Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Property that returns a object that provides access to all of the faces created around the perimeter of the feature.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.sideFaces
"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->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2023


PipeFeature.startFaces Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Property that returns the set of faces that cap one end of the Pipe that are coincident with the sketch plane. In the cases where there aren't any start faces this property will return null.

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.startFaces
"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->startFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version October 2023


PipeFeature.timelineObject Property

Parent Object: PipeFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeature.h>

Description

Returns the timeline object associated with this feature.

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


PipeFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a Pipe feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Pipe is created based on geometry (e.g. a path) in another component AND (the Pipe) 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 pipe created while following the path given as input, in the same order. This value defaults to 1.0 if not set.

If the path is open, setting this to a value between 0.0 and 1.0 decides the length of the created Pipe. If the path is closed, setting this value should not be higher than 1.0 - distanceTwo. Ex: Path is made of curves A-B-C-A. The distanceOne returns and sets the length of the pipe going from A-B-C-A.

This property returns null in the case where the feature is non-parametric.
distanceTwo Gets and sets the distance for the pipe created while following the reversed path given as input. Before setting this value, distanceOne must be set.

If the path is open, getting this value returns null, and setting the value is ignored. If the path is closed, setting this value should not be higher than 1.0 - distanceOne. Ex: Path is made of curves A-B-C-A. The distanceTwo returns and sets the length of the pipe going from A-C-B-A.

This property returns null in the case where the feature is non-parametric.
isHollow Specifies if the Pipe is hollow or not.

Setting this to true will default the sectionThickness to 0.1 cm.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation | Gets and sets the type of operation performed by the Pipe.
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 Pipe.
sectionSize | Gets and sets the section size of the Pipe.
sectionThickness Gets and sets the section thickness of the Pipe.

Setting this will also set the isHollow setting to true.
sectionType | Gets and sets the section type of the Pipe. The type can be: Circular, Square, Triangular.
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

PipeFeatures.createInput

Version

Introduced in version October 2023


PipeFeatureInput.classType Method

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PipeFeatureInput.classType()
This is a static method.

#include <Fusion/Features/PipeFeatureInput.h>

returnValue = adsk::fusion::PipeFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


PipeFeatureInput.creationOccurrence Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Pipe is created based on geometry (e.g. a path) in another component AND (the Pipe) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.creationOccurrence

# Set the value of the property.
pipeFeatureInput_var.creationOccurrence = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = pipeFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = pipeFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version October 2023


PipeFeatureInput.distanceOne Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the distance for the pipe created while following the path given as input, in the same order. This value defaults to 1.0 if not set.

If the path is open, setting this to a value between 0.0 and 1.0 decides the length of the created Pipe. If the path is closed, setting this value should not be higher than 1.0 - distanceTwo. Ex: Path is made of curves A-B-C-A. The distanceOne returns and sets the length of the pipe going from A-B-C-A.

This property returns null in the case where the feature is non-parametric.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.distanceOne

# Set the value of the property.
pipeFeatureInput_var.distanceOne = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pipeFeatureInput_var->distanceOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pipeFeatureInput_var->distanceOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2023


PipeFeatureInput.distanceTwo Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the distance for the pipe created while following the reversed path given as input. Before setting this value, distanceOne must be set.

If the path is open, getting this value returns null, and setting the value is ignored. If the path is closed, setting this value should not be higher than 1.0 - distanceOne. Ex: Path is made of curves A-B-C-A. The distanceTwo returns and sets the length of the pipe going from A-C-B-A.

This property returns null in the case where the feature is non-parametric.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.distanceTwo

# Set the value of the property.
pipeFeatureInput_var.distanceTwo = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pipeFeatureInput_var->distanceTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pipeFeatureInput_var->distanceTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2023


PipeFeatureInput.isHollow Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Specifies if the Pipe is hollow or not.

Setting this to true will default the sectionThickness to 0.1 cm.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.isHollow

# Set the value of the property.
pipeFeatureInput_var.isHollow = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pipeFeatureInput_var->isHollow();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pipeFeatureInput_var->isHollow(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


PipeFeatureInput.isValid Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.isValid
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pipeFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


PipeFeatureInput.objectType Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.objectType
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
string propertyValue = pipeFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


PipeFeatureInput.operation Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the type of operation performed by the Pipe.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.operation

# Set the value of the property.
pipeFeatureInput_var.operation = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = pipeFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = pipeFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version October 2023


PipeFeatureInput.participantBodies Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

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.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.participantBodies

# Set the value of the property.
pipeFeatureInput_var.participantBodies = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = pipeFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = pipeFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version October 2023


PipeFeatureInput.path Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the path to create the Pipe.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.path

# Set the value of the property.
pipeFeatureInput_var.path = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<Path> propertyValue = pipeFeatureInput_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = pipeFeatureInput_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version October 2023


PipeFeatureInput.sectionSize Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the section size of the Pipe.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.sectionSize

# Set the value of the property.
pipeFeatureInput_var.sectionSize = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pipeFeatureInput_var->sectionSize();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pipeFeatureInput_var->sectionSize(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2023


PipeFeatureInput.sectionThickness Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the section thickness of the Pipe.

Setting this will also set the isHollow setting to true.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.sectionThickness

# Set the value of the property.
pipeFeatureInput_var.sectionThickness = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pipeFeatureInput_var->sectionThickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pipeFeatureInput_var->sectionThickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version October 2023


PipeFeatureInput.sectionType Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

Description

Gets and sets the section type of the Pipe. The type can be: Circular, Square, Triangular.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.sectionType

# Set the value of the property.
pipeFeatureInput_var.sectionType = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
PipeSectionTypes propertyValue = pipeFeatureInput_var->sectionType();

// Set the value of the property, where value_var is a PipeSectionTypes.
bool returnValue = pipeFeatureInput_var->sectionType(value_var);

Property Value

This is a read/write property whose value is a PipeSectionTypes.

Version

Introduced in version October 2023


PipeFeatureInput.targetBaseFeature Property

Parent Object: PipeFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatureInput.h>

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.

Syntax

  • Python
  • C++
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.

# Get the value of the property.
propertyValue = pipeFeatureInput_var.targetBaseFeature

# Set the value of the property.
pipeFeatureInput_var.targetBaseFeature = propertyValue
"pipeFeatureInput_var" is a variable referencing a PipeFeatureInput object.
#include <Fusion/Features/PipeFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = pipeFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = pipeFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version October 2023


PipeFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Collection that provides access to all of the existing Pipe features in a design.

Methods

Name | Description
add | Creates a new Pipe 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 PipeFeatureInput object for defining a simple Pipe feature with only a path. Use properties and methods on this object to define the Pipe you want to create and then use the Add method, passing in the PipeFeatureInput object.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.pipeFeatures

Version

Introduced in version September 2015


PipeFeatures.add Method

Parent Object: PipeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Creates a new Pipe feature.

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
returnValue = pipeFeatures_var.add(input)
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

#include <Fusion/Features/PipeFeatures.h>

returnValue = pipeFeatures_var->add(input);

Return Value

Type | Description
PipeFeature | Returns the newly created PipeFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | PipeFeatureInput | A PipeFeatureInput object that defines the desired Pipe. Use the createInput method to create a new PipeFeatureInput object and then use methods on it (the PipeFeatureInput object) to define the Pipe.

Version

Introduced in version October 2023


PipeFeatures.classType Method

Parent Object: PipeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

The number of Pipe features in the collection.

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.createInput Method

Parent Object: PipeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Creates a PipeFeatureInput object for defining a simple Pipe feature with only a path. Use properties and methods on this object to define the Pipe you want to create and then use the Add method, passing in the PipeFeatureInput object.

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
returnValue = pipeFeatures_var.createInput(path, operation)
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

#include <Fusion/Features/PipeFeatures.h>

returnValue = pipeFeatures_var->createInput(path, operation);

Return Value

Type | Description
PipeFeatureInput | Returns the newly created PipeFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
path | Path | The path to create the Pipe.
operation | FeatureOperations | The feature operation to perform.

Version

Introduced in version October 2023


PipeFeatures.isValid Property

Parent Object: PipeFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Function that returns the specified Pipe feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

Function that returns the specified Pipe feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PipeFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

Represents the set of information specific to a planar joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Planar Joint Motion API Sample | Demonstrates creating a joint with planar joint motion

Version

Introduced in version July 2015


PlanarJointMotion.classType Method

Parent Object: PlanarJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Planar Joint Motion API Sample | Demonstrates creating a joint with planar joint motion

Version

Introduced in version July 2015


PlanarJointMotion.rotationValue Property

Parent Object: PlanarJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/PlanarJointMotion.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Canvas.plane, CanvasInput.plane, 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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Creates and returns an independent copy of this Plane object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Creates a transient plane object by specifying an origin and a normal direction.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Creates a transient plane object by specifying an origin along with U and V directions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Intersect this plane with a curve to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Creates a 3D point at the intersection of this plane and a line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Creates an infinite line at the intersection of this plane with another plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Intersect this plane with a surface to get the intersection point(s).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Checks if this plane is coplanar with another plane.

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 co-planarity.

Version

Introduced in version August 2014


Plane.isParallelToLine Method

Parent Object: Plane
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Checks if this plane is parallel to a line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Checks if this plane is parallel to another plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Checks if this plane is perpendicular to a line.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Checks if this plane is perpendicular to another plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Gets and sets the normal of the plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Gets and sets the origin point of the plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Sets the U and V directions of the plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Gets the U Direction of the plane.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Plane.h>

Description

Gets the V Direction of the plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned on a plane and at a distance from one or two edges.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

The first of 2 edges the hole position is measured from. OffsetOne provides access to the model parameter controlling the offset distance.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

Returns the model parameter controlling the distance from the center of the hole to EdgeOne.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

Description

Returns the plane that defines the orientation and start of the hole.

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


PlasticRule Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

A plastic rule.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 rule from the design or library. If the rule is in the library and set as the default rule, you cannot delete it. If the rule is in a design and is used by a component you cannot delete it.

Properties

Name | Description
clearance | The clearance used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
draftAngle | The draft angle used for plastic features. When using a float to set the value, it is defined in radians. When using a string to set the expression it uses degrees.
isDefault | This gets and sets which rule in a library is the default rule. This is only valid for rules in a library and will fail for rules in a design.
isUsed | Indicates if this rule is currently being used by a component. This is only valid for rules in a design.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
knifeEdgeThreshold The minimal thickness where an edge is considered a knife edge. This is used by the Design Advice command when analyzing the part for manufacturability.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
material | Gets and sets the material assigned to this plastic rule
maximumThickness | The maximum thickness of the part in centimeters. This is used by the Design Advice command when analyzing the part for manufacturability.
minimumDraftAngle | The minimum draft angle allowed in radians. This is used by the Design Advice command when analyzing the part for manufacturability.
minimumThickness | The minimum thickness of the part in centimeters. This is used by the Design Advice command when analyzing the part for manufacturability.
name | The name of the plastic rule. When setting the name, it must be unique with respect to other plastic rules in the design or library.
nominalRadius | The nominal radius used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentDesign | Returns the parent design for a plastic rule in a design or it returns null if the plastic rule is in the library.
revealHeight | The reveal height used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
thickness The thickness used for plastic features. This value must be within the range specified by the minimumThickness and maximumThickness properties. This is used by the plastic commands when a wall thickness is needed.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
thicknessVariation The maximum thickness of the part. This is used by the Design Advice command when analyzing the part for manufacturability.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.
units | Gets the units this rule uses to display values in the dialog. Rules currently only use mm or inch and the units are permanently associated with a rule and cannot be modified.

Accessed From

ConfigurationPlasticRuleCell.plasticRule, PlasticRules.addByCopy, PlasticRules.item, PlasticRules.itemByName

Version

Introduced in version January 2024


PlasticRule.classType Method

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PlasticRule.classType()
This is a static method.

#include <Fusion/Plastic/PlasticRule.h>

returnValue = adsk::fusion::PlasticRule::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


PlasticRule.clearance Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The clearance used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.clearance
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->clearance();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.deleteMe Method

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Deletes the rule from the design or library. If the rule is in the library and set as the default rule, you cannot delete it. If the rule is in a design and is used by a component you cannot delete it.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.
returnValue = plasticRule_var.deleteMe()
"plasticRule_var" is a variable referencing a PlasticRule object.

#include <Fusion/Plastic/PlasticRule.h>

returnValue = plasticRule_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2024


PlasticRule.draftAngle Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The draft angle used for plastic features. When using a float to set the value, it is defined in radians. When using a string to set the expression it uses degrees.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.draftAngle
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->draftAngle();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.isDefault Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

This gets and sets which rule in a library is the default rule. This is only valid for rules in a library and will fail for rules in a design.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.isDefault

# Set the value of the property.
plasticRule_var.isDefault = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
boolean propertyValue = plasticRule_var->isDefault();

// Set the value of the property, where value_var is a boolean.
bool returnValue = plasticRule_var->isDefault(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


PlasticRule.isUsed Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Indicates if this rule is currently being used by a component. This is only valid for rules in a design.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.isUsed
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
boolean propertyValue = plasticRule_var->isUsed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PlasticRule.isValid Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.isValid
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
boolean propertyValue = plasticRule_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PlasticRule.knifeEdgeThreshold Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The minimal thickness where an edge is considered a knife edge. This is used by the Design Advice command when analyzing the part for manufacturability.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.knifeEdgeThreshold
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->knifeEdgeThreshold();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.material Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Gets and sets the material assigned to this plastic rule

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.material

# Set the value of the property.
plasticRule_var.material = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<Material> propertyValue = plasticRule_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = plasticRule_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version January 2024


PlasticRule.maximumThickness Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The maximum thickness of the part in centimeters. This is used by the Design Advice command when analyzing the part for manufacturability.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.maximumThickness

# Set the value of the property.
plasticRule_var.maximumThickness = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
double propertyValue = plasticRule_var->maximumThickness();

// Set the value of the property, where value_var is a double.
bool returnValue = plasticRule_var->maximumThickness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2024


PlasticRule.minimumDraftAngle Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The minimum draft angle allowed in radians. This is used by the Design Advice command when analyzing the part for manufacturability.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.minimumDraftAngle

# Set the value of the property.
plasticRule_var.minimumDraftAngle = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
double propertyValue = plasticRule_var->minimumDraftAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = plasticRule_var->minimumDraftAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2024


PlasticRule.minimumThickness Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The minimum thickness of the part in centimeters. This is used by the Design Advice command when analyzing the part for manufacturability.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.minimumThickness

# Set the value of the property.
plasticRule_var.minimumThickness = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
double propertyValue = plasticRule_var->minimumThickness();

// Set the value of the property, where value_var is a double.
bool returnValue = plasticRule_var->minimumThickness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2024


PlasticRule.name Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The name of the plastic rule. When setting the name, it must be unique with respect to other plastic rules in the design or library.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.name

# Set the value of the property.
plasticRule_var.name = propertyValue
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
string propertyValue = plasticRule_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = plasticRule_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


PlasticRule.nominalRadius Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The nominal radius used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.nominalRadius
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->nominalRadius();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.objectType Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.objectType
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
string propertyValue = plasticRule_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


PlasticRule.parentDesign Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Returns the parent design for a plastic rule in a design or it returns null if the plastic rule is in the library.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.parentDesign
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<Design> propertyValue = plasticRule_var->parentDesign();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version January 2024


PlasticRule.revealHeight Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The reveal height used for plastic features. When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.revealHeight
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->revealHeight();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.thickness Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The thickness used for plastic features. This value must be within the range specified by the minimumThickness and maximumThickness properties. This is used by the plastic commands when a wall thickness is needed.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.thickness
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->thickness();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.thicknessVariation Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

The maximum thickness of the part. This is used by the Design Advice command when analyzing the part for manufacturability.

When using a float to set the value, it is defined in centimeters. When using a string to set the expression, the units can be defined as part of the expression or it defaults to the units associated with the rule if no units are specified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.thicknessVariation
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
Ptr<PlasticRuleValue> propertyValue = plasticRule_var->thicknessVariation();

Property Value

This is a read only property whose value is a PlasticRuleValue.

Version

Introduced in version January 2024


PlasticRule.units Property

Parent Object: PlasticRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRule.h>

Description

Gets the units this rule uses to display values in the dialog. Rules currently only use mm or inch and the units are permanently associated with a rule and cannot be modified.

Syntax

  • Python
  • C++
"plasticRule_var" is a variable referencing a PlasticRule object.

# Get the value of the property.
propertyValue = plasticRule_var.units
"plasticRule_var" is a variable referencing a PlasticRule object.
#include <Fusion/Plastic/PlasticRule.h>

// Get the value of the property.
string propertyValue = plasticRule_var->units();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


PlasticRules Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

A collection of plastic rules.

Methods

Name | Description
addByCopy | Creates a new plastic rule by copying an existing rule. The new rule can then be edited to define the rule characteristics you want.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 plastic rule using an index into the collection.
itemByName | Function that returns the specified plastic rule using the name of the rule.

Properties

Name | Description
count | The number of plastic rules 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.designPlasticRules, Design.libraryPlasticRules, FlatPatternProduct.designPlasticRules, FlatPatternProduct.libraryPlasticRules, WorkingModel.designPlasticRules, WorkingModel.libraryPlasticRules

Version

Introduced in version January 2024


PlasticRules.addByCopy Method

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

Creates a new plastic rule by copying an existing rule. The new rule can then be edited to define the rule characteristics you want.

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.
returnValue = plasticRules_var.addByCopy(existingPlasticRule, name)
"plasticRules_var" is a variable referencing a PlasticRules object.

#include <Fusion/Plastic/PlasticRules.h>

returnValue = plasticRules_var->addByCopy(existingPlasticRule, name);

Return Value

Type | Description
PlasticRule | Returns the new PlasticRule object or will assert in the case where it fails.

Parameters

Name | Type | Description
existingPlasticRule | PlasticRule | The existing PlasticRule object you want to copy. This can be a rule from the library or the design.
name | string | The name to assign to the new plastic rule. This name must be unique with respect to other plastic rules in the design or library it's created in.

Version

Introduced in version January 2024


PlasticRules.classType Method

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PlasticRules.classType()
This is a static method.

#include <Fusion/Plastic/PlasticRules.h>

returnValue = adsk::fusion::PlasticRules::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


PlasticRules.count Property

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

The number of plastic rules in the collection.

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.

# Get the value of the property.
propertyValue = plasticRules_var.count
"plasticRules_var" is a variable referencing a PlasticRules object.
#include <Fusion/Plastic/PlasticRules.h>

// Get the value of the property.
uinteger propertyValue = plasticRules_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


PlasticRules.isValid Property

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.

# Get the value of the property.
propertyValue = plasticRules_var.isValid
"plasticRules_var" is a variable referencing a PlasticRules object.
#include <Fusion/Plastic/PlasticRules.h>

// Get the value of the property.
boolean propertyValue = plasticRules_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PlasticRules.item Method

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

Function that returns the specified plastic rule using an index into the collection.

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.
returnValue = plasticRules_var.item(index)
"plasticRules_var" is a variable referencing a PlasticRules object.

#include <Fusion/Plastic/PlasticRules.h>

returnValue = plasticRules_var->item(index);

Return Value

Type | Description
PlasticRule | 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 2024


PlasticRules.itemByName Method

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

Function that returns the specified plastic rule using the name of the rule.

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.
returnValue = plasticRules_var.itemByName(name)
"plasticRules_var" is a variable referencing a PlasticRules object.

#include <Fusion/Plastic/PlasticRules.h>

returnValue = plasticRules_var->itemByName(name);

Return Value

Type | Description
PlasticRule | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the rule within the collection to return. This is the name seen in the Plastic Rules dialog.

Version

Introduced in version January 2024


PlasticRules.objectType Property

Parent Object: PlasticRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRules.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"plasticRules_var" is a variable referencing a PlasticRules object.

# Get the value of the property.
propertyValue = plasticRules_var.objectType
"plasticRules_var" is a variable referencing a PlasticRules object.
#include <Fusion/Plastic/PlasticRules.h>

// Get the value of the property.
string propertyValue = plasticRules_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


PlasticRuleValue Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

Used to get and set the current value associated with a plastic rule. A value can be gotten or set using a string or a double. A string can contain equations and unit specifiers, whereas a double defines the size in centimeters. In the user interface, the user is always setting the string expression. However, when programming, it is typically more convenient to set it using an explicit value. When the value is set using a double, Fusion creates an equivalent expression.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
expression | Gets and sets the expression of the plastic rule value. This can be an equation that includes the name "Thickness" and can also include length unit specifiers. For example, a valid expression is "Thickness / 2 + 1 mm". If no units are specified, the unit is implied and uses the units associated with the rule which can be mm or inch. For example an expression of "3" will be 3 inches if the rule units are inches or 3 mm if the rule units are millimeters. You can find out what units are used for a rule using the PlasticRule.units property.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Gets and sets the value of the plastic rule value in centimeters. Setting this value will create a new expression that is equivalent to the new value.

Accessed From

PlasticRule.clearance, PlasticRule.draftAngle, PlasticRule.knifeEdgeThreshold, PlasticRule.nominalRadius, PlasticRule.revealHeight, PlasticRule.thickness, PlasticRule.thicknessVariation

Version

Introduced in version January 2024


PlasticRuleValue.classType Method

Parent Object: PlasticRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PlasticRuleValue.classType()
This is a static method.

#include <Fusion/Plastic/PlasticRuleValue.h>

returnValue = adsk::fusion::PlasticRuleValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


PlasticRuleValue.expression Property

Parent Object: PlasticRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

Gets and sets the expression of the plastic rule value. This can be an equation that includes the name "Thickness" and can also include length unit specifiers. For example, a valid expression is "Thickness / 2 + 1 mm". If no units are specified, the unit is implied and uses the units associated with the rule which can be mm or inch. For example an expression of "3" will be 3 inches if the rule units are inches or 3 mm if the rule units are millimeters. You can find out what units are used for a rule using the PlasticRule.units property.

Syntax

  • Python
  • C++
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.

# Get the value of the property.
propertyValue = plasticRuleValue_var.expression

# Set the value of the property.
plasticRuleValue_var.expression = propertyValue
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.
#include <Fusion/Plastic/PlasticRuleValue.h>

// Get the value of the property.
string propertyValue = plasticRuleValue_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = plasticRuleValue_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


PlasticRuleValue.isValid Property

Parent Object: PlasticRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.

# Get the value of the property.
propertyValue = plasticRuleValue_var.isValid
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.
#include <Fusion/Plastic/PlasticRuleValue.h>

// Get the value of the property.
boolean propertyValue = plasticRuleValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PlasticRuleValue.objectType Property

Parent Object: PlasticRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.

# Get the value of the property.
propertyValue = plasticRuleValue_var.objectType
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.
#include <Fusion/Plastic/PlasticRuleValue.h>

// Get the value of the property.
string propertyValue = plasticRuleValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


PlasticRuleValue.value Property

Parent Object: PlasticRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/PlasticRuleValue.h>

Description

Gets and sets the value of the plastic rule value in centimeters. Setting this value will create a new expression that is equivalent to the new value.

Syntax

  • Python
  • C++
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.

# Get the value of the property.
propertyValue = plasticRuleValue_var.value

# Set the value of the property.
plasticRuleValue_var.value = propertyValue
"plasticRuleValue_var" is a variable referencing a PlasticRuleValue object.
#include <Fusion/Plastic/PlasticRuleValue.h>

// Get the value of the property.
double propertyValue = plasticRuleValue_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = plasticRuleValue_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2024


PocketRecognitionSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Pocket type curve selection. It searches for pockets matching the criteria on the selected bodies The result of the value property call may contain duplicates. See also RecognizedPockets for the ability to analyze the pockets

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
areHolesIncluded | Flag to interpret holes as pockets.
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isSetupModelSelected | Flag to include all B-Rep bodies set as the setup models.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumCornerRadius | The largest corner radius that can appear in a pocket to machine.
maximumPocketDepth | The deepest pocket (measured from top to bottom) to machine.
minimumCornerRadius | The smallest corner radius that can appear in a pocket to machine.
minimumHoleDiameter | Lower bound for the diameter for the hole detection. It can only be set if areHoldeIncluded is set to true.
minimumPocketDepth | The shallowest pocket (measured from top to bottom) to machine.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewPocketRecognitionSelection

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


PocketRecognitionSelection.areHolesIncluded Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Flag to interpret holes as pockets.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.areHolesIncluded

# Set the value of the property.
pocketRecognitionSelection_var.areHolesIncluded = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
boolean propertyValue = pocketRecognitionSelection_var->areHolesIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pocketRecognitionSelection_var->areHolesIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


PocketRecognitionSelection.classType Method

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PocketRecognitionSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

returnValue = adsk::cam::PocketRecognitionSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


PocketRecognitionSelection.error Property

Parent Object: PocketRecognitionSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.error
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
string propertyValue = pocketRecognitionSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


PocketRecognitionSelection.hasError Property

Parent Object: PocketRecognitionSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.hasError
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
boolean propertyValue = pocketRecognitionSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


PocketRecognitionSelection.hasWarning Property

Parent Object: PocketRecognitionSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.hasWarning
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
boolean propertyValue = pocketRecognitionSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


PocketRecognitionSelection.inputGeometry Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.inputGeometry

# Set the value of the property.
pocketRecognitionSelection_var.inputGeometry = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = pocketRecognitionSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = pocketRecognitionSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version July 2023


PocketRecognitionSelection.isSetupModelSelected Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Flag to include all B-Rep bodies set as the setup models.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.isSetupModelSelected

# Set the value of the property.
pocketRecognitionSelection_var.isSetupModelSelected = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
boolean propertyValue = pocketRecognitionSelection_var->isSetupModelSelected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pocketRecognitionSelection_var->isSetupModelSelected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


PocketRecognitionSelection.isValid Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.isValid
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
boolean propertyValue = pocketRecognitionSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


PocketRecognitionSelection.maximumCornerRadius Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

The largest corner radius that can appear in a pocket to machine.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.maximumCornerRadius

# Set the value of the property.
pocketRecognitionSelection_var.maximumCornerRadius = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
double propertyValue = pocketRecognitionSelection_var->maximumCornerRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = pocketRecognitionSelection_var->maximumCornerRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2023


PocketRecognitionSelection.maximumPocketDepth Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

The deepest pocket (measured from top to bottom) to machine.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.maximumPocketDepth

# Set the value of the property.
pocketRecognitionSelection_var.maximumPocketDepth = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
double propertyValue = pocketRecognitionSelection_var->maximumPocketDepth();

// Set the value of the property, where value_var is a double.
bool returnValue = pocketRecognitionSelection_var->maximumPocketDepth(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


PocketRecognitionSelection.minimumCornerRadius Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

The smallest corner radius that can appear in a pocket to machine.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.minimumCornerRadius

# Set the value of the property.
pocketRecognitionSelection_var.minimumCornerRadius = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
double propertyValue = pocketRecognitionSelection_var->minimumCornerRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = pocketRecognitionSelection_var->minimumCornerRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2023


PocketRecognitionSelection.minimumHoleDiameter Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Lower bound for the diameter for the hole detection. It can only be set if areHoldeIncluded is set to true.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.minimumHoleDiameter

# Set the value of the property.
pocketRecognitionSelection_var.minimumHoleDiameter = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
double propertyValue = pocketRecognitionSelection_var->minimumHoleDiameter();

// Set the value of the property, where value_var is a double.
bool returnValue = pocketRecognitionSelection_var->minimumHoleDiameter(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2023


PocketRecognitionSelection.minimumPocketDepth Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

The shallowest pocket (measured from top to bottom) to machine.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.minimumPocketDepth

# Set the value of the property.
pocketRecognitionSelection_var.minimumPocketDepth = propertyValue
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
double propertyValue = pocketRecognitionSelection_var->minimumPocketDepth();

// Set the value of the property, where value_var is a double.
bool returnValue = pocketRecognitionSelection_var->minimumPocketDepth(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


PocketRecognitionSelection.objectType Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.objectType
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
string propertyValue = pocketRecognitionSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


PocketRecognitionSelection.value Property

Parent Object: PocketRecognitionSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.value
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = pocketRecognitionSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version July 2023


PocketRecognitionSelection.warning Property

Parent Object: PocketRecognitionSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketRecognitionSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.

# Get the value of the property.
propertyValue = pocketRecognitionSelection_var.warning
"pocketRecognitionSelection_var" is a variable referencing a PocketRecognitionSelection object.
#include <Cam/GeometrySelections/PocketRecognitionSelection.h>

// Get the value of the property.
string propertyValue = pocketRecognitionSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


PocketSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Pocket type for a curve selection. Allows planar BREP face selections for the input geometry. Overrides the GeometrySelection's the value property to include other faces if isSelectingSamePlaneFaces is set to true and the selection has been applied. The result of the value property call may contain duplicates. Note: selecting arbitrary faces, only planar faces are actually added to the list of faces to work with.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
extensionMethod | The desired extension method. TangentExtension by default.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isSelectingSamePlaneFaces | True if all planar faces lying in the same plane as the selected face should be automatically selected as well. False by default.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewPocketSelection

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version April 2023


PocketSelection.classType Method

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PocketSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/PocketSelection.h>

returnValue = adsk::cam::PocketSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PocketSelection.error Property

Parent Object: PocketSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.error
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
string propertyValue = pocketSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


PocketSelection.extensionMethod Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

The desired extension method. TangentExtension by default.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.extensionMethod

# Set the value of the property.
pocketSelection_var.extensionMethod = propertyValue
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
ExtensionMethods propertyValue = pocketSelection_var->extensionMethod();

// Set the value of the property, where value_var is an ExtensionMethods.
bool returnValue = pocketSelection_var->extensionMethod(value_var);

Property Value

This is a read/write property whose value is an ExtensionMethods.

Version

Introduced in version April 2023


PocketSelection.hasError Property

Parent Object: PocketSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.hasError
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
boolean propertyValue = pocketSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


PocketSelection.hasWarning Property

Parent Object: PocketSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.hasWarning
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
boolean propertyValue = pocketSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


PocketSelection.inputGeometry Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.inputGeometry

# Set the value of the property.
pocketSelection_var.inputGeometry = propertyValue
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = pocketSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = pocketSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version April 2023


PocketSelection.isSelectingSamePlaneFaces Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

True if all planar faces lying in the same plane as the selected face should be automatically selected as well. False by default.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.isSelectingSamePlaneFaces

# Set the value of the property.
pocketSelection_var.isSelectingSamePlaneFaces = propertyValue
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
boolean propertyValue = pocketSelection_var->isSelectingSamePlaneFaces();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pocketSelection_var->isSelectingSamePlaneFaces(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


PocketSelection.isValid Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.isValid
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
boolean propertyValue = pocketSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PocketSelection.objectType Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.objectType
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
string propertyValue = pocketSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PocketSelection.value Property

Parent Object: PocketSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.value
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = pocketSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


PocketSelection.warning Property

Parent Object: PocketSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/PocketSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"pocketSelection_var" is a variable referencing a PocketSelection object.

# Get the value of the property.
propertyValue = pocketSelection_var.warning
"pocketSelection_var" is a variable referencing a PocketSelection object.
#include <Cam/GeometrySelections/PocketSelection.h>

// Get the value of the property.
string propertyValue = pocketSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


Point2D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, Polyline2D.points, SurfaceEvaluator.getParameterAtPoint, TriangleMesh.textureCoordinates, Vector2D.asPoint, Viewport.modelToViewSpace, Viewport.screenToView, Viewport.viewToScreen

Version

Introduced in version August 2014


Point2D.asArray Method

Parent Object: Point2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Get coordinate data of the point

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Defines a vector using the coordinates of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Creates and returns a copy of this point object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Creates a transient 2D point object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Returns the distance from this point to another point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Gets the data defining the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Checks to see if this point and another point are equal within the specified tolerance.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Sets the coordinates of the point by specifying the x, y coordinates.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Sets the coordinates of the point using an array as input.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Transforms the point using the provided matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Translates the point using the provided vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Returns a vector from this point to another point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Gets and sets the X coordinate of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point2D.h>

Description

Gets and sets the Y coordinate of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

AdditiveFFFLimitsMachineElement.homePosition, AdditiveFFFLimitsMachineElement.parkPosition, AdditivePlatformMachineElement.origin, AdditivePlatformMachineElement.size, AngleValueCommandInput.manipulatorOrigin, Arc3D.center, Arc3D.endPoint, Arc3D.getData, Arc3D.startPoint, AreaProperties.centroid, BeamNetwork.vertices, BoundingBox3D.maxPoint, BoundingBox3D.minPoint, BRepEdge.pointOnEdge, BRepFace.centroid, BRepFace.pointOnFace, BRepVertex.geometry, BRepVertexDefinition.position, 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, FaceGroup.centroid, 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, OffsetConstraintInput.dimensionPoint, OrientedBoundingBox3D.centerPoint, PhysicalProperties.centerOfMass, Plane.intersectWithLine, Plane.origin, Point3D.copy, Point3D.create, PolygonMesh.nodeCoordinates, Polyline3D.points, RecognizedHole.bottom, RecognizedHole.top, SceneSettings.centerOfFocus, SceneSettings.groundPosition, Selection.point, Sketch.modelToSketchSpace, Sketch.origin, Sketch.sketchToModelSpace, SketchAngularDimension.textPosition, SketchConcentricCircleDimension.textPosition, SketchDiameterDimension.textPosition, SketchDimension.textPosition, SketchDistanceBetweenLineAndPlanarSurfaceDimension.textPosition, SketchDistanceBetweenPointAndSurfaceDimension.textPosition, SketchEllipseMajorRadiusDimension.textPosition, SketchEllipseMinorRadiusDimension.textPosition, SketchLinearDiameterDimension.textPosition, SketchLinearDimension.textPosition, SketchOffsetCurvesDimension.textPosition, SketchOffsetDimension.textPosition, SketchPoint.geometry, SketchPoint.worldGeometry, SketchRadialDimension.textPosition, SketchTangentDistanceDimension.textPosition, SketchText.position, SketchTextInput.position, Sphere.getData, Sphere.origin, SurfaceEvaluator.getPointAtParameter, Torus.getData, Torus.origin, TriangleMesh.nodeCoordinates, Vector3D.asPoint, Viewport.viewToModelSpace, VolumetricColorSample.point, VolumetricSample.point, VolumetricScalarSample.point, VolumetricVectorSample.point

Samples

Name | Description
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.

Version

Introduced in version August 2014


Point3D.asArray Method

Parent Object: Point3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Get coordinate data of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Defines a vector using the coordinates of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Creates and returns a copy of this point object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Creates a transient 3D point object.

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.
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.
SketchArcs.breakCurve | Demonstrates the SketchArc.breakCurve method.
SketchArcs.extend | Demonstrates the SketchArc.extend method.
SketchArcs.trim | Demonstrates the SketchArc.trim method.
SketchCircles.addByCenterRadius | Demonstrates the SketchCircles.addByCenterRadius method.
SketchCircles.addByThreePoints | Demonstrates the SketchCircles.addByThreePoints method.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoPoints | Demonstrates the SketchCircles.addByTwoPoints method.
SketchEllipses.add | Demonstrates the SketchEllipses.add method.
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.
SketchLines.addThreePointRectangle | Demonstrates the SketchLines.addThreePointRectangle method.
SketchLines.addTwoPointRectangle | Demonstrates the SketchLines.addTwoPointRectangle method.

Version

Introduced in version August 2014


Point3D.distanceTo Method

Parent Object: Point3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Returns the distance from this point to another point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Gets the data defining the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Checks to see if this point and another point are equal within the specified tolerance.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Sets the data defining the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Sets the coordinates of the point using an array as input.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Transforms the point using the provided matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Translates the point using the provided vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Returns a vector from this point to another point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Gets and sets the X coordinate of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Gets and sets the Y coordinate of the point.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Point3D.h>

Description

Gets and sets the Z coordinate of the point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned relative to a 3D coordinate point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

Returns the plane that defines the orientation and start of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/PointHolePositionDefinition.h>

Description

Returns the coordinates defining the position of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

A polygon constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
centerPoint | Returns the SketchPoint that acts as the center point of the polygon.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 | **RETIRED** This has been retired and you should use the points property instead.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
points | Returns the sketch points that define the vertices of the polygon. The sketch lines that draw the shape of the polygon can be obtained from the points.

Accessed From

GeometricConstraints.addPolygon

Version

Introduced in version March 2016


PolygonConstraint.assemblyContext Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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.centerPoint Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Returns the SketchPoint that acts as the center point of the polygon.

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.centerPoint
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = polygonConstraint_var->centerPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version July 2024


PolygonConstraint.classType Method

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.entityToken
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
string propertyValue = polygonConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


PolygonConstraint.isDeletable Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

This function is retired. See more information in the 'Remarks' section below.

This has been retired and you should use the points property instead.

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
Retired in version July 2024


PolygonConstraint.objectType Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Returns the parent sketch object.

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


PolygonConstraint.points Property

Parent Object: PolygonConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/PolygonConstraint.h>

Description

Returns the sketch points that define the vertices of the polygon. The sketch lines that draw the shape of the polygon can be obtained from the points.

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.points
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchPoint>> propertyValue = polygonConstraint_var->points();

Property Value

This is a read only property whose value is an array of type SketchPoint.

Version

Introduced in version July 2024


PolygonMesh Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

The PolygonMesh represents a mesh that can contain any combination of polygons, quads, and triangles.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
triangleFaceGroupTempIds | Preview Returns the face groups tempId values for every triangle of the mesh. The tempId corresponds to the triangles, which are defined in triangleNodeIndices.
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.
wallThickness | Preview Returns the wall thickness per node in cm. This property calculates the wall thickness of the mesh, i.e. the distance of a surface of the mesh to the opposing surface.

Accessed From

MeshBody.mesh

Version

Introduced in version August 2014


PolygonMesh.classType Method

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the node coordinates as an array of Point3D objects.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.

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 float.

Version

Introduced in version August 2014


PolygonMesh.nodeCount Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the number of nodes in the mesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

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.

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<integer> propertyValue = polygonMesh_var->nodeCountPerPolygon();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version August 2014


PolygonMesh.normalVectors Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the normal vectors as an array of Vector 3D objects. There is one normal vector for each index.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the normal vectors as an array of floats. There is one normal vector for each index.

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 float.

Version

Introduced in version August 2014


PolygonMesh.objectType Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the number of polygons (more than 4 sides) in the mesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the coordinates of each polygon and the corresponding normal.

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<integer> propertyValue = polygonMesh_var->polygonNodeIndices();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version August 2014


PolygonMesh.quadCount Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the number of quads in the mesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

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.

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<integer> propertyValue = polygonMesh_var->quadNodeIndices();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version August 2014


PolygonMesh.triangleCount Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the number of triangles in the mesh.

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.triangleFaceGroupTempIds Property

Parent Object: PolygonMesh

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the face groups tempId values for every triangle of the mesh. The tempId corresponds to the triangles, which are defined in triangleNodeIndices.

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.triangleFaceGroupTempIds
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<integer> propertyValue = polygonMesh_var->triangleFaceGroupTempIds();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version September 2024


PolygonMesh.triangleNodeIndices Property

Parent Object: PolygonMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

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.

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<integer> propertyValue = polygonMesh_var->triangleNodeIndices();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version August 2014


PolygonMesh.wallThickness Property

Parent Object: PolygonMesh

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/PolygonMesh.h>

Description

Returns the wall thickness per node in cm. This property calculates the wall thickness of the mesh, i.e. the distance of a surface of the mesh to the opposing surface.

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.wallThickness
"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->wallThickness();

Property Value

This is a read only property whose value is an array of type float.

Version

Introduced in version May 2025


Polyline2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Represents a single curve composed of a series of connected lines in 2D space.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 2D polyline using an array of Point2D objects that defines the position of the polyline vertices.
createByArray | Creates a transient 2D polyline using an array of floating point values that specify the X, Y coordinates for each point.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the polyline.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointCount | Returns the number of points defining the polyline.
points | Gets and sets the points that define the coordinates of the polyline.

Accessed From

Polyline2D.create, Polyline2D.createByArray

Version

Introduced in version September 2024


Polyline2D.asNurbsCurve Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Returns a NURBS curve that is geometrically identical to the polyline.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.asNurbsCurve
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = polyline2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version September 2024


Polyline2D.classType Method

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline2D.classType()
This is a static method.

#include <Core/Geometry/Polyline2D.h>

returnValue = adsk::core::Polyline2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


Polyline2D.create Method

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Creates a transient 2D polyline using an array of Point2D objects that defines the position of the polyline vertices.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline2D.create(points)
This is a static method.

#include <Core/Geometry/Polyline2D.h>

returnValue = adsk::core::Polyline2D::create(points);

Return Value

Type | Description
Polyline2D | Returns the created Polyline2D object.

Parameters

Name | Type | Description
points | Point2D[] | An array of Point2D objects that define the coordinates of the curve.

Version

Introduced in version September 2024


Polyline2D.createByArray Method

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Creates a transient 2D polyline using an array of floating point values that specify the X, Y coordinates for each point.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline2D.createByArray(pointCoordinates)
This is a static method.

#include <Core/Geometry/Polyline2D.h>

returnValue = adsk::core::Polyline2D::createByArray(pointCoordinates);

Return Value

Type | Description
Polyline2D | Returns the created Polyline2D object.

Parameters

Name | Type | Description
pointCoordinates | double[] | An array of floating point values that define the X, Y coordinates of each point in the polyline.

Version

Introduced in version September 2024


Polyline2D.curveType Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Returns the type of geometry this curve represents.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.curveType
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = polyline2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version September 2024


Polyline2D.evaluator Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.evaluator
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = polyline2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version September 2024


Polyline2D.isValid Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.isValid
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
boolean propertyValue = polyline2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Polyline2D.objectType Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.objectType
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
string propertyValue = polyline2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


Polyline2D.pointCount Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Returns the number of points defining the polyline.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.pointCount
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
integer propertyValue = polyline2D_var->pointCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2024


Polyline2D.points Property

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Gets and sets the points that define the coordinates of the polyline.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.

# Get the value of the property.
propertyValue = polyline2D_var.points

# Set the value of the property.
polyline2D_var.points = propertyValue
"polyline2D_var" is a variable referencing a Polyline2D object.
#include <Core/Geometry/Polyline2D.h>

// Get the value of the property.
std::vector<Ptr<Point2D>> propertyValue = polyline2D_var->points();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = polyline2D_var->points(value_var);

Property Value

This is a read/write property whose value is an array of type Point2D.

Version

Introduced in version September 2024


Polyline2D.transformBy Method

Parent Object: Polyline2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline2D.h>

Description

Transforms this curve in 2D space.

Syntax

  • Python
  • C++
"polyline2D_var" is a variable referencing a Polyline2D object.
returnValue = polyline2D_var.transformBy(matrix)
"polyline2D_var" is a variable referencing a Polyline2D object.

#include <Core/Geometry/Polyline2D.h>

returnValue = polyline2D_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 September 2024


Polyline3D Object

Derived from: Curve3D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Represents a single piecewise linear curve. This is a single curve that consists of a series of connected lines in 3D space.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 3D polyline using an array of Point3D objects that defines the position of the polyline vertices.
createByArray | Creates a transient 3D polyline using an array of floating point values that specify the X, Y, Z coordinates for each point.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the polyline.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointCount | Returns the number of points defining the polyline.
points | Gets and sets the points that define the coordinates of the polyline.

Accessed From

Polyline3D.create, Polyline3D.createByArray

Version

Introduced in version September 2024


Polyline3D.asNurbsCurve Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Returns a NURBS curve that is geometrically identical to the polyline.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.asNurbsCurve
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = polyline3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version September 2024


Polyline3D.classType Method

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline3D.classType()
This is a static method.

#include <Core/Geometry/Polyline3D.h>

returnValue = adsk::core::Polyline3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


Polyline3D.create Method

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Creates a transient 3D polyline using an array of Point3D objects that defines the position of the polyline vertices.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline3D.create(points)
This is a static method.

#include <Core/Geometry/Polyline3D.h>

returnValue = adsk::core::Polyline3D::create(points);

Return Value

Type | Description
Polyline3D | Returns the created Polyline3D object or null if the creation failed.

Parameters

Name | Type | Description
points | Point3D[] | An array of Point3D objects that define the coordinates of the curve.

Version

Introduced in version September 2024


Polyline3D.createByArray Method

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Creates a transient 3D polyline using an array of floating point values that specify the X, Y, Z coordinates for each point.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Polyline3D.createByArray(pointCoordinates)
This is a static method.

#include <Core/Geometry/Polyline3D.h>

returnValue = adsk::core::Polyline3D::createByArray(pointCoordinates);

Return Value

Type | Description
Polyline3D | Returns the created Polyline3D object or null if the creation failed

Parameters

Name | Type | Description
pointCoordinates | double[] | An array of floating point values that define the X, Y, Z coordinates of each point in the polyline.

Version

Introduced in version September 2024


Polyline3D.curveType Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Returns the type of geometry this curve represents.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.curveType
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = polyline3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version September 2024


Polyline3D.evaluator Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.evaluator
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = polyline3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version September 2024


Polyline3D.isValid Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.isValid
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
boolean propertyValue = polyline3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


Polyline3D.objectType Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.objectType
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
string propertyValue = polyline3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


Polyline3D.pointCount Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Returns the number of points defining the polyline.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.pointCount
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
integer propertyValue = polyline3D_var->pointCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2024


Polyline3D.points Property

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Gets and sets the points that define the coordinates of the polyline.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.

# Get the value of the property.
propertyValue = polyline3D_var.points

# Set the value of the property.
polyline3D_var.points = propertyValue
"polyline3D_var" is a variable referencing a Polyline3D object.
#include <Core/Geometry/Polyline3D.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = polyline3D_var->points();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = polyline3D_var->points(value_var);

Property Value

This is a read/write property whose value is an array of type Point3D.

Version

Introduced in version September 2024


Polyline3D.transformBy Method

Parent Object: Polyline3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Polyline3D.h>

Description

Transforms this curve in 3D space.

Syntax

  • Python
  • C++
"polyline3D_var" is a variable referencing a Polyline3D object.
returnValue = polyline3D_var.transformBy(matrix)
"polyline3D_var" is a variable referencing a Polyline3D object.

#include <Core/Geometry/Polyline3D.h>

returnValue = polyline3D_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 September 2024


PostConfiguration Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Object that represents a post configuration.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
capability | Gets the capabilities supported by the post. Capabilities define what types of operations can be post processed using this configuration.
description | Gets the description of the post.
extension | Gets the extension of the output file created by the post.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
vendor | Gets the name of the vendor of the machine tool or controller this post configuration supports.
version | Gets the version of the post.

Accessed From

NCProgram.postConfiguration, PostConfigurationQuery.execute, PostLibrary.childPostConfigurations, PostLibrary.postConfigurationAtURL

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostConfiguration.capability Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Gets the capabilities supported by the post. Capabilities define what types of operations can be post processed using this configuration.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.capability
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
PostCapabilities propertyValue = postConfiguration_var->capability();

Property Value

This is a read only property whose value is a PostCapabilities.

Version

Introduced in version April 2023


PostConfiguration.classType Method

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostConfiguration.classType()
This is a static method.

#include <Cam/Post/PostConfiguration.h>

returnValue = adsk::cam::PostConfiguration::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PostConfiguration.description Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Gets the description of the post.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.description
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
string propertyValue = postConfiguration_var->description();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostConfiguration.extension Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Gets the extension of the output file created by the post.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.extension
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
string propertyValue = postConfiguration_var->extension();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostConfiguration.isValid Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.isValid
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
boolean propertyValue = postConfiguration_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PostConfiguration.objectType Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.objectType
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
string propertyValue = postConfiguration_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostConfiguration.vendor Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Gets the name of the vendor of the machine tool or controller this post configuration supports.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.vendor
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
string propertyValue = postConfiguration_var->vendor();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostConfiguration.version Property

Parent Object: PostConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfiguration.h>

Description

Gets the version of the post.

Syntax

  • Python
  • C++
"postConfiguration_var" is a variable referencing a PostConfiguration object.

# Get the value of the property.
propertyValue = postConfiguration_var.version
"postConfiguration_var" is a variable referencing a PostConfiguration object.
#include <Cam/Post/PostConfiguration.h>

// Get the value of the property.
string propertyValue = postConfiguration_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostConfigurationQuery Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

A PostConfigurationQuery can be used to search a LibraryLocation for a set of PostConfiguration objects matching the required properties.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
execute | Query for specific posts. This PostConfiguration query.

Properties

Name | Description
capability | Specifies the capability to search for in the post library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
location | The location specifies the location to search in the post library. Setting the location clears any previous specified URL.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
url | The URL specifies the location and folder to search for in the post library. Setting the URL updates the location.
vendor | The case-insensitive vendor specifies the vendor of the post configuration. The default empty vendor applies to all post configurations.

Accessed From

PostLibrary.createQuery

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostConfigurationQuery.capability Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

Specifies the capability to search for in the post library.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.capability

# Set the value of the property.
postConfigurationQuery_var.capability = propertyValue
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
PostCapabilities propertyValue = postConfigurationQuery_var->capability();

// Set the value of the property, where value_var is a PostCapabilities.
bool returnValue = postConfigurationQuery_var->capability(value_var);

Property Value

This is a read/write property whose value is a PostCapabilities.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostConfigurationQuery.classType Method

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostConfigurationQuery.classType()
This is a static method.

#include <Cam/Post/PostConfigurationQuery.h>

returnValue = adsk::cam::PostConfigurationQuery::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PostConfigurationQuery.execute Method

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

Query for specific posts. This PostConfiguration query.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
returnValue = postConfigurationQuery_var.execute()
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

#include <Cam/Post/PostConfigurationQuery.h>

returnValue = postConfigurationQuery_var->execute();

Return Value

Type | Description
PostConfiguration[] | Returns a list of posts. Each returned post matches this query.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version May 2023


PostConfigurationQuery.isValid Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.isValid
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
boolean propertyValue = postConfigurationQuery_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PostConfigurationQuery.location Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

The location specifies the location to search in the post library. Setting the location clears any previous specified URL.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.location

# Set the value of the property.
postConfigurationQuery_var.location = propertyValue
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
LibraryLocations propertyValue = postConfigurationQuery_var->location();

// Set the value of the property, where value_var is a LibraryLocations.
bool returnValue = postConfigurationQuery_var->location(value_var);

Property Value

This is a read/write property whose value is a LibraryLocations.

Version

Introduced in version April 2023


PostConfigurationQuery.objectType Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.objectType
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
string propertyValue = postConfigurationQuery_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostConfigurationQuery.url Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

The URL specifies the location and folder to search for in the post library. Setting the URL updates the location.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.url

# Set the value of the property.
postConfigurationQuery_var.url = propertyValue
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
Ptr<URL> propertyValue = postConfigurationQuery_var->url();

// Set the value of the property, where value_var is a URL.
bool returnValue = postConfigurationQuery_var->url(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version April 2023


PostConfigurationQuery.vendor Property

Parent Object: PostConfigurationQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostConfigurationQuery.h>

Description

The case-insensitive vendor specifies the vendor of the post configuration. The default empty vendor applies to all post configurations.

Syntax

  • Python
  • C++
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.

# Get the value of the property.
propertyValue = postConfigurationQuery_var.vendor

# Set the value of the property.
postConfigurationQuery_var.vendor = propertyValue
"postConfigurationQuery_var" is a variable referencing a PostConfigurationQuery object.
#include <Cam/Post/PostConfigurationQuery.h>

// Get the value of the property.
string propertyValue = postConfigurationQuery_var->vendor();

// Set the value of the property, where value_var is a string.
bool returnValue = postConfigurationQuery_var->vendor(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostLibrary Object

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

The PostLibrary provides access to post configurations. Using this object you can import post configurations and get existing post configurations using either a URL or query to find specific post configurations.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
childPostConfigurations | Get all posts by the given parent folder URL. Returns null, if the URL does not exist.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
createQuery | Creates a new PostConfigurationQuery that is used to query the library for post configurations matching the query.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importPostConfiguration | Import a given post configuration at a specific location. The post configuration will be stored in the library. Throws an error, if the given URL is read-only.
postConfigurationAtURL | Get a specific post configuration by the given URL. Returns null, if the URL does not exist.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.postLibrary

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostLibrary.assetTypeName Property

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.

# Get the value of the property.
propertyValue = postLibrary_var.assetTypeName
"postLibrary_var" is a variable referencing a PostLibrary object.
#include <Cam/Post/PostLibrary.h>

// Get the value of the property.
string propertyValue = postLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostLibrary.childAssetURLs Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.childAssetURLs(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


PostLibrary.childFolderURLs Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.childFolderURLs(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


PostLibrary.childPostConfigurations Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get all posts by the given parent folder URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.childPostConfigurations(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->childPostConfigurations(url);

Return Value

Type | Description
PostConfiguration[] | Returns all children posts for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL of the folder to get post configurations from.

Version

Introduced in version April 2023


PostLibrary.classType Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostLibrary.classType()
This is a static method.

#include <Cam/Post/PostLibrary.h>

returnValue = adsk::cam::PostLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PostLibrary.createFolder Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.createFolder(parentUrl, folderName)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


PostLibrary.createQuery Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Creates a new PostConfigurationQuery that is used to query the library for post configurations matching the query.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.createQuery(location)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->createQuery(location);

Return Value

Type | Description
PostConfigurationQuery | Returns a new PostConfigurationQuery. The query is predefined by given parameter.

Parameters

Name | Type | Description
location | LibraryLocations | The location specifies the LibraryLocations where to search for in the post library.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostLibrary.deleteAsset Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.deleteAsset(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


PostLibrary.deleteFolder Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.deleteFolder(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


PostLibrary.displayName Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.displayName(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


PostLibrary.importPostConfiguration Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Import a given post configuration at a specific location. The post configuration will be stored in the library. Throws an error, if the given URL is read-only.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.importPostConfiguration(postConfig, destinationUrl, postName)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->importPostConfiguration(postConfig, destinationUrl, postName);

Return Value

Type | Description
URL | Returns the URL of the newly imported post configuration, or null if the import failed.

Parameters

Name | Type | Description
postConfig | PostConfiguration | The post configuration that should be imported.
destinationUrl | URL | The URL to the folder where to save the post configuration.
postName | string | The name of the post configuration that should be created due to the import. The name can be extended if the name already exists at given location to ensure a unique name.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostLibrary.isValid Property

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.

# Get the value of the property.
propertyValue = postLibrary_var.isValid
"postLibrary_var" is a variable referencing a PostLibrary object.
#include <Cam/Post/PostLibrary.h>

// Get the value of the property.
boolean propertyValue = postLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PostLibrary.objectType Property

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.

# Get the value of the property.
propertyValue = postLibrary_var.objectType
"postLibrary_var" is a variable referencing a PostLibrary object.
#include <Cam/Post/PostLibrary.h>

// Get the value of the property.
string propertyValue = postLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PostLibrary.postConfigurationAtURL Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get a specific post configuration by the given URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.postConfigurationAtURL(url)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->postConfigurationAtURL(url);

Return Value

Type | Description
PostConfiguration | Returns the post configuration for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the post configuration to be loaded.

Samples

Name | Description
Basic Milling Workflow Sample | Demonstrates the creation of a basic milling workflow from script Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing. Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


PostLibrary.urlByLocation Method

Parent Object: PostLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Post/PostLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"postLibrary_var" is a variable referencing a PostLibrary object.
returnValue = postLibrary_var.urlByLocation(location)
"postLibrary_var" is a variable referencing a PostLibrary object.

#include <Cam/Post/PostLibrary.h>

returnValue = postLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Version

Introduced in version April 2023


PostProcessingMachineElement Object

PostProcessingMachineElement Object Preview

Derived from: MachineElement Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Machine element representing the post processor and post properties.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
staticTypeId | Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.
updatePostParameters | Overrides the default post parameters with the given user's input.

Properties

Name | Description
elementId | Identifier for this element. Unique within an element 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
outputFolder | Gets and sets the path for the output folder where the .nc files will be located.
postParameters | Gets the machine scope post properties as parameters.
postURL | Gets or sets the URL of the post assigned to the machine.
typeId | Identifier for this type of machine element.

Version

Introduced in version July 2025


PostProcessingMachineElement.classType Method

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostProcessingMachineElement.classType()
This is a static method.

#include <Cam/Machine/PostProcessingMachineElement.h>

returnValue = adsk::cam::PostProcessingMachineElement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2025


PostProcessingMachineElement.elementId Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Identifier for this element. Unique within an element type.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.elementId
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
string propertyValue = postProcessingMachineElement_var->elementId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


PostProcessingMachineElement.isValid Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.isValid
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
boolean propertyValue = postProcessingMachineElement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2025


PostProcessingMachineElement.objectType Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.objectType
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
string propertyValue = postProcessingMachineElement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


PostProcessingMachineElement.outputFolder Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Gets and sets the path for the output folder where the .nc files will be located.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.outputFolder

# Set the value of the property.
postProcessingMachineElement_var.outputFolder = propertyValue
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
string propertyValue = postProcessingMachineElement_var->outputFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = postProcessingMachineElement_var->outputFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2025


PostProcessingMachineElement.postParameters Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Gets the machine scope post properties as parameters.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.postParameters
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = postProcessingMachineElement_var->postParameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version July 2025


PostProcessingMachineElement.postURL Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Gets or sets the URL of the post assigned to the machine.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.postURL

# Set the value of the property.
postProcessingMachineElement_var.postURL = propertyValue
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
Ptr<URL> propertyValue = postProcessingMachineElement_var->postURL();

// Set the value of the property, where value_var is a URL.
bool returnValue = postProcessingMachineElement_var->postURL(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version July 2025


PostProcessingMachineElement.staticTypeId Method

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Identifying name for all elements of this type. Pass this to the itemByType or itemById methods of MachineElements to filter to elements of this type.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostProcessingMachineElement.staticTypeId()
This is a static method.

#include <Cam/Machine/PostProcessingMachineElement.h>

returnValue = adsk::cam::PostProcessingMachineElement::staticTypeId();

Return Value

Type | Description
string | Returns identifier of this type.

Version

Introduced in version July 2025


PostProcessingMachineElement.typeId Property

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Identifier for this type of machine element.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

# Get the value of the property.
propertyValue = postProcessingMachineElement_var.typeId
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
#include <Cam/Machine/PostProcessingMachineElement.h>

// Get the value of the property.
string propertyValue = postProcessingMachineElement_var->typeId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2025


PostProcessingMachineElement.updatePostParameters Method

Parent Object: PostProcessingMachineElement

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Machine/PostProcessingMachineElement.h>

Description

Overrides the default post parameters with the given user's input.

Syntax

  • Python
  • C++
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.
returnValue = postProcessingMachineElement_var.updatePostParameters(parameters)
"postProcessingMachineElement_var" is a variable referencing a PostProcessingMachineElement object.

#include <Cam/Machine/PostProcessingMachineElement.h>

returnValue = postProcessingMachineElement_var->updatePostParameters(parameters);

Return Value

Type | Description
boolean | Returns true if the update was successful. False otherwise.

Parameters

Name | Type | Description
parameters | CAMParameters |

Version

Introduced in version July 2025


PostProcessInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 argument 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.areToolChangesMinimized Property

Parent Object: PostProcessInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Creates a new PostProcessInput object to be used as an input argument by the postProcess() and postProcessAll() methods on the CAM class for posting toolpaths and generating CNC files.

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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.isOpenInEditor Property

Parent Object: PostProcessInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

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.

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 API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.isValid Property

Parent Object: PostProcessInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Gets and sets the path for the output folder where the .cnc files will be located.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Gets and sets the units option for the CNC output. Valid options are DocumentUnitsOutput, InchesOutput or MillimetersOutput

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Gets and sets the full filename (including the path) for the post configuration file (.cps)

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

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.

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.

Samples

Name | Description
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version May 2020


PostProcessInput.programComment Property

Parent Object: PostProcessInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

Description

Gets and sets the program comment. The default value for this property is an empty string ("").

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/PostProcessInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

The Preferences object provides access to the various preference related objects for getting and setting the various preference values.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
apiPreferences | Gets the APIPreferences object, which provides access to the various preferences associated with the API.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.apiPreferences Property

Parent Object: Preferences
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the APIPreferences object, which provides access to the various preferences associated with the API.

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.apiPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<APIPreferences> propertyValue = preferences_var->apiPreferences();

Property Value

This is a read only property whose value is an APIPreferences.

Version

Introduced in version October 2023


Preferences.classType Method

Parent Object: Preferences
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the DefaultUnitsPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the GeneralPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the GraphicsPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the GridPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the MaterialPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the NetworkPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the ProductPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the ProductUsageData object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Preferences.h>

Description

Gets the UnitAndValuePreferences object.

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


PrintSetting Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Object that represents a PrintSetting.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromXML | Creates a PrintSetting from a xml content.
deletePrintSettingItem | Deletes the PrintSettingItem of the specified body preset. Throws an exception when the name does not match any available PrintSettingItems or when trying to delete the default PrintSettingItem.
duplicatePrintSettingItem | Duplicates the PrintSetting item of the specified body preset.
getDefaultPrintSettingItem | Gets the default PrintSetting item of the specified body preset. Throws exception when name not found.
isCompatibleWithMachine | Checks whether the print setting is usable with the given machine.
item | Get the PrintSettingItem at index in PrintSetting.
itemByName | Returns the PrintSetting item of the specified body preset.
parameters | Function that returns the specified parameterTable using an enum into the collection.
setDefaultPrintSettingItem | Defaults the PrintSetting item of the specified body preset. Throws exception when name not found.
syncWithMachine | Preview Synchronizes the print setting with the given machine, making extruder parameter options dependent on the available extruders in the machine.

Properties

Name | Description
count | Get the number of PrintSettingItems in this collection.
description | Gets and sets the description of the PrintSetting.
id | Gets the unique identifier of the PrintSetting. Can be used for comparing PrintSettings within the document.
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 PrintSetting.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
technology | Gets the technology of the PrintSetting.

Accessed From

PrintSetting.createFromXML, PrintSettingLibrary.childPrintSettings, PrintSettingLibrary.printSettingAtURL, PrintSettingQuery.execute, Setup.printSetting, SetupInput.printSetting

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


PrintSetting.classType Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PrintSetting.classType()
This is a static method.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = adsk::cam::PrintSetting::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PrintSetting.count Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Get the number of PrintSettingItems in this collection.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.count
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
uinteger propertyValue = printSetting_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


PrintSetting.createFromXML Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Creates a PrintSetting from a xml content.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PrintSetting.createFromXML(xmlContent)
This is a static method.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = adsk::cam::PrintSetting::createFromXML(xmlContent);

Return Value

Type | Description
PrintSetting | Returns the newly created PrintSetting.

Parameters

Name | Type | Description
xmlContent | string | The xml content string of a PrintSetting file to act as a base for creating a PrintSetting from.

Version

Introduced in version April 2023


PrintSetting.deletePrintSettingItem Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Deletes the PrintSettingItem of the specified body preset. Throws an exception when the name does not match any available PrintSettingItems or when trying to delete the default PrintSettingItem.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.deletePrintSettingItem(name)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->deletePrintSettingItem(name);

Parameters

Name | Type | Description
name | string | The body preset id of the parameters that has to be deleted.

Version

Introduced in version April 2023


PrintSetting.description Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Gets and sets the description of the PrintSetting.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.description

# Set the value of the property.
printSetting_var.description = propertyValue
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
string propertyValue = printSetting_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = printSetting_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSetting.duplicatePrintSettingItem Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Duplicates the PrintSetting item of the specified body preset.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.duplicatePrintSettingItem(name)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->duplicatePrintSettingItem(name);

Return Value

Type | Description
PrintSettingItem | Returns the specified parameters or throws exception in the case where there is no parameters with the specified id.

Parameters

Name | Type | Description
name | string | The body preset id of the parameters that has to be duplicated.

Version

Introduced in version April 2023


PrintSetting.getDefaultPrintSettingItem Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Gets the default PrintSetting item of the specified body preset. Throws exception when name not found.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.getDefaultPrintSettingItem()
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->getDefaultPrintSettingItem();

Return Value

Type | Description
PrintSettingItem | Returns the default parameters.

Version

Introduced in version April 2023


PrintSetting.id Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Gets the unique identifier of the PrintSetting. Can be used for comparing PrintSettings within the document.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.id
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
string propertyValue = printSetting_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSetting.isCompatibleWithMachine Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Checks whether the print setting is usable with the given machine.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.isCompatibleWithMachine(machine)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->isCompatibleWithMachine(machine);

Parameters

Name | Type | Description
machine | Machine |

Version

Introduced in version January 2025


PrintSetting.isValid Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.isValid
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
boolean propertyValue = printSetting_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PrintSetting.item Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Get the PrintSettingItem at index in PrintSetting.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.item(index)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->item(index);

Return Value

Type | Description
PrintSettingItem | The PrintSettingItem at index.

Parameters

Name | Type | Description
index | integer | The index of the PrintSettingItem.

Version

Introduced in version April 2023


PrintSetting.itemByName Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Returns the PrintSetting item of the specified body preset.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.itemByName(name)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->itemByName(name);

Return Value

Type | Description
PrintSettingItem | Returns the specified parameters or throws exception in the case where there is no parameters with the specified id.

Parameters

Name | Type | Description
name | string | The body preset id of the parameters.

Version

Introduced in version April 2023


PrintSetting.name Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Gets and sets the name of the PrintSetting.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.name

# Set the value of the property.
printSetting_var.name = propertyValue
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
string propertyValue = printSetting_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = printSetting_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


PrintSetting.objectType Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.objectType
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
string propertyValue = printSetting_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSetting.parameters Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Function that returns the specified parameterTable using an enum into the collection.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.parameters(type)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->parameters(type);

Return Value

Type | Description
CAMParameters | Returns the specified type of parameters or null if an invalid type was specified.

Parameters

Name | Type | Description
type | PrintSettingItemTypes | The type of the item within the collection to return.

Version

Introduced in version April 2023


PrintSetting.setDefaultPrintSettingItem Method

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Defaults the PrintSetting item of the specified body preset. Throws exception when name not found.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.setDefaultPrintSettingItem(name)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->setDefaultPrintSettingItem(name);

Parameters

Name | Type | Description
name | string | The body preset id of the parameters that has to be defaulted.

Version

Introduced in version April 2023


PrintSetting.syncWithMachine Method

Parent Object: PrintSetting

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Synchronizes the print setting with the given machine, making extruder parameter options dependent on the available extruders in the machine.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.
returnValue = printSetting_var.syncWithMachine(machine)
"printSetting_var" is a variable referencing a PrintSetting object.

#include <Cam/PrintSetting/PrintSetting.h>

returnValue = printSetting_var->syncWithMachine(machine);

Parameters

Name | Type | Description
machine | Machine |

Version

Introduced in version March 2024


PrintSetting.technology Property

Parent Object: PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSetting.h>

Description

Gets the technology of the PrintSetting.

Syntax

  • Python
  • C++
"printSetting_var" is a variable referencing a PrintSetting object.

# Get the value of the property.
propertyValue = printSetting_var.technology
"printSetting_var" is a variable referencing a PrintSetting object.
#include <Cam/PrintSetting/PrintSetting.h>

// Get the value of the property.
string propertyValue = printSetting_var->technology();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSettingItem Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Collection that provides access to the print setting parameters.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Body Preset get and set 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 | Body Preset get and set name.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameters | Function that returns the parameters for reading and editing values.

Accessed From

PrintSetting.duplicatePrintSettingItem, PrintSetting.getDefaultPrintSettingItem, PrintSetting.item, PrintSetting.itemByName

Version

Introduced in version April 2023


PrintSettingItem.classType Method

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PrintSettingItem.classType()
This is a static method.

#include <Cam/PrintSetting/PrintSettingItem.h>

returnValue = adsk::cam::PrintSettingItem::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PrintSettingItem.description Property

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Body Preset get and set description.

Syntax

  • Python
  • C++
"printSettingItem_var" is a variable referencing a PrintSettingItem object.

# Get the value of the property.
propertyValue = printSettingItem_var.description

# Set the value of the property.
printSettingItem_var.description = propertyValue
"printSettingItem_var" is a variable referencing a PrintSettingItem object.
#include <Cam/PrintSetting/PrintSettingItem.h>

// Get the value of the property.
string propertyValue = printSettingItem_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingItem_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSettingItem.isValid Property

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"printSettingItem_var" is a variable referencing a PrintSettingItem object.

# Get the value of the property.
propertyValue = printSettingItem_var.isValid
"printSettingItem_var" is a variable referencing a PrintSettingItem object.
#include <Cam/PrintSetting/PrintSettingItem.h>

// Get the value of the property.
boolean propertyValue = printSettingItem_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PrintSettingItem.name Property

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Body Preset get and set name.

Syntax

  • Python
  • C++
"printSettingItem_var" is a variable referencing a PrintSettingItem object.

# Get the value of the property.
propertyValue = printSettingItem_var.name

# Set the value of the property.
printSettingItem_var.name = propertyValue
"printSettingItem_var" is a variable referencing a PrintSettingItem object.
#include <Cam/PrintSetting/PrintSettingItem.h>

// Get the value of the property.
string propertyValue = printSettingItem_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingItem_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSettingItem.objectType Property

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"printSettingItem_var" is a variable referencing a PrintSettingItem object.

# Get the value of the property.
propertyValue = printSettingItem_var.objectType
"printSettingItem_var" is a variable referencing a PrintSettingItem object.
#include <Cam/PrintSetting/PrintSettingItem.h>

// Get the value of the property.
string propertyValue = printSettingItem_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSettingItem.parameters Property

Parent Object: PrintSettingItem
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingItem.h>

Description

Function that returns the parameters for reading and editing values.

Syntax

  • Python
  • C++
"printSettingItem_var" is a variable referencing a PrintSettingItem object.

# Get the value of the property.
propertyValue = printSettingItem_var.parameters
"printSettingItem_var" is a variable referencing a PrintSettingItem object.
#include <Cam/PrintSetting/PrintSettingItem.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = printSettingItem_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version April 2023


PrintSettingLibrary Object

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

The PrintSettingLibrary provides access to PrintSettings. Using this object you can import PrintSettings and get existing PrintSettings using either URL or query to find specific PrintSetting.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
childPrintSettings | Get all PrintSettings by the given parent folder URL. Returns null, if the URL does not exist.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
createQuery | Creates a new PrintSettingQuery that is used to query the library for PrintSettings matching the query.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importPrintSetting | Import a given PrintSetting at a specific location. The PrintSetting will be stored in the library. Throws an error if the given URL is read-only.
printSettingAtURL | Get a specific PrintSetting by the given URL. Returns null if the URL does not exist.
updatePrintSetting | Update a PrintSetting in the library. The library overrides the URL by given PrintSetting. Throws an error if the URL does not already point to an existing printSetting.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.printSettingLibrary

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


PrintSettingLibrary.assetTypeName Property

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

# Get the value of the property.
propertyValue = printSettingLibrary_var.assetTypeName
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
#include <Cam/PrintSetting/PrintSettingLibrary.h>

// Get the value of the property.
string propertyValue = printSettingLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSettingLibrary.childAssetURLs Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.childAssetURLs(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


PrintSettingLibrary.childFolderURLs Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.childFolderURLs(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version April 2023


PrintSettingLibrary.childPrintSettings Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get all PrintSettings by the given parent folder URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.childPrintSettings(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->childPrintSettings(url);

Return Value

Type | Description
PrintSetting[] | Returns the PrintSetting for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL of the folder to get PrintSettings from.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


PrintSettingLibrary.classType Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PrintSettingLibrary.classType()
This is a static method.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = adsk::cam::PrintSettingLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PrintSettingLibrary.createFolder Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.createFolder(parentUrl, folderName)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


PrintSettingLibrary.createQuery Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Creates a new PrintSettingQuery that is used to query the library for PrintSettings matching the query.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.createQuery(location)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->createQuery(location);

Return Value

Type | Description
PrintSettingQuery | Returns a new PrintSettingQuery. The query is predefined by given parameter.

Parameters

Name | Type | Description
location | LibraryLocations | The location specifies the LibraryLocations where to search for in the PrintSetting library.

Version

Introduced in version April 2023


PrintSettingLibrary.deleteAsset Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.deleteAsset(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


PrintSettingLibrary.deleteFolder Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.deleteFolder(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


PrintSettingLibrary.displayName Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.displayName(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


PrintSettingLibrary.importPrintSetting Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Import a given PrintSetting at a specific location. The PrintSetting will be stored in the library. Throws an error if the given URL is read-only.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.importPrintSetting(printSetting, destinationUrl, printSettingName)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->importPrintSetting(printSetting, destinationUrl, printSettingName);

Return Value

Type | Description
URL | Returns the URL of the newly imported PrintSetting, or null if the import failed.

Parameters

Name | Type | Description
printSetting | PrintSetting | The PrintSetting that should be imported.
destinationUrl | URL | The URL to the folder where to save the PrintSetting.
printSettingName | string | The name that should be assigned to imported PrintSetting. The name can be extended if there already exists a PrintSetting at given location to ensure a unique name.

Version

Introduced in version April 2023


PrintSettingLibrary.isValid Property

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

# Get the value of the property.
propertyValue = printSettingLibrary_var.isValid
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
#include <Cam/PrintSetting/PrintSettingLibrary.h>

// Get the value of the property.
boolean propertyValue = printSettingLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PrintSettingLibrary.objectType Property

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

# Get the value of the property.
propertyValue = printSettingLibrary_var.objectType
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
#include <Cam/PrintSetting/PrintSettingLibrary.h>

// Get the value of the property.
string propertyValue = printSettingLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSettingLibrary.printSettingAtURL Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get a specific PrintSetting by the given URL. Returns null if the URL does not exist.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.printSettingAtURL(url)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->printSettingAtURL(url);

Return Value

Type | Description
PrintSetting | Returns the PrintSetting for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the PrintSetting to be loaded.

Version

Introduced in version April 2023


PrintSettingLibrary.updatePrintSetting Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Update a PrintSetting in the library. The library overrides the URL by given PrintSetting. Throws an error if the URL does not already point to an existing printSetting.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.updatePrintSetting(url, printSetting)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->updatePrintSetting(url, printSetting);

Return Value

Type | Description
boolean | Returns true if asset was updated successfully, false otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the existing asset in the library that should be updated.
printSetting | PrintSetting | The PrintSetting that should be persisted.

Version

Introduced in version April 2023


PrintSettingLibrary.urlByLocation Method

Parent Object: PrintSettingLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.
returnValue = printSettingLibrary_var.urlByLocation(location)
"printSettingLibrary_var" is a variable referencing a PrintSettingLibrary object.

#include <Cam/PrintSetting/PrintSettingLibrary.h>

returnValue = printSettingLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


PrintSettingQuery Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

A PrintSettingQuery can be used to search a LibraryLocation for a set of PrintSetting objects matching the required properties.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
execute | Query for specific PrintSettings. This PrintSettingQuery query.

Properties

Name | Description
filamentDiameter | **RETIRED** The filament diameter specifies filament diameter for FFF Printer. This should match the FFF PrintSetting filament diameter in cm.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
layerHeight | The layer height specifies layer height of the PrintSetting. This should match the PrintSetting layer height in cm.
location | The location specifies the location to search in the PrintSetting library. Setting the location clears any previous specified URL.
machine | The machine specifies which machine the found print setting are compatible with.
material | The case-insensitive material specifies material of the MPBF PrintSetting.
name | The case-insensitive name specifies the name of the PrintSetting.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
technology | The case-insensitive technology specifies technology of the PrintSetting.
url | The URL specifies the location and folder to search for in the PrintSetting library. Setting the URL updates the location.
vendor | The case-insensitive vendor specifies vendor of the PrintSetting. Generic FFF PrintSetting doesnt have a vendor.

Accessed From

PrintSettingLibrary.createQuery

Version

Introduced in version April 2023


PrintSettingQuery.classType Method

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PrintSettingQuery.classType()
This is a static method.

#include <Cam/PrintSetting/PrintSettingQuery.h>

returnValue = adsk::cam::PrintSettingQuery::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


PrintSettingQuery.execute Method

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

Query for specific PrintSettings. This PrintSettingQuery query.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
returnValue = printSettingQuery_var.execute()
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

#include <Cam/PrintSetting/PrintSettingQuery.h>

returnValue = printSettingQuery_var->execute();

Return Value

Type | Description
PrintSetting[] | Returns a list of PrintSetting. Each returned PrintSetting matches this query.

Version

Introduced in version May 2023


PrintSettingQuery.filamentDiameter Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

This function is retired. See more information in the 'Remarks' section below.

The filament diameter specifies filament diameter for FFF Printer. This should match the FFF PrintSetting filament diameter in cm.

Remarks

This property has been retired. The machine now contains the filament diameter(s) in the extruder(s).

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.filamentDiameter

# Set the value of the property.
printSettingQuery_var.filamentDiameter = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
double propertyValue = printSettingQuery_var->filamentDiameter();

// Set the value of the property, where value_var is a double.
bool returnValue = printSettingQuery_var->filamentDiameter(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023
Retired in version July 2023


PrintSettingQuery.isValid Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.isValid
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
boolean propertyValue = printSettingQuery_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


PrintSettingQuery.layerHeight Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The layer height specifies layer height of the PrintSetting. This should match the PrintSetting layer height in cm.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.layerHeight

# Set the value of the property.
printSettingQuery_var.layerHeight = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
double propertyValue = printSettingQuery_var->layerHeight();

// Set the value of the property, where value_var is a double.
bool returnValue = printSettingQuery_var->layerHeight(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


PrintSettingQuery.location Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The location specifies the location to search in the PrintSetting library. Setting the location clears any previous specified URL.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.location

# Set the value of the property.
printSettingQuery_var.location = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
LibraryLocations propertyValue = printSettingQuery_var->location();

// Set the value of the property, where value_var is a LibraryLocations.
bool returnValue = printSettingQuery_var->location(value_var);

Property Value

This is a read/write property whose value is a LibraryLocations.

Version

Introduced in version April 2023


PrintSettingQuery.machine Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The machine specifies which machine the found print setting are compatible with.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.machine

# Set the value of the property.
printSettingQuery_var.machine = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
Ptr<Machine> propertyValue = printSettingQuery_var->machine();

// Set the value of the property, where value_var is a Machine.
bool returnValue = printSettingQuery_var->machine(value_var);

Property Value

This is a read/write property whose value is a Machine.

Version

Introduced in version January 2025


PrintSettingQuery.material Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The case-insensitive material specifies material of the MPBF PrintSetting.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.material

# Set the value of the property.
printSettingQuery_var.material = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
string propertyValue = printSettingQuery_var->material();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingQuery_var->material(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSettingQuery.name Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The case-insensitive name specifies the name of the PrintSetting.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.name

# Set the value of the property.
printSettingQuery_var.name = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
string propertyValue = printSettingQuery_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingQuery_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSettingQuery.objectType Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.objectType
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
string propertyValue = printSettingQuery_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


PrintSettingQuery.technology Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The case-insensitive technology specifies technology of the PrintSetting.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.technology

# Set the value of the property.
printSettingQuery_var.technology = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
string propertyValue = printSettingQuery_var->technology();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingQuery_var->technology(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


PrintSettingQuery.url Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The URL specifies the location and folder to search for in the PrintSetting library. Setting the URL updates the location.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.url

# Set the value of the property.
printSettingQuery_var.url = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
Ptr<URL> propertyValue = printSettingQuery_var->url();

// Set the value of the property, where value_var is a URL.
bool returnValue = printSettingQuery_var->url(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version April 2023


PrintSettingQuery.vendor Property

Parent Object: PrintSettingQuery
Defined in namespace "adsk::cam" and the header file is <Cam/PrintSetting/PrintSettingQuery.h>

Description

The case-insensitive vendor specifies vendor of the PrintSetting. Generic FFF PrintSetting doesnt have a vendor.

Syntax

  • Python
  • C++
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.

# Get the value of the property.
propertyValue = printSettingQuery_var.vendor

# Set the value of the property.
printSettingQuery_var.vendor = propertyValue
"printSettingQuery_var" is a variable referencing a PrintSettingQuery object.
#include <Cam/PrintSetting/PrintSettingQuery.h>

// Get the value of the property.
string propertyValue = printSettingQuery_var->vendor();

// Set the value of the property, where value_var is a string.
bool returnValue = printSettingQuery_var->vendor(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


Product Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

The base class for the various product specific containers. For Fusion this is the Design object. For manufacturing this is a CAM object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 flexible 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.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
unitsManager | Returns the UnitsManager object associated with this product.
workspaces | Returns the workspaces associated with this product.

Accessed From

Application.activeProduct, FusionUnitsManager.product, NamedView.parentProduct, Products.item, Products.itemByProductType, RenderManager.parentDesign, UnitsManager.product

Derived Classes

CAM, Design, Drawing

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the collection of attributes associated with this product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Deletes the specified set of entities that are associated with this product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

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 flexible 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.namedViews Property

Parent Object: Product
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.namedViews
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = product_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version September 2023


Product.objectType Property

Parent Object: Product
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the parent Document object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

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.

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.selectionSets Property

Parent Object: Product
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.selectionSets
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = product_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version May 2022


Product.unitsManager Property

Parent Object: Product
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the UnitsManager object associated with this product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Product.h>

Description

Returns the workspaces associated with this product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferences.h>

Description

The base class for the general product preferences. There is a derived class for each product where the specific preference values are exposed.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ProductPreferencesCollection.item, ProductPreferencesCollection.itemByName

Derived Classes

FusionProductPreferences

Version

Introduced in version August 2014


ProductPreferences.classType Method

Parent Object: ProductPreferences
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferences.h>

Description

Returns the name of this ProductPreferences object.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

A collection that provides access to product specific preference objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 ProductPreferences 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.productPreferences

Version

Introduced in version August 2014


ProductPreferencesCollection.classType Method

Parent Object: ProductPreferencesCollection
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

Returns the number of ProductPreference objects.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

Function that returns the specified ProductPreferences object using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

Returns the ProductPreference object with the specified name.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductPreferencesCollection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

The Products object provides access to all of the products that exist in the document.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Document.products, DrawingDocument.products, FusionDocument.products

Samples

Name | Description
Gets all properties using GraphQL | Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version August 2014


Products.classType Method

Parent Object: Products
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

Returns the number of products within the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

Function that returns the specified product using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

Returns the specified product, if it exists within this document.

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
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Gets all properties using GraphQL

Fetches bulk component properties of the root component and from occurrences via single GraphQL query.
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.
Save and Insert File API Sample | Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.
Set part number using GraphQL | Sets part number of root component and from occurrences via GQL query.

Version

Introduced in version June 2015


Products.objectType Property

Parent Object: Products
Defined in namespace "adsk::core" and the header file is <Core/Application/Products.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Provides access to the product usage data settings.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isGoogleAnalyticsTrackingEnabled | Gets and sets if Google Analytics tracking is enabled.
isLearningPanelContextEnabled | Gets and sets if data can be collected to enable the Learning Panel to show information based on the current context.
isTrackingToImproveCommunicationEnabled | Gets and sets if data can be collected to improve communications. This is the preferences setting titled "Customize our messaging".
isTrackingToImproveSoftwareEnabled | Gets and sets if data can be collected to help improve the products and services that Autodesk provides. This is the preference setting titled "Help develop our products and services".
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Preferences.productUsageData

Version

Introduced in version August 2014


ProductUsageData.classType Method

Parent Object: ProductUsageData
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.isGoogleAnalyticsTrackingEnabled Property

Parent Object: ProductUsageData
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Gets and sets if Google Analytics tracking is enabled.

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.isGoogleAnalyticsTrackingEnabled

# Set the value of the property.
productUsageData_var.isGoogleAnalyticsTrackingEnabled = 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->isGoogleAnalyticsTrackingEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = productUsageData_var->isGoogleAnalyticsTrackingEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


ProductUsageData.isLearningPanelContextEnabled Property

Parent Object: ProductUsageData
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Gets and sets if data can be collected to enable the Learning Panel to show information based on the current context.

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.isLearningPanelContextEnabled

# Set the value of the property.
productUsageData_var.isLearningPanelContextEnabled = 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->isLearningPanelContextEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = productUsageData_var->isLearningPanelContextEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


ProductUsageData.isTrackingToImproveCommunicationEnabled Property

Parent Object: ProductUsageData
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Gets and sets if data can be collected to improve communications. This is the preferences setting titled "Customize our messaging".

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Gets and sets if data can be collected to help improve the products and services that Autodesk provides. This is the preference setting titled "Help develop our products and services".

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ProductUsageData.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Represents a profile in a sketch. Profiles are automatically computed by Fusion and represent closed areas within the sketch.

Methods

Name | Description
areaProperties | Calculates the area properties for the 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.
entityToken Returns a token for the Profile object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same profile.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
face Returns a temporary BRepFace object that is the same shape as the profile. The geometry of the returned face is defined in the 3D space of the parent sketch of the profile.

This can be useful when wanting to use a profile in conjunction with the TemporaryBRepManager object to create B-Rep objects.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, FlatPatternComponent.createBRepEdgeProfile, FlatPatternComponent.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Calculates the area properties for the profile.

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);

Return Value

Type | Description
AreaProperties | Returns the AreaProperties object that has properties for getting the area, perimeter, centroid, etc of this profile.

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 CalculationAccuracy.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Returns the 3D bounding box of the profile in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

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.

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.entityToken Property

Parent Object: Profile
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Returns a token for the Profile object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same profile.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.entityToken
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
string propertyValue = profile_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Profile.face Property

Parent Object: Profile
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Returns a temporary BRepFace object that is the same shape as the profile. The geometry of the returned face is defined in the 3D space of the parent sketch of the profile.

This can be useful when wanting to use a profile in conjunction with the TemporaryBRepManager object to create B-Rep objects.

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.face
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = profile_var->face();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version March 2024


Profile.isValid Property

Parent Object: Profile
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Returns the parent sketch of the profile.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

Description

Returns the plane the profile is defined in. Profiles are always planar and exist within a single plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profile.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

A single curve in a profile.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the bounding box of the profile curve in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the geometric entity of this portion of the profile.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Return the geometry type that the Geometry property will return.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the parent Profile object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the parent ProfileLoop object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the parent Profile object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurve.h>

Description

Returns the associated sketch entity that defines this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

A collection of profile curves within a profile loop.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ProfileLoop.profileCurves

Version

Introduced in version August 2014


ProfileCurves.classType Method

Parent Object: ProfileCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

Returns the number of curves in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

Function that returns the specified profile curve using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileCurves.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

A loop within a profile.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

Returns the parent Profile object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoop.h>

Description

Returns a collection of the curves making up this loop.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

A collection of loops within a Profile.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Profile.profileLoops

Version

Introduced in version August 2014


ProfileLoops.classType Method

Parent Object: ProfileLoops
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

Returns the number of loops within this profile.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

Function that returns the specified profile loop using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/ProfileLoops.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

A definition object that is used to define a feature whose start plane is the sketch plane of the profile.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Samples

Name | Description
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.classType Method

Parent Object: ProfilePlaneStartDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

Statically creates a new ProfilePlaneStartDefinition object. This is used as input when creating a new feature and defining the starting condition.

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.

Samples

Name | Description
extrudeFeatures.add using thin extrude | Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.isValid Property

Parent Object: ProfilePlaneStartDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ProfilePlaneStartDefinition.h>

Description

Returns the geometric definition of the profile plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

A collection of all of the closed profiles currently calculated for this sketch. Closed profiles are automatically computed by Fusion 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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

Returns the number of closed profiles in the sketch. Open and text based profiles are not included.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

Function that returns the specified closed profile using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Profiles.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ProgressBar Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Provides access to the progress bar.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 or busy bar. This should be used when the process has completed.
show | This method displays a message in the progress bar in the lower-right corner of the Fusion window. The progress bar can be used to display a continually updated message indicating the progress of a process. The progress is determined by comparing the current progress value with the minimum and maximum values.
showBusy | This method displays a message in the busy bar in the lower-right corner of the Fusion window. The busy bar can be used to display a continually updated message indicating the progress of a process. The busy bar is different from the progress bar, because it does not show a meter indicating the current progress. Instead is shows a continually moving bar to indicate processing without showing the current progress. This is useful in cases where the length of the process is unknown.

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.
message Gets and sets the message to display in 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.

When a busy bar is displayed, only a simple message is supported and symbols are not supported.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
progressValue Gets and sets the current progress value. This value determines the progress based on this value relative to the minimum and maximum values specified when the progress bar was created. This will also update the values displayed in the message string.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.

This value is ignored when a busy bar is displayed.

Accessed From

UserInterface.progressBar

Version

Introduced in version May 2024


ProgressBar.classType Method

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProgressBar.classType()
This is a static method.

#include <Core/UserInterface/ProgressBar.h>

returnValue = adsk::core::ProgressBar::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


ProgressBar.hide Method

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Hides the progress or busy bar. This should be used when the process has completed.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.
returnValue = progressBar_var.hide()
"progressBar_var" is a variable referencing a ProgressBar object.

#include <Core/UserInterface/ProgressBar.h>

returnValue = progressBar_var->hide();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version May 2024


ProgressBar.isValid Property

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.

# Get the value of the property.
propertyValue = progressBar_var.isValid
"progressBar_var" is a variable referencing a ProgressBar object.
#include <Core/UserInterface/ProgressBar.h>

// Get the value of the property.
boolean propertyValue = progressBar_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


ProgressBar.message Property

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Gets and sets the message to display in 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.

When a busy bar is displayed, only a simple message is supported and symbols are not supported.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.

# Get the value of the property.
propertyValue = progressBar_var.message

# Set the value of the property.
progressBar_var.message = propertyValue
"progressBar_var" is a variable referencing a ProgressBar object.
#include <Core/UserInterface/ProgressBar.h>

// Get the value of the property.
string propertyValue = progressBar_var->message();

// Set the value of the property, where value_var is a string.
bool returnValue = progressBar_var->message(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2024


ProgressBar.objectType Property

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.

# Get the value of the property.
propertyValue = progressBar_var.objectType
"progressBar_var" is a variable referencing a ProgressBar object.
#include <Core/UserInterface/ProgressBar.h>

// Get the value of the property.
string propertyValue = progressBar_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


ProgressBar.progressValue Property

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

Gets and sets the current progress value. This value determines the progress based on this value relative to the minimum and maximum values specified when the progress bar was created. This will also update the values displayed in the message string.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.

This value is ignored when a busy bar is displayed.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.

# Get the value of the property.
propertyValue = progressBar_var.progressValue

# Set the value of the property.
progressBar_var.progressValue = propertyValue
"progressBar_var" is a variable referencing a ProgressBar object.
#include <Core/UserInterface/ProgressBar.h>

// Get the value of the property.
integer propertyValue = progressBar_var->progressValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = progressBar_var->progressValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2024


ProgressBar.show Method

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

This method displays a message in the progress bar in the lower-right corner of the Fusion window. The progress bar can be used to display a continually updated message indicating the progress of a process. The progress is determined by comparing the current progress value with the minimum and maximum values.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.
# Uses no optional arguments.
returnValue = progressBar_var.show(message, minimumValue, maximumValue)

# Uses optional arguments.
returnValue = progressBar_var.show(message, minimumValue, maximumValue, isModal)
"progressBar_var" is a variable referencing a ProgressBar object.

#include <Core/UserInterface/ProgressBar.h>

// Uses no optional arguments.
returnValue = progressBar_var->show(message, minimumValue, maximumValue);

// Uses optional arguments.
returnValue = progressBar_var->show(message, minimumValue, maximumValue, isModal);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
message | string | Specifies the message that will be displayed in 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. An empty string can be specified if you don't want a message and use only the progress meter.
minimumValue | integer | Specifies the minimum value of the progress. This value and the maximum and progress values to compute the current percentage complete. This is the initial progress value when the progress bar is first displayed.
maximumValue | integer | Specifies the maximum value of the progress. This value and the minimum and progress values are used to compute the current percentage completion.
isModal | boolean | Specifies if the progress bar should be modal or not. If modal, the progress bar takes over the UI of Fusion, and the user cannot interact with any of the Fusion user interface. You need to be careful when using a modal dialog to make sure you hide the progress bar when you're finished or have an error condition that causes you to abort because otherwise, the user will need to kill the Fusion process. This is an optional argument whose default value is False.

Version

Introduced in version May 2024


ProgressBar.showBusy Method

Parent Object: ProgressBar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressBar.h>

Description

This method displays a message in the busy bar in the lower-right corner of the Fusion window. The busy bar can be used to display a continually updated message indicating the progress of a process. The busy bar is different from the progress bar, because it does not show a meter indicating the current progress. Instead is shows a continually moving bar to indicate processing without showing the current progress. This is useful in cases where the length of the process is unknown.

Syntax

  • Python
  • C++
"progressBar_var" is a variable referencing a ProgressBar object.
# Uses no optional arguments.
returnValue = progressBar_var.showBusy(message)

# Uses optional arguments.
returnValue = progressBar_var.showBusy(message, isModal)
"progressBar_var" is a variable referencing a ProgressBar object.

#include <Core/UserInterface/ProgressBar.h>

// Uses no optional arguments.
returnValue = progressBar_var->showBusy(message);

// Uses optional arguments.
returnValue = progressBar_var->showBusy(message, isModal);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
message | string | Specifies the message that will be displayed in the busy bar. An empty string can be specified if you don't want a message and use only the busy meter.
isModal | boolean | Specifies if the busy bar should be modal or not. If modal, the busy bar takes over the UI of Fusion, and the user cannot interact with any of the Fusion user interface. You need to be careful when using a modal dialog to make sure you hide the busy bar when you're finished or have an error condition that causes you to abort because otherwise, the user will need to kill the Fusion process. This is an optional argument whose default value is False.

Version

Introduced in version May 2024


ProgressDialog Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Provides access to the progress dialog.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Sets the text label on the Cancel button. The default text label is "Cancel".

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Hides the progress dialog. This should be used when the process has completed.

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 API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Gets and sets if the dialog background is translucent. This is false by default

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Gets and sets if the cancel button is included in the dialog. This is false by default.

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 API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Gets if the Progress Dialog is currently being displayed

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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 API Sample | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


ProgressDialog.message Property

Parent Object: ProgressDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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 API Sample | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


ProgressDialog.minimumValue Property

Parent Object: ProgressDialog
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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 API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

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.

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 API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Gets and sets the title of the progress dialog

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ProgressDialog.h>

Description

Indicates if the cancel button was selected the last time the Progress Dialog was shown.

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


ProjectedTextureMapControl Object

Derived from: TextureMapControl Object
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Provides access to the various settings that control how a projected texture is applied to a body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
reset | Resets the texture map back to its original default settings.

Properties

Name | Description
isCapped | When a cylindrical projected texture map is being used this property gets and sets if a cap is use for the cylindrical projection. This property is only valid in the case when the projectedTextureMapType returns CylindricalTextureMapProjection. The value of this property should be ignored in all other cases and setting the property will have no effect.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
projectedTextureMapType | Gets and sets how the texture map is being applied onto the body.
transform | Gets and sets the transform that defines the position and orientation of how the texture is projected onto the body. The Z axis of the transform corresponds to the axis that is specified in the user-interface and is the primary direction of the texture.

Version

Introduced in version March 2022


ProjectedTextureMapControl.classType Method

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProjectedTextureMapControl.classType()
This is a static method.

#include <Core/Materials/ProjectedTextureMapControl.h>

returnValue = adsk::core::ProjectedTextureMapControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


ProjectedTextureMapControl.isCapped Property

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

When a cylindrical projected texture map is being used this property gets and sets if a cap is use for the cylindrical projection. This property is only valid in the case when the projectedTextureMapType returns CylindricalTextureMapProjection. The value of this property should be ignored in all other cases and setting the property will have no effect.

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

# Get the value of the property.
propertyValue = projectedTextureMapControl_var.isCapped

# Set the value of the property.
projectedTextureMapControl_var.isCapped = propertyValue
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
#include <Core/Materials/ProjectedTextureMapControl.h>

// Get the value of the property.
boolean propertyValue = projectedTextureMapControl_var->isCapped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = projectedTextureMapControl_var->isCapped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2022


ProjectedTextureMapControl.isValid Property

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

# Get the value of the property.
propertyValue = projectedTextureMapControl_var.isValid
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
#include <Core/Materials/ProjectedTextureMapControl.h>

// Get the value of the property.
boolean propertyValue = projectedTextureMapControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


ProjectedTextureMapControl.objectType Property

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

# Get the value of the property.
propertyValue = projectedTextureMapControl_var.objectType
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
#include <Core/Materials/ProjectedTextureMapControl.h>

// Get the value of the property.
string propertyValue = projectedTextureMapControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


ProjectedTextureMapControl.projectedTextureMapType Property

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Gets and sets how the texture map is being applied onto the body.

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

# Get the value of the property.
propertyValue = projectedTextureMapControl_var.projectedTextureMapType

# Set the value of the property.
projectedTextureMapControl_var.projectedTextureMapType = propertyValue
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
#include <Core/Materials/ProjectedTextureMapControl.h>

// Get the value of the property.
ProjectedTextureMapTypes propertyValue = projectedTextureMapControl_var->projectedTextureMapType();

// Set the value of the property, where value_var is a ProjectedTextureMapTypes.
bool returnValue = projectedTextureMapControl_var->projectedTextureMapType(value_var);

Property Value

This is a read/write property whose value is a ProjectedTextureMapTypes.

Version

Introduced in version March 2022


ProjectedTextureMapControl.reset Method

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Resets the texture map back to its original default settings.

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
returnValue = projectedTextureMapControl_var.reset()
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

#include <Core/Materials/ProjectedTextureMapControl.h>

returnValue = projectedTextureMapControl_var->reset();

Return Value

Type | Description
boolean | Returns true if the reset was successful.

Version

Introduced in version March 2022


ProjectedTextureMapControl.transform Property

Parent Object: ProjectedTextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/ProjectedTextureMapControl.h>

Description

Gets and sets the transform that defines the position and orientation of how the texture is projected onto the body. The Z axis of the transform corresponds to the axis that is specified in the user-interface and is the primary direction of the texture.

Syntax

  • Python
  • C++
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.

# Get the value of the property.
propertyValue = projectedTextureMapControl_var.transform

# Set the value of the property.
projectedTextureMapControl_var.transform = propertyValue
"projectedTextureMapControl_var" is a variable referencing a ProjectedTextureMapControl object.
#include <Core/Materials/ProjectedTextureMapControl.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = projectedTextureMapControl_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = projectedTextureMapControl_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version March 2022


Properties Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

A collection of properties that are associated with a material or appearance.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Appearance.appearanceProperties, AppearanceTexture.properties, Material.materialProperties

Version

Introduced in version August 2014


Properties.classType Method

Parent Object: Properties
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Properties.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Returns the number of properties within the collection.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Returns the specified property from the collection using an index into the collection.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Returns the specified property from the collection using the unique ID of the property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

Returns the specified Property using the name of the property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Properties.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

The base class for the specific property types used by materials and appearances.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

Accessed From

ConfigurationPropertyColumn.parentProperty, Properties.item, Properties.itemById, Properties.itemByName, PropertyGroup.item, PropertyGroup.itemById, PropertyGroup.itemByName

Derived Classes

AppearanceTextureProperty, BooleanProperty, ChoiceProperty, ColorProperty, FilenameProperty, FloatProperty, IntegerProperty, StringProperty

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version August 2014


Property.classType Method

Parent Object: Property
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Property.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/Property.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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


PropertyGroup Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Represents a group of properties and provides access to the properties.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 group using an index into the group.
itemById | Returns the specified property from the group using the unique ID of the property. The ID is consistent and can't be modified by the user and isn't affected by localization.
itemByName | Returns the specified Property using the name of the property.

Properties

Name | Description
count | Returns the number of properties within the group.
id | Returns the unique ID of this property.
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 group as seen in the user interface. This name is localized and can change based on the current language
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this group. Typically this will be a Component.

Accessed From

PropertyGroups.item, PropertyGroups.itemById, PropertyGroups.itemByName

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


PropertyGroup.classType Method

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.PropertyGroup.classType()
This is a static method.

#include <Core/Application/PropertyGroup.h>

returnValue = adsk::core::PropertyGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


PropertyGroup.count Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the number of properties within the group.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.count
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
uinteger propertyValue = propertyGroup_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


PropertyGroup.id Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the unique ID of this property.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.id
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
string propertyValue = propertyGroup_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


PropertyGroup.isValid Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.isValid
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
boolean propertyValue = propertyGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PropertyGroup.item Method

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the specified property from the group using an index into the group.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.
returnValue = propertyGroup_var.item(index)
"propertyGroup_var" is a variable referencing a PropertyGroup object.

#include <Core/Application/PropertyGroup.h>

returnValue = propertyGroup_var->item(index);

Return Value

Type | Description
Property | Returns the specified group or null if an invalid index was specified.

Parameters

Name | Type | Description
index | integer | The index of the property within the group where the first item is 0.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


PropertyGroup.itemById Method

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the specified property from the group using the unique ID of the property. The ID is consistent and can't be modified by the user and isn't affected by localization.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.
returnValue = propertyGroup_var.itemById(id)
"propertyGroup_var" is a variable referencing a PropertyGroup object.

#include <Core/Application/PropertyGroup.h>

returnValue = propertyGroup_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 January 2024


PropertyGroup.itemByName Method

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the specified Property using the name of the property.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.
returnValue = propertyGroup_var.itemByName(name)
"propertyGroup_var" is a variable referencing a PropertyGroup object.

#include <Core/Application/PropertyGroup.h>

returnValue = propertyGroup_var->itemByName(name);

Return Value

Type | Description
Property | Returns the specified property or null if the name doesn't match a property within the group.

Parameters

Name | Type | Description
name | string | The name of the property to return. This is the name as seen in the user interface and may be localized.

Version

Introduced in version January 2024


PropertyGroup.name Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the name of this group as seen in the user interface. This name is localized and can change based on the current language

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.name

# Set the value of the property.
propertyGroup_var.name = propertyValue
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
string propertyValue = propertyGroup_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = propertyGroup_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2024


PropertyGroup.objectType Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.objectType
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
string propertyValue = propertyGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


PropertyGroup.parent Property

Parent Object: PropertyGroup
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroup.h>

Description

Returns the parent of this group. Typically this will be a Component.

Syntax

  • Python
  • C++
"propertyGroup_var" is a variable referencing a PropertyGroup object.

# Get the value of the property.
propertyValue = propertyGroup_var.parent
"propertyGroup_var" is a variable referencing a PropertyGroup object.
#include <Core/Application/PropertyGroup.h>

// Get the value of the property.
Ptr<Base> propertyValue = propertyGroup_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


PropertyGroups Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

A collection of PropertyGroup objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 group from the collection using an index into the collection.
itemById | Returns the specified property group from the collection using the unique ID of the property group. The ID is consistent and can't be modified by the user and isn't affected by localization.
itemByName | Returns the specified PropertyGroup using the name of the group.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BaseComponent.propertyGroups, Component.propertyGroups, FlatPatternComponent.propertyGroups

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


PropertyGroups.classType Method

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.PropertyGroups.classType()
This is a static method.

#include <Core/Application/PropertyGroups.h>

returnValue = adsk::core::PropertyGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


PropertyGroups.count Property

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Returns the number of properties within the collection.

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.

# Get the value of the property.
propertyValue = propertyGroups_var.count
"propertyGroups_var" is a variable referencing a PropertyGroups object.
#include <Core/Application/PropertyGroups.h>

// Get the value of the property.
uinteger propertyValue = propertyGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2024


PropertyGroups.isValid Property

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.

# Get the value of the property.
propertyValue = propertyGroups_var.isValid
"propertyGroups_var" is a variable referencing a PropertyGroups object.
#include <Core/Application/PropertyGroups.h>

// Get the value of the property.
boolean propertyValue = propertyGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


PropertyGroups.item Method

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Returns the specified property group from the collection using an index into the collection.

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.
returnValue = propertyGroups_var.item(index)
"propertyGroups_var" is a variable referencing a PropertyGroups object.

#include <Core/Application/PropertyGroups.h>

returnValue = propertyGroups_var->item(index);

Return Value

Type | Description
PropertyGroup | 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 January 2024


PropertyGroups.itemById Method

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Returns the specified property group from the collection using the unique ID of the property group. The ID is consistent and can't be modified by the user and isn't affected by localization.

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.
returnValue = propertyGroups_var.itemById(id)
"propertyGroups_var" is a variable referencing a PropertyGroups object.

#include <Core/Application/PropertyGroups.h>

returnValue = propertyGroups_var->itemById(id);

Return Value

Type | Description
PropertyGroup | Returns the specified PropertyGroup or null if the ID doesn't match a group within the collection.

Parameters

Name | Type | Description
id | string | The unique ID of the property group.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version January 2024


PropertyGroups.itemByName Method

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

Returns the specified PropertyGroup using the name of the group.

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.
returnValue = propertyGroups_var.itemByName(name)
"propertyGroups_var" is a variable referencing a PropertyGroups object.

#include <Core/Application/PropertyGroups.h>

returnValue = propertyGroups_var->itemByName(name);

Return Value

Type | Description
PropertyGroup | Returns the specified group or null if the name doesn't match a group within the collection.

Parameters

Name | Type | Description
name | string | The name of the group to return. This is the name as seen in the user interface. Not all groups have a name.

Version

Introduced in version January 2024


PropertyGroups.objectType Property

Parent Object: PropertyGroups
Defined in namespace "adsk::core" and the header file is <Core/Application/PropertyGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"propertyGroups_var" is a variable referencing a PropertyGroups object.

# Get the value of the property.
propertyValue = propertyGroups_var.objectType
"propertyGroups_var" is a variable referencing a PropertyGroups object.
#include <Core/Application/PropertyGroups.h>

// Get the value of the property.
string propertyValue = propertyGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


RadialMarkingMenu Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

Description

Represents the marking menu which is the round menu that's displayed when the user right-clicks within Fusion. This supports customizing the contents of the marking menu.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

Description

Completely clears the contents of the marking menu. If left in this state, the marking menu will not be displayed.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.create Method

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.eastCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.isValid Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.northeastCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.northwestCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.objectType Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.southeastCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.southwestCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.text Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadialMarkingMenu.westCommand Property

Parent Object: RadialMarkingMenu
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadialMarkingMenu.h>

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.

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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


RadioButtonGroupCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Provides a command input to get the choice from a radio button group from the user.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: RadioButtonGroupCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
returnValue = radioButtonGroupCommandInput_var.deleteMe()
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

returnValue = radioButtonGroupCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


RadioButtonGroupCommandInput.id Property

Parent Object: RadioButtonGroupCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

Description

Gets and sets the item in the radio button list that is currently selected.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/RadioButtonGroupCommandInput.h>

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.

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


RecognizedHole Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Object that represents a hole, a hole is made of one or more segments.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
recognizeHoles | **RETIRED** Returns a collection of all recognized holes.
recognizeHolesWithInput | Preview Returns a collection of all recognized holes.
segment | Returns the segment at the specified index from this hole. The collection of segments that comprise this hole are in order. The first segment is at the top of this hole and the last segment is at the bottom.

Properties

Name | Description
axis | Returns the unit vector that points straight up out of the hole in the global coordinate system.
bottom | Returns a point at the center of the hole bottom.
bottomDiameter | Returns the diameter of the bottom of this hole (bottom diameter of the last segment contained in this hole).
hasErrors | Returns true if there are any errors associated with this hole.
hasWarnings | Returns true if there are any warnings associated with this hole.
isThreaded | Returns true if at least one segment of this hole is threaded, i.e. associated with a thread feature.
isThrough | Returns true if this is a through hole, i.e. if the bottom is open.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
segmentCount | Returns the number of segments contained in this hole.
top | Returns a point at the center of the hole top.
topDiameter | Returns the diameter of the top of this hole (top diameter of the first segment contained in this hole).
totalLength | Returns the total length of all segments contained in this hole.

Accessed From

RecognizedHoleGroup.item, RecognizedHoles.item

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHole.axis Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the unit vector that points straight up out of the hole in the global coordinate system.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.axis
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = recognizedHole_var->axis();

Property Value

This is a read only property whose value is a Vector3D.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version May 2023


RecognizedHole.bottom Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns a point at the center of the hole bottom.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.bottom
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = recognizedHole_var->bottom();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2023


RecognizedHole.bottomDiameter Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the diameter of the bottom of this hole (bottom diameter of the last segment contained in this hole).

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.bottomDiameter
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
double propertyValue = recognizedHole_var->bottomDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2023


RecognizedHole.classType Method

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHole.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHole.h>

returnValue = adsk::cam::RecognizedHole::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RecognizedHole.hasErrors Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns true if there are any errors associated with this hole.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.hasErrors
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
boolean propertyValue = recognizedHole_var->hasErrors();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHole.hasWarnings Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns true if there are any warnings associated with this hole.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.hasWarnings
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
boolean propertyValue = recognizedHole_var->hasWarnings();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHole.isThreaded Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns true if at least one segment of this hole is threaded, i.e. associated with a thread feature.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.isThreaded
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
boolean propertyValue = recognizedHole_var->isThreaded();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHole.isThrough Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns true if this is a through hole, i.e. if the bottom is open.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.isThrough
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
boolean propertyValue = recognizedHole_var->isThrough();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHole.isValid Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.isValid
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
boolean propertyValue = recognizedHole_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHole.objectType Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.objectType
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
string propertyValue = recognizedHole_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RecognizedHole.recognizeHoles Method

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Returns a collection of all recognized holes.

Remarks

This property has been retired. Please use recognizeHolesWithInput instead.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHole.recognizeHoles(bodies)
This is a static method.

#include <Cam/HoleRecognition/RecognizedHole.h>

returnValue = adsk::cam::RecognizedHole::recognizeHoles(bodies);

Parameters

Name | Type | Description
bodies | Base[] | Model bodies on which to recognize holes.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version May 2023
Retired in version July 2024


RecognizedHole.recognizeHolesWithInput Method

Parent Object: RecognizedHole

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns a collection of all recognized holes.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHole.recognizeHolesWithInput(bodies, input)
This is a static method.

#include <Cam/HoleRecognition/RecognizedHole.h>

returnValue = adsk::cam::RecognizedHole::recognizeHolesWithInput(bodies, input);

Parameters

Name | Type | Description
bodies | Base[] | Model bodies on which to recognize holes.
input | RecognizedHolesInput | Input object that contains filtering settings

Version

Introduced in version January 2024


RecognizedHole.segment Method

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the segment at the specified index from this hole. The collection of segments that comprise this hole are in order. The first segment is at the top of this hole and the last segment is at the bottom.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.
returnValue = recognizedHole_var.segment(index)
"recognizedHole_var" is a variable referencing a RecognizedHole object.

#include <Cam/HoleRecognition/RecognizedHole.h>

returnValue = recognizedHole_var->segment(index);

Parameters

Name | Type | Description
index | uinteger | The index of the segment within this hole to return. The first segment in this hole has an index of 0.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHole.segmentCount Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the number of segments contained in this hole.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.segmentCount
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
uinteger propertyValue = recognizedHole_var->segmentCount();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHole.top Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns a point at the center of the hole top.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.top
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = recognizedHole_var->top();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2023


RecognizedHole.topDiameter Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the diameter of the top of this hole (top diameter of the first segment contained in this hole).

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.topDiameter
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
double propertyValue = recognizedHole_var->topDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2023


RecognizedHole.totalLength Property

Parent Object: RecognizedHole
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHole.h>

Description

Returns the total length of all segments contained in this hole.

Syntax

  • Python
  • C++
"recognizedHole_var" is a variable referencing a RecognizedHole object.

# Get the value of the property.
propertyValue = recognizedHole_var.totalLength
"recognizedHole_var" is a variable referencing a RecognizedHole object.
#include <Cam/HoleRecognition/RecognizedHole.h>

// Get the value of the property.
double propertyValue = recognizedHole_var->totalLength();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2023


RecognizedHoleGroup Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Object that represents a collection of holes that contain similar geometry. Holes have similar geometry if they contain the same segment types with the same segment heights, diameters, etc...

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 hole at the specified index from this hole group.
recognizeHoleGroups | **RETIRED** Gets all recognized holes and returns them as hole groupings based on similar geometry.
recognizeHoleGroupsWithInput | Preview Gets all recognized holes and returns them as hole groupings based on similar geometry.

Properties

Name | Description
count | Returns the number of holes contained in this hole group.
hasErrors | Returns true if there are any errors associated with this hole group.
hasWarnings | Returns true if there are any warnings associated with this hole group.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedHoleGroups.item

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleGroup.classType Method

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoleGroup.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

returnValue = adsk::cam::RecognizedHoleGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RecognizedHoleGroup.count Property

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Returns the number of holes contained in this hole group.

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

# Get the value of the property.
propertyValue = recognizedHoleGroup_var.count
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

// Get the value of the property.
uinteger propertyValue = recognizedHoleGroup_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleGroup.hasErrors Property

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Returns true if there are any errors associated with this hole group.

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

# Get the value of the property.
propertyValue = recognizedHoleGroup_var.hasErrors
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleGroup_var->hasErrors();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleGroup.hasWarnings Property

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Returns true if there are any warnings associated with this hole group.

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

# Get the value of the property.
propertyValue = recognizedHoleGroup_var.hasWarnings
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleGroup_var->hasWarnings();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleGroup.isValid Property

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

# Get the value of the property.
propertyValue = recognizedHoleGroup_var.isValid
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleGroup.item Method

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Returns the hole at the specified index from this hole group.

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
returnValue = recognizedHoleGroup_var.item(index)
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

returnValue = recognizedHoleGroup_var->item(index);

Parameters

Name | Type | Description
index | uinteger | The index of the hole within this hole group to return. The first hole in this hole group has an index of 0.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleGroup.objectType Property

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.

# Get the value of the property.
propertyValue = recognizedHoleGroup_var.objectType
"recognizedHoleGroup_var" is a variable referencing a RecognizedHoleGroup object.
#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

// Get the value of the property.
string propertyValue = recognizedHoleGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RecognizedHoleGroup.recognizeHoleGroups Method

Parent Object: RecognizedHoleGroup
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets all recognized holes and returns them as hole groupings based on similar geometry.

Remarks

This property has been retired. Please use recognizeHoleGroupsWithInput instead.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoleGroup.recognizeHoleGroups(bodies)
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

returnValue = adsk::cam::RecognizedHoleGroup::recognizeHoleGroups(bodies);

Parameters

Name | Type | Description
bodies | Base[] | Model bodies on which to recognize holes.

Version

Introduced in version May 2023
Retired in version July 2024


RecognizedHoleGroup.recognizeHoleGroupsWithInput Method

Parent Object: RecognizedHoleGroup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroup.h>

Description

Gets all recognized holes and returns them as hole groupings based on similar geometry.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoleGroup.recognizeHoleGroupsWithInput(bodies, input)
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoleGroup.h>

returnValue = adsk::cam::RecognizedHoleGroup::recognizeHoleGroupsWithInput(bodies, input);

Parameters

Name | Type | Description
bodies | Base[] | Model bodies on which to recognize holes.
input | RecognizedHolesInput | Input object that contains filtering settings

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version January 2024


RecognizedHoleGroups Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

Object that represents a collection of hole groups.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 hole group at the specified index from this collection of hole groups.

Properties

Name | Description
count | Returns the number of hole groups contained in this hole group 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedHoleGroup.recognizeHoleGroups, RecognizedHoleGroup.recognizeHoleGroupsWithInput

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleGroups.classType Method

Parent Object: RecognizedHoleGroups
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoleGroups.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoleGroups.h>

returnValue = adsk::cam::RecognizedHoleGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RecognizedHoleGroups.count Property

Parent Object: RecognizedHoleGroups
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

Returns the number of hole groups contained in this hole group collection.

Syntax

  • Python
  • C++
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.

# Get the value of the property.
propertyValue = recognizedHoleGroups_var.count
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.
#include <Cam/HoleRecognition/RecognizedHoleGroups.h>

// Get the value of the property.
uinteger propertyValue = recognizedHoleGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version May 2023


RecognizedHoleGroups.isValid Property

Parent Object: RecognizedHoleGroups
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.

# Get the value of the property.
propertyValue = recognizedHoleGroups_var.isValid
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.
#include <Cam/HoleRecognition/RecognizedHoleGroups.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleGroups.item Method

Parent Object: RecognizedHoleGroups
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

Returns the hole group at the specified index from this collection of hole groups.

Syntax

  • Python
  • C++
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.
returnValue = recognizedHoleGroups_var.item(index)
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.

#include <Cam/HoleRecognition/RecognizedHoleGroups.h>

returnValue = recognizedHoleGroups_var->item(index);

Parameters

Name | Type | Description
index | uinteger | The index of the hole group within this hole group collection to return. The first hole group in this collection has an index of 0.

Version

Introduced in version May 2023


RecognizedHoleGroups.objectType Property

Parent Object: RecognizedHoleGroups
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.

# Get the value of the property.
propertyValue = recognizedHoleGroups_var.objectType
"recognizedHoleGroups_var" is a variable referencing a RecognizedHoleGroups object.
#include <Cam/HoleRecognition/RecognizedHoleGroups.h>

// Get the value of the property.
string propertyValue = recognizedHoleGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RecognizedHoles Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

Object that represents a collection of holes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 hole at the specified index from this collection of holes.

Properties

Name | Description
count | Returns the number of holes contained in this hole 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedHole.recognizeHoles, RecognizedHole.recognizeHolesWithInput

Version

Introduced in version May 2023


RecognizedHoles.classType Method

Parent Object: RecognizedHoles
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoles.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoles.h>

returnValue = adsk::cam::RecognizedHoles::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RecognizedHoles.count Property

Parent Object: RecognizedHoles
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

Returns the number of holes contained in this hole collection.

Syntax

  • Python
  • C++
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.

# Get the value of the property.
propertyValue = recognizedHoles_var.count
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.
#include <Cam/HoleRecognition/RecognizedHoles.h>

// Get the value of the property.
uinteger propertyValue = recognizedHoles_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2023


RecognizedHoles.isValid Property

Parent Object: RecognizedHoles
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.

# Get the value of the property.
propertyValue = recognizedHoles_var.isValid
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.
#include <Cam/HoleRecognition/RecognizedHoles.h>

// Get the value of the property.
boolean propertyValue = recognizedHoles_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoles.item Method

Parent Object: RecognizedHoles
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

Returns the hole at the specified index from this collection of holes.

Syntax

  • Python
  • C++
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.
returnValue = recognizedHoles_var.item(index)
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.

#include <Cam/HoleRecognition/RecognizedHoles.h>

returnValue = recognizedHoles_var->item(index);

Parameters

Name | Type | Description
index | uinteger | The index of the hole within this hole collection to return. The first hole in this collection has an index of 0.

Version

Introduced in version May 2023


RecognizedHoles.objectType Property

Parent Object: RecognizedHoles
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoles.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.

# Get the value of the property.
propertyValue = recognizedHoles_var.objectType
"recognizedHoles_var" is a variable referencing a RecognizedHoles object.
#include <Cam/HoleRecognition/RecognizedHoles.h>

// Get the value of the property.
string propertyValue = recognizedHoles_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RecognizedHoleSegment Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Object that represents a hole segment, i.e. a single geometric shape like a cylinder or cone within the context of a hole. A segment represents a hole face.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Returns the unit vector that points straight up out of the segment in the global coordinate system.
bottomDiameter | Returns the diameter of the bottom of this segment.
face | **RETIRED** Returns the model face this segment references.
faces | Returns the model faces this segment references.
halfAngle | For hole segments of type Cone, returns the cone's half angle, i.e. the angle between the axis of the cone and its surface. Returns 0 for other segment types.
height | Returns the height of this segment from top to bottom.
holeSegmentType | Returns whether this segment represents a cylinder, cone, flat, or torus geometry type
isThreaded | Returns true if this segment is threaded, i.e. associated with a thread 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
threadFeatures | Returns the thread features associated with this segment, or null if none exist for this segment.
topDiameter | Returns the diameter of the top of this segment.

Accessed From

RecognizedHole.segment

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleSegment.axis Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the unit vector that points straight up out of the segment in the global coordinate system.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.axis
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = recognizedHoleSegment_var->axis();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version May 2023


RecognizedHoleSegment.bottomDiameter Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the diameter of the bottom of this segment.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.bottomDiameter
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
double propertyValue = recognizedHoleSegment_var->bottomDiameter();

Property Value

This is a read only property whose value is a double.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleSegment.classType Method

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHoleSegment.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

returnValue = adsk::cam::RecognizedHoleSegment::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RecognizedHoleSegment.face Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Returns the model face this segment references.

Remarks

This property has been retired. Please use "RecognizedHoleSegment.faces()"

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.face
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
Ptr<Base> propertyValue = recognizedHoleSegment_var->face();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2023
Retired in version May 2023


RecognizedHoleSegment.faces Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the model faces this segment references.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.faces
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = recognizedHoleSegment_var->faces();

Property Value

This is a read only property whose value is an array of type Base.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleSegment.halfAngle Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

For hole segments of type Cone, returns the cone's half angle, i.e. the angle between the axis of the cone and its surface. Returns 0 for other segment types.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.halfAngle
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
double propertyValue = recognizedHoleSegment_var->halfAngle();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2023


RecognizedHoleSegment.height Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the height of this segment from top to bottom.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.height
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
double propertyValue = recognizedHoleSegment_var->height();

Property Value

This is a read only property whose value is a double.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleSegment.holeSegmentType Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns whether this segment represents a cylinder, cone, flat, or torus geometry type

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.holeSegmentType
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
HoleSegmentType propertyValue = recognizedHoleSegment_var->holeSegmentType();

Property Value

This is a read only property whose value is a HoleSegmentType.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version May 2023


RecognizedHoleSegment.isThreaded Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns true if this segment is threaded, i.e. associated with a thread feature.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.isThreaded
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleSegment_var->isThreaded();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleSegment.isValid Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.isValid
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
boolean propertyValue = recognizedHoleSegment_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RecognizedHoleSegment.objectType Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.objectType
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
string propertyValue = recognizedHoleSegment_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RecognizedHoleSegment.threadFeatures Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the thread features associated with this segment, or null if none exist for this segment.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.threadFeatures
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
std::vector<Ptr<ThreadFeature>> propertyValue = recognizedHoleSegment_var->threadFeatures();

Property Value

This is a read only property whose value is an array of type ThreadFeature.

Version

Introduced in version May 2023


RecognizedHoleSegment.topDiameter Property

Parent Object: RecognizedHoleSegment
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHoleSegment.h>

Description

Returns the diameter of the top of this segment.

Syntax

  • Python
  • C++
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.

# Get the value of the property.
propertyValue = recognizedHoleSegment_var.topDiameter
"recognizedHoleSegment_var" is a variable referencing a RecognizedHoleSegment object.
#include <Cam/HoleRecognition/RecognizedHoleSegment.h>

// Get the value of the property.
double propertyValue = recognizedHoleSegment_var->topDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2023


RecognizedHolesInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

Object that contains the settings used by recognizedHoles and recognizedHoleGroups.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an empty input object to be passed into recognizedHoles or recognizedHoleGroups

Properties

Name | Description
filterPartialHoles | Partial holes will not be included in recognized holes when set to true. Holes that intersect edges are considered partial holes. If a hole has multiple segments, such as a counterbore hole, all the segments inside the hole must intersect an edge for the hole to be considered a partial hole.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedHolesInput.create

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version January 2024


RecognizedHolesInput.classType Method

Parent Object: RecognizedHolesInput
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHolesInput.classType()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHolesInput.h>

returnValue = adsk::cam::RecognizedHolesInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


RecognizedHolesInput.create Method

Parent Object: RecognizedHolesInput
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

Creates an empty input object to be passed into recognizedHoles or recognizedHoleGroups

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedHolesInput.create()
This is a static method.

#include <Cam/HoleRecognition/RecognizedHolesInput.h>

returnValue = adsk::cam::RecognizedHolesInput::create();

Return Value

Type | Description
RecognizedHolesInput | The newly created input object.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version January 2024


RecognizedHolesInput.filterPartialHoles Property

Parent Object: RecognizedHolesInput
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

Partial holes will not be included in recognized holes when set to true. Holes that intersect edges are considered partial holes. If a hole has multiple segments, such as a counterbore hole, all the segments inside the hole must intersect an edge for the hole to be considered a partial hole.

Syntax

  • Python
  • C++
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.

# Get the value of the property.
propertyValue = recognizedHolesInput_var.filterPartialHoles

# Set the value of the property.
recognizedHolesInput_var.filterPartialHoles = propertyValue
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.
#include <Cam/HoleRecognition/RecognizedHolesInput.h>

// Get the value of the property.
boolean propertyValue = recognizedHolesInput_var->filterPartialHoles();

// Set the value of the property, where value_var is a boolean.
bool returnValue = recognizedHolesInput_var->filterPartialHoles(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


RecognizedHolesInput.isValid Property

Parent Object: RecognizedHolesInput
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.

# Get the value of the property.
propertyValue = recognizedHolesInput_var.isValid
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.
#include <Cam/HoleRecognition/RecognizedHolesInput.h>

// Get the value of the property.
boolean propertyValue = recognizedHolesInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


RecognizedHolesInput.objectType Property

Parent Object: RecognizedHolesInput
Defined in namespace "adsk::cam" and the header file is <Cam/HoleRecognition/RecognizedHolesInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.

# Get the value of the property.
propertyValue = recognizedHolesInput_var.objectType
"recognizedHolesInput_var" is a variable referencing a RecognizedHolesInput object.
#include <Cam/HoleRecognition/RecognizedHolesInput.h>

// Get the value of the property.
string propertyValue = recognizedHolesInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


RecognizedPocket Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Object that represents a single pocket (an outer boundary with depth and optional islands) which has been recognized on the model. See PocketRecognitionSelection for making a selection as in the UI

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
recognizePockets | Gets all recognized pockets from the given body and returns them

Properties

Name | Description
bottomType | Returns the type of bottom edge this pocket has.
boundaries | Returns the outside boundaries of this pocket (in cm).
depth | Returns the depth of the pocket in centimeters, i.e. the positive distance from top to bottom
faces | Returns all faces making up the pocket.
isClosed | Returns true if this pocket is closed, i.e. if its boundary is a single closed curve.
islands | Returns each island inside this pocket as a separate ProfileLoop object (in cm).
isThrough | Returns true if this is a through pocket, i.e. if the bottom is open.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sharedFaces | Returns all faces making up the pocket, which are shared with other pockets.

Accessed From

RecognizedPockets.item

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.bottomType Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns the type of bottom edge this pocket has.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.bottomType
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
RecognizedPocketBottomType propertyValue = recognizedPocket_var->bottomType();

Property Value

This is a read only property whose value is a RecognizedPocketBottomType.

Version

Introduced in version July 2023


RecognizedPocket.boundaries Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns the outside boundaries of this pocket (in cm).

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.boundaries
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
std::vector<Ptr<Curve3DPath>> propertyValue = recognizedPocket_var->boundaries();

Property Value

This is a read only property whose value is an array of type Curve3DPath.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.classType Method

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedPocket.classType()
This is a static method.

#include <Cam/PocketRecognition/RecognizedPocket.h>

returnValue = adsk::cam::RecognizedPocket::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


RecognizedPocket.depth Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns the depth of the pocket in centimeters, i.e. the positive distance from top to bottom

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.depth
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
double propertyValue = recognizedPocket_var->depth();

Property Value

This is a read only property whose value is a double.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.faces Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns all faces making up the pocket.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.faces
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = recognizedPocket_var->faces();

Property Value

This is a read only property whose value is an array of type BRepFace.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version March 2025


RecognizedPocket.isClosed Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns true if this pocket is closed, i.e. if its boundary is a single closed curve.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.isClosed
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
boolean propertyValue = recognizedPocket_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.islands Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns each island inside this pocket as a separate ProfileLoop object (in cm).

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.islands
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
std::vector<Ptr<Curve3DPath>> propertyValue = recognizedPocket_var->islands();

Property Value

This is a read only property whose value is an array of type Curve3DPath.

Version

Introduced in version July 2023


RecognizedPocket.isThrough Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns true if this is a through pocket, i.e. if the bottom is open.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.isThrough
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
boolean propertyValue = recognizedPocket_var->isThrough();

Property Value

This is a read only property whose value is a boolean.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.isValid Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.isValid
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
boolean propertyValue = recognizedPocket_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


RecognizedPocket.objectType Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.objectType
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
string propertyValue = recognizedPocket_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


RecognizedPocket.recognizePockets Method

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Gets all recognized pockets from the given body and returns them

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedPocket.recognizePockets(body, attackVector)
This is a static method.

#include <Cam/PocketRecognition/RecognizedPocket.h>

returnValue = adsk::cam::RecognizedPocket::recognizePockets(body, attackVector);

Parameters

Name | Type | Description
body | Base | Model body on which to recognize pockets
attackVector | Vector3D | A vector defining the orientation in which to search for pockets. This should be the vector pointing down along the tool towards its tip and the pocket floors.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPocket.sharedFaces Property

Parent Object: RecognizedPocket
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPocket.h>

Description

Returns all faces making up the pocket, which are shared with other pockets.

Syntax

  • Python
  • C++
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.

# Get the value of the property.
propertyValue = recognizedPocket_var.sharedFaces
"recognizedPocket_var" is a variable referencing a RecognizedPocket object.
#include <Cam/PocketRecognition/RecognizedPocket.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = recognizedPocket_var->sharedFaces();

Property Value

This is a read only property whose value is an array of type BRepFace.

Version

Introduced in version March 2025


RecognizedPockets Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

Object that represents a collection of pockets.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 pocket at the specified index from this collection of pockets.

Properties

Name | Description
count | Returns the number of pockets contained in this pocket 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RecognizedPocket.recognizePockets

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


RecognizedPockets.classType Method

Parent Object: RecognizedPockets
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RecognizedPockets.classType()
This is a static method.

#include <Cam/PocketRecognition/RecognizedPockets.h>

returnValue = adsk::cam::RecognizedPockets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


RecognizedPockets.count Property

Parent Object: RecognizedPockets
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

Returns the number of pockets contained in this pocket collection.

Syntax

  • Python
  • C++
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.

# Get the value of the property.
propertyValue = recognizedPockets_var.count
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.
#include <Cam/PocketRecognition/RecognizedPockets.h>

// Get the value of the property.
uinteger propertyValue = recognizedPockets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2023


RecognizedPockets.isValid Property

Parent Object: RecognizedPockets
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.

# Get the value of the property.
propertyValue = recognizedPockets_var.isValid
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.
#include <Cam/PocketRecognition/RecognizedPockets.h>

// Get the value of the property.
boolean propertyValue = recognizedPockets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


RecognizedPockets.item Method

Parent Object: RecognizedPockets
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

Returns the pocket at the specified index from this collection of pockets.

Syntax

  • Python
  • C++
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.
returnValue = recognizedPockets_var.item(index)
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.

#include <Cam/PocketRecognition/RecognizedPockets.h>

returnValue = recognizedPockets_var->item(index);

Parameters

Name | Type | Description
index | uinteger | The index of the pocket within this pocket collection to return. The first pocket in this collection has an index of 0.

Version

Introduced in version July 2023


RecognizedPockets.objectType Property

Parent Object: RecognizedPockets
Defined in namespace "adsk::cam" and the header file is <Cam/PocketRecognition/RecognizedPockets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.

# Get the value of the property.
propertyValue = recognizedPockets_var.objectType
"recognizedPockets_var" is a variable referencing a RecognizedPockets object.
#include <Cam/PocketRecognition/RecognizedPockets.h>

// Get the value of the property.
string propertyValue = recognizedPockets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


RectangularPatternConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

A rectangular pattern constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
setDirectionOne | Sets all of the input required to define the pattern in the first direction.
setDirectionTwo | Sets all of the input required to define the pattern in the second direction.

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.
createdEntities | Returns an array that contains all of the sketch entities that were created as a result of the pattern. This does not contain the original entities that were used as input to the pattern. The input entities can be obtained by using the entities property.
directionOneEntity | Gets and sets the entity that defined the first direction of the pattern. This can be null which indicates to use the default which is the X-axis of the sketch. Setting this property to null will automatically clear directionTwoEntity, if it has been set.
directionTwoEntity | Gets and sets the entity that defines the second direction of the pattern. This can be null which indicates to use the default direction, which is perpendicular to direction one. The directionOneEntity property must be set before setting this property.
distanceOne | Returns the parameter that controls the distance in first direction. To change the value, use the properties on the returned ModelParameter object.
distanceTwo | Returns the parameter that controls the distance in second direction. To change the value, use the properties on the returned ModelParameter object.
distanceType | Gets and sets how the distance between elements is computed.
entities | Gets and sets the entities that are patterned. Sketch points and curves are valid entities to pattern.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isDeletable | Indicates if this constraint is deletable.
isSuppressed Specifies which, if any, instances of the pattern are suppressed. This returns an array of Boolean values that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

The indices represent the pattern instances in a row-column order, with the initial geometry not counting. For example, if you have a 4x4 pattern, the array will have 15 elements rather than 16 because the original geometry cannot be suppressed as part of the pattern. The first element in the array is the one next to the original in the first direction. The second element is the next one on the first row, and the third is the next one. The fourth element will be the first element in the row next to the first row that contains the original geometry.
isSymmetricInDirectionOne | Gets and sets if the pattern in direction one is in one direction or is symmetric.
isSymmetricInDirectionTwo | Gets and sets if the pattern in direction two is in one direction or is symmetric.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch object.
quantityOne | Returns the parameter that controls the number of instances in the first direction. To change the value, use the properties on the returned ModelParameter.
quantityTwo | Returns the parameter that controls the number of instances in the second direction. To change the value, use the properties on the returned ModelParameter object.

Accessed From

GeometricConstraints.addRectangularPattern, RectangularPatternConstraint.createForAssemblyContext, RectangularPatternConstraint.nativeObject

Version

Introduced in version March 2016


RectangularPatternConstraint.assemblyContext Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.createdEntities Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns an array that contains all of the sketch entities that were created as a result of the pattern. This does not contain the original entities that were used as input to the pattern. The input entities can be obtained by using the entities property.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.createdEntities
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = rectangularPatternConstraint_var->createdEntities();

Property Value

This is a read only property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


RectangularPatternConstraint.createForAssemblyContext Method

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

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.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
returnValue = rectangularPatternConstraint_var.createForAssemblyContext(occurrence)
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

#include <Fusion/Sketch/RectangularPatternConstraint.h>

returnValue = rectangularPatternConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RectangularPatternConstraint | 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 2022


RectangularPatternConstraint.deleteMe Method

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.directionOneEntity Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets the entity that defined the first direction of the pattern. This can be null which indicates to use the default which is the X-axis of the sketch. Setting this property to null will automatically clear directionTwoEntity, if it has been set.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.directionOneEntity

# Set the value of the property.
rectangularPatternConstraint_var.directionOneEntity = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = rectangularPatternConstraint_var->directionOneEntity();

// Set the value of the property, where value_var is a SketchLine.
bool returnValue = rectangularPatternConstraint_var->directionOneEntity(value_var);

Property Value

This is a read/write property whose value is a SketchLine.

Version

Introduced in version September 2022


RectangularPatternConstraint.directionTwoEntity Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets the entity that defines the second direction of the pattern. This can be null which indicates to use the default direction, which is perpendicular to direction one. The directionOneEntity property must be set before setting this property.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.directionTwoEntity

# Set the value of the property.
rectangularPatternConstraint_var.directionTwoEntity = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = rectangularPatternConstraint_var->directionTwoEntity();

// Set the value of the property, where value_var is a SketchLine.
bool returnValue = rectangularPatternConstraint_var->directionTwoEntity(value_var);

Property Value

This is a read/write property whose value is a SketchLine.

Version

Introduced in version September 2022


RectangularPatternConstraint.distanceOne Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the parameter that controls the distance in first direction. To change the value, use the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.distanceOne
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternConstraint_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


RectangularPatternConstraint.distanceTwo Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the parameter that controls the distance in second direction. To change the value, use the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.distanceTwo
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternConstraint_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


RectangularPatternConstraint.distanceType Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets how the distance between elements is computed.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.distanceType

# Set the value of the property.
rectangularPatternConstraint_var.distanceType = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
PatternDistanceType propertyValue = rectangularPatternConstraint_var->distanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = rectangularPatternConstraint_var->distanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version September 2022


RectangularPatternConstraint.entities Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets the entities that are patterned. Sketch points and curves are valid entities to pattern.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.entities

# Set the value of the property.
rectangularPatternConstraint_var.entities = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = rectangularPatternConstraint_var->entities();

// Set the value of the property, where value_var is a SketchEntity.
bool returnValue = rectangularPatternConstraint_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


RectangularPatternConstraint.entityToken Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.entityToken
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
string propertyValue = rectangularPatternConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RectangularPatternConstraint.isDeletable Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Indicates if this constraint is deletable.

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.isSuppressed Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Specifies which, if any, instances of the pattern are suppressed. This returns an array of Boolean values that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

The indices represent the pattern instances in a row-column order, with the initial geometry not counting. For example, if you have a 4x4 pattern, the array will have 15 elements rather than 16 because the original geometry cannot be suppressed as part of the pattern. The first element in the array is the one next to the original in the first direction. The second element is the next one on the first row, and the third is the next one. The fourth element will be the first element in the row next to the first row that contains the original geometry.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.isSuppressed

# Set the value of the property.
rectangularPatternConstraint_var.isSuppressed = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
std::vector<boolean> propertyValue = rectangularPatternConstraint_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraint_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is an array of type boolean.

Version

Introduced in version September 2022


RectangularPatternConstraint.isSymmetricInDirectionOne Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets if the pattern in direction one is in one direction or is symmetric.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.isSymmetricInDirectionOne

# Set the value of the property.
rectangularPatternConstraint_var.isSymmetricInDirectionOne = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraint_var->isSymmetricInDirectionOne();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraint_var->isSymmetricInDirectionOne(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


RectangularPatternConstraint.isSymmetricInDirectionTwo Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Gets and sets if the pattern in direction two is in one direction or is symmetric.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.isSymmetricInDirectionTwo

# Set the value of the property.
rectangularPatternConstraint_var.isSymmetricInDirectionTwo = propertyValue
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraint_var->isSymmetricInDirectionTwo();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraint_var->isSymmetricInDirectionTwo(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


RectangularPatternConstraint.isValid Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.nativeObject Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

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.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.nativeObject
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<RectangularPatternConstraint> propertyValue = rectangularPatternConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a RectangularPatternConstraint.

Version

Introduced in version September 2022


RectangularPatternConstraint.objectType Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the parent sketch object.

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


RectangularPatternConstraint.quantityOne Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the parameter that controls the number of instances in the first direction. To change the value, use the properties on the returned ModelParameter.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.quantityOne
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternConstraint_var->quantityOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


RectangularPatternConstraint.quantityTwo Property

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Returns the parameter that controls the number of instances in the second direction. To change the value, use the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.quantityTwo
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternConstraint_var->quantityTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


RectangularPatternConstraint.setDirectionOne Method

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Sets all of the input required to define the pattern in the first direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
returnValue = rectangularPatternConstraint_var.setDirectionOne(directionOneEntity, quantityOne, distanceOne)
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

#include <Fusion/Sketch/RectangularPatternConstraint.h>

returnValue = rectangularPatternConstraint_var->setDirectionOne(directionOneEntity, quantityOne, distanceOne);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
directionOneEntity | SketchLine | Specifies the SketchLine object used to define the first direction entity. This argument can be null to indicate that the default first direction is to be used, which is along the X axis of the sketch.
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. 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.

Version

Introduced in version September 2022


RectangularPatternConstraint.setDirectionTwo Method

Parent Object: RectangularPatternConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraint.h>

Description

Sets all of the input required to define the pattern in the second direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
returnValue = rectangularPatternConstraint_var.setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo)
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

#include <Fusion/Sketch/RectangularPatternConstraint.h>

returnValue = rectangularPatternConstraint_var->setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
directionTwoEntity | SketchLine | Specifies the SketchLine object used to define the second direction entity. 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.

Version

Introduced in version September 2022


RectangularPatternConstraintInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Used to define the inputs need to create a rectangular pattern in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setDirectionOne | Sets all of the input required to define the pattern in the first direction.
setDirectionTwo | Sets all of the input required to define the pattern in the second direction.

Properties

Name | Description
directionOneEntity | Defines the first direction of the pattern. This can be null which indicates to use the default which is the X-axis of the sketch. Setting this property to null will automatically clear directionTwoEntity, if it has been set.
directionTwoEntity | Defines the second direction of the pattern. This can be null which indicates to use the default which is perpendicular to direction one. The directionOneEntity property must be set before setting this property.
distanceOne | Gets and sets the distance in the first direction.
distanceTwo | Gets and sets the distance in the second direction.
distanceType | Gets and sets how the distance between elements is computed.
entities | Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.
isSuppressed Specifies which, if any, instances of the pattern are suppressed. This defaults to all instances being visible. This returns an array of Booleans that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

Both the quantityOne and quantityTwo properties must be set with valid values before using the isSuppressed property is valid. A quantity of one is a valid value.

The indices represent the pattern instances in a row-column order, with the initial geometry not counting. For example, if you have a 4x4 pattern, the array will have 15 elements rather than 16 because the original geometry cannot be suppressed as part of the pattern. The first element in the array is the one next to the original in the first direction. The second element is the next one on the first row, and the third is the next one. The fourth element will be the first element in the row next to the first row that contains the original geometry.
isSymmetricInDirectionOne | Gets and sets if the pattern in direction one is in one direction or is symmetric.
isSymmetricInDirectionTwo | Gets and sets if the pattern in direction two is in one direction or is 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
quantityOne | Gets and sets the number of instances in the first direction.
quantityTwo | Gets and sets the number of instances in the second direction.

Accessed From

GeometricConstraints.createRectangularPatternInput

Version

Introduced in version September 2022


RectangularPatternConstraintInput.classType Method

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RectangularPatternConstraintInput.classType()
This is a static method.

#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

returnValue = adsk::fusion::RectangularPatternConstraintInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.directionOneEntity Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Defines the first direction of the pattern. This can be null which indicates to use the default which is the X-axis of the sketch. Setting this property to null will automatically clear directionTwoEntity, if it has been set.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.directionOneEntity

# Set the value of the property.
rectangularPatternConstraintInput_var.directionOneEntity = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = rectangularPatternConstraintInput_var->directionOneEntity();

// Set the value of the property, where value_var is a SketchLine.
bool returnValue = rectangularPatternConstraintInput_var->directionOneEntity(value_var);

Property Value

This is a read/write property whose value is a SketchLine.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.directionTwoEntity Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Defines the second direction of the pattern. This can be null which indicates to use the default which is perpendicular to direction one. The directionOneEntity property must be set before setting this property.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.directionTwoEntity

# Set the value of the property.
rectangularPatternConstraintInput_var.directionTwoEntity = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = rectangularPatternConstraintInput_var->directionTwoEntity();

// Set the value of the property, where value_var is a SketchLine.
bool returnValue = rectangularPatternConstraintInput_var->directionTwoEntity(value_var);

Property Value

This is a read/write property whose value is a SketchLine.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.distanceOne Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets the distance in the first direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.distanceOne

# Set the value of the property.
rectangularPatternConstraintInput_var.distanceOne = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternConstraintInput_var->distanceOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternConstraintInput_var->distanceOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.distanceTwo Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets the distance in the second direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.distanceTwo

# Set the value of the property.
rectangularPatternConstraintInput_var.distanceTwo = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternConstraintInput_var->distanceTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternConstraintInput_var->distanceTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.distanceType Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets how the distance between elements is computed.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.distanceType

# Set the value of the property.
rectangularPatternConstraintInput_var.distanceType = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
PatternDistanceType propertyValue = rectangularPatternConstraintInput_var->distanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = rectangularPatternConstraintInput_var->distanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.entities Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets the entities to pattern. Sketch points and curves are valid entities to pattern.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.entities

# Set the value of the property.
rectangularPatternConstraintInput_var.entities = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
std::vector<Ptr<SketchEntity>> propertyValue = rectangularPatternConstraintInput_var->entities();

// Set the value of the property, where value_var is a SketchEntity.
bool returnValue = rectangularPatternConstraintInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type SketchEntity.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.isSuppressed Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Specifies which, if any, instances of the pattern are suppressed. This defaults to all instances being visible. This returns an array of Booleans that indicates if a particular instance in the pattern is suppressed or not. A value of true will result in the associated instance being suppressed.

Both the quantityOne and quantityTwo properties must be set with valid values before using the isSuppressed property is valid. A quantity of one is a valid value.

The indices represent the pattern instances in a row-column order, with the initial geometry not counting. For example, if you have a 4x4 pattern, the array will have 15 elements rather than 16 because the original geometry cannot be suppressed as part of the pattern. The first element in the array is the one next to the original in the first direction. The second element is the next one on the first row, and the third is the next one. The fourth element will be the first element in the row next to the first row that contains the original geometry.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.isSuppressed

# Set the value of the property.
rectangularPatternConstraintInput_var.isSuppressed = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
std::vector<boolean> propertyValue = rectangularPatternConstraintInput_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraintInput_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is an array of type boolean.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.isSymmetricInDirectionOne Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets if the pattern in direction one is in one direction or is symmetric.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.isSymmetricInDirectionOne

# Set the value of the property.
rectangularPatternConstraintInput_var.isSymmetricInDirectionOne = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraintInput_var->isSymmetricInDirectionOne();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraintInput_var->isSymmetricInDirectionOne(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.isSymmetricInDirectionTwo Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets if the pattern in direction two is in one direction or is symmetric.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.isSymmetricInDirectionTwo

# Set the value of the property.
rectangularPatternConstraintInput_var.isSymmetricInDirectionTwo = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraintInput_var->isSymmetricInDirectionTwo();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternConstraintInput_var->isSymmetricInDirectionTwo(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.isValid Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.isValid
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraintInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.objectType Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.objectType
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
string propertyValue = rectangularPatternConstraintInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.quantityOne Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets the number of instances in the first direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.quantityOne

# Set the value of the property.
rectangularPatternConstraintInput_var.quantityOne = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternConstraintInput_var->quantityOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternConstraintInput_var->quantityOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.quantityTwo Property

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Gets and sets the number of instances in the second direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

# Get the value of the property.
propertyValue = rectangularPatternConstraintInput_var.quantityTwo

# Set the value of the property.
rectangularPatternConstraintInput_var.quantityTwo = propertyValue
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternConstraintInput_var->quantityTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternConstraintInput_var->quantityTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.setDirectionOne Method

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Sets all of the input required to define the pattern in the first direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
returnValue = rectangularPatternConstraintInput_var.setDirectionOne(directionOneEntity, quantityOne, distanceOne)
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

returnValue = rectangularPatternConstraintInput_var->setDirectionOne(directionOneEntity, quantityOne, distanceOne);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
directionOneEntity | SketchLine | Specifies the SketchLine object used to define the first direction entity. This argument can be null to indicate that the default first direction is to be used, which is along the X axis of the sketch.
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. 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.

Version

Introduced in version September 2022


RectangularPatternConstraintInput.setDirectionTwo Method

Parent Object: RectangularPatternConstraintInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/RectangularPatternConstraintInput.h>

Description

Sets all of the input required to define the pattern in the second direction.

Syntax

  • Python
  • C++
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.
returnValue = rectangularPatternConstraintInput_var.setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo)
"rectangularPatternConstraintInput_var" is a variable referencing a RectangularPatternConstraintInput object.

#include <Fusion/Sketch/RectangularPatternConstraintInput.h>

returnValue = rectangularPatternConstraintInput_var->setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
directionTwoEntity | SketchLine | Specifies the SketchLine object used to define the second direction entity. 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.

Version

Introduced in version September 2022


RectangularPatternFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Object that represents an existing rectangular pattern feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 will compute a default direction which is 90 degrees to the direction one.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
isSymmetricInDirectionOne Gets and sets if the pattern in direction one is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isSymmetricInDirectionTwo Gets and sets if the pattern in direction two is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
patternDistanceType Gets and sets how the distance between elements is computed. Is initialized to ExtentPatternDistanceType when a new RectangularPatternFeatureInput has been created.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeature.assemblyContext Property

Parent Object: RectangularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns a Vector3D indicating the positive direction of direction one.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns a Vector3D indicating the positive direction of direction two.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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 will compute a default direction which is 90 degrees to the direction one.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets the distance in the first direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets the distance in the second direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

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.entityToken Property

Parent Object: RectangularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.entityToken
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RectangularPatternFeature.errorOrWarningMessage Property

Parent Object: RectangularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets and sets if the pattern in direction one is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets and sets if the pattern in direction two is in one direction or symmetric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets and sets how the distance between elements is computed. Is initialized to ExtentPatternDistanceType when a new RectangularPatternFeatureInput has been created.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets the PatternElements collection that contains the elements created by this pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Get the features that were created for this pattern. Returns null in the case where the feature is parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Gets and sets the ids of the patterns to suppress.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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<uinteger> propertyValue = rectangularPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = rectangularPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type uinteger.

Version

Introduced in version November 2014


RectangularPatternFeature.timelineObject Property

Parent Object: RectangularPatternFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a rectangular pattern feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.classType Method

Parent Object: RectangularPatternFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Returns a Vector3D indicating the positive direction of direction one.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Returns a Vector3D indicating the positive direction of direction two.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets the distance in the first direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets the distance in the second direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets if the pattern in direction one is in one direction or symmetric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets if the pattern in direction two is in one direction or symmetric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets how the distance between elements is computed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets the number of instances in the first direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Gets and sets the number of instances in the second direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

Description

Sets all of the input required to define the pattern in the second direction.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.rectangularPatternFeatures

Samples

Name | Description
Manage Participant Bodies API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeatures.add Method

Parent Object: RectangularPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

Creates a new rectangular pattern feature.

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 API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
rectangularPattern.add | Demonstrates the rectangularPattern.add method using a selected body and two selected edges to define the directions.

Version

Introduced in version November 2014


RectangularPatternFeatures.classType Method

Parent Object: RectangularPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

The number of rectangular pattern features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

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.

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 API Sample | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
rectangularPattern.add | Demonstrates the rectangularPattern.add method using a selected body and two selected edges to define the directions.

Version

Introduced in version November 2014


RectangularPatternFeatures.isValid Property

Parent Object: RectangularPatternFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

Function that returns the specified rectangular pattern feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

Function that returns the specified rectangular pattern feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RectangularPatternFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


RefoldFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Object that represents an existing refold feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RefoldFeatures.item, RefoldFeatures.itemByName

Version

Introduced in version August 2020


RefoldFeature.assemblyContext Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

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.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.assemblyContext
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = refoldFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2020


RefoldFeature.attributes Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.attributes
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = refoldFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2020


RefoldFeature.baseFeature Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

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.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.baseFeature
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = refoldFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version August 2020


RefoldFeature.bodies Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.bodies
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = refoldFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2020


RefoldFeature.classType Method

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RefoldFeature.classType()
This is a static method.

#include <Fusion/SheetMetal/RefoldFeature.h>

returnValue = adsk::fusion::RefoldFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


RefoldFeature.deleteMe Method

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.
returnValue = refoldFeature_var.deleteMe()
"refoldFeature_var" is a variable referencing a RefoldFeature object.

#include <Fusion/SheetMetal/RefoldFeature.h>

returnValue = refoldFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2020


RefoldFeature.dissolve Method

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

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.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.
returnValue = refoldFeature_var.dissolve()
"refoldFeature_var" is a variable referencing a RefoldFeature object.

#include <Fusion/SheetMetal/RefoldFeature.h>

returnValue = refoldFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2020


RefoldFeature.entityToken Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.entityToken
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
string propertyValue = refoldFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RefoldFeature.errorOrWarningMessage Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

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.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.errorOrWarningMessage
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
string propertyValue = refoldFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


RefoldFeature.faces Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.faces
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = refoldFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2020


RefoldFeature.healthState Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.healthState
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = refoldFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version August 2020


RefoldFeature.isParametric Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.isParametric
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
boolean propertyValue = refoldFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


RefoldFeature.isSuppressed Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.isSuppressed

# Set the value of the property.
refoldFeature_var.isSuppressed = propertyValue
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
boolean propertyValue = refoldFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = refoldFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2020


RefoldFeature.isValid Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.isValid
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
boolean propertyValue = refoldFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


RefoldFeature.linkedFeatures Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

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.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.linkedFeatures
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = refoldFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version August 2020


RefoldFeature.name Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.name

# Set the value of the property.
refoldFeature_var.name = propertyValue
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
string propertyValue = refoldFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = refoldFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2020


RefoldFeature.objectType Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.objectType
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
string propertyValue = refoldFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


RefoldFeature.parentComponent Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.parentComponent
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = refoldFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2020


RefoldFeature.timelineObject Property

Parent Object: RefoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"refoldFeature_var" is a variable referencing a RefoldFeature object.

# Get the value of the property.
propertyValue = refoldFeature_var.timelineObject
"refoldFeature_var" is a variable referencing a RefoldFeature object.
#include <Fusion/SheetMetal/RefoldFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = refoldFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2020


RefoldFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

Collection that provides access to all of the existing refold features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 refold feature using an index into the collection.
itemByName | Function that returns the specified refold feature using the name of the feature.

Properties

Name | Description
count | The number of refold 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.refoldFeatures

Version

Introduced in version August 2020


RefoldFeatures.classType Method

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RefoldFeatures.classType()
This is a static method.

#include <Fusion/SheetMetal/RefoldFeatures.h>

returnValue = adsk::fusion::RefoldFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


RefoldFeatures.count Property

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

The number of refold features in the collection.

Syntax

  • Python
  • C++
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.

# Get the value of the property.
propertyValue = refoldFeatures_var.count
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.
#include <Fusion/SheetMetal/RefoldFeatures.h>

// Get the value of the property.
uinteger propertyValue = refoldFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2020


RefoldFeatures.isValid Property

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.

# Get the value of the property.
propertyValue = refoldFeatures_var.isValid
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.
#include <Fusion/SheetMetal/RefoldFeatures.h>

// Get the value of the property.
boolean propertyValue = refoldFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


RefoldFeatures.item Method

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

Function that returns the specified refold feature using an index into the collection.

Syntax

  • Python
  • C++
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.
returnValue = refoldFeatures_var.item(index)
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.

#include <Fusion/SheetMetal/RefoldFeatures.h>

returnValue = refoldFeatures_var->item(index);

Return Value

Type | Description
RefoldFeature | 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 2020


RefoldFeatures.itemByName Method

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

Function that returns the specified refold feature using the name of the feature.

Syntax

  • Python
  • C++
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.
returnValue = refoldFeatures_var.itemByName(name)
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.

#include <Fusion/SheetMetal/RefoldFeatures.h>

returnValue = refoldFeatures_var->itemByName(name);

Return Value

Type | Description
RefoldFeature | 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 2020


RefoldFeatures.objectType Property

Parent Object: RefoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RefoldFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.

# Get the value of the property.
propertyValue = refoldFeatures_var.objectType
"refoldFeatures_var" is a variable referencing a RefoldFeatures object.
#include <Fusion/SheetMetal/RefoldFeatures.h>

// Get the value of the property.
string propertyValue = refoldFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


RemoveFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Object that represents an existing Remove feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


RemoveFeature.assemblyContext Property

Parent Object: RemoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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.entityToken Property

Parent Object: RemoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.entityToken
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
string propertyValue = removeFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RemoveFeature.errorOrWarningMessage Property

Parent Object: RemoveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Gets and sets the body or component occurrence to remove.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Collection that provides access to all of the existing Remove features in a component and supports the ability to create new Remove features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.removeFeatures

Samples

Name | Description
Remove Feature | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


RemoveFeatures.add Method

Parent Object: RemoveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Creates a new Remove feature.

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
removeFeatures.add | Demonstrate the removeFeatures.add method. The Remove feature is the same as selecting a body in the browser and selecting "Remove" in the context menu.
Remove Feature | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


removeFeatures.add

Description

Demonstrate the removeFeatures.add method. The Remove feature is the same as selecting a body in the browser and selecting "Remove" in the context menu.

Code Samples

  • Python
def demo_removeFeatures_add(rootComp: adsk.fusion.Component):
    body = _ui.selectEntity('Select a body', 'Bodies').entity

    removeFeatures = rootComp.features.removeFeatures
    removeFeature = removeFeatures.add(body)


RemoveFeatures.classType Method

Parent Object: RemoveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

The number of Remove features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Function that returns the specified Remove feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

Function that returns the specified remove feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RemoveFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


RenderEnvironment Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

A render environment that is used when defining the scene for rendering. You see these in the user interface in the "Environment Library" tab of the "Scene Settings" dialog. Use this with the backgroundEnvironment property of the SceneSettings object to set a render environment. For a custom render environment, use the loadCustomEnvironment method to statically create a custom environment and assign it to the backgroundEnvironment property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
loadCustomEnvironment | Statically creates a RenderEnvironment which can be used to set the environment for a scene using the SceneSettings.backgroundEnvironment property.

Properties

Name | Description
id | The internal ID of the environment.
isCustomEnvironment | Returns true if this environment is a custom environment.
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 environment.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RenderEnvironment.loadCustomEnvironment, RenderEnvironments.item, RenderEnvironments.itemById, RenderEnvironments.itemByName, SceneSettings.backgroundEnvironment

Version

Introduced in version May 2023


RenderEnvironment.classType Method

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderEnvironment.classType()
This is a static method.

#include <Fusion/Render/RenderEnvironment.h>

returnValue = adsk::fusion::RenderEnvironment::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RenderEnvironment.id Property

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

The internal ID of the environment.

Syntax

  • Python
  • C++
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.

# Get the value of the property.
propertyValue = renderEnvironment_var.id
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.
#include <Fusion/Render/RenderEnvironment.h>

// Get the value of the property.
string propertyValue = renderEnvironment_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderEnvironment.isCustomEnvironment Property

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

Returns true if this environment is a custom environment.

Syntax

  • Python
  • C++
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.

# Get the value of the property.
propertyValue = renderEnvironment_var.isCustomEnvironment
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.
#include <Fusion/Render/RenderEnvironment.h>

// Get the value of the property.
boolean propertyValue = renderEnvironment_var->isCustomEnvironment();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderEnvironment.isValid Property

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.

# Get the value of the property.
propertyValue = renderEnvironment_var.isValid
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.
#include <Fusion/Render/RenderEnvironment.h>

// Get the value of the property.
boolean propertyValue = renderEnvironment_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderEnvironment.loadCustomEnvironment Method

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

Statically creates a RenderEnvironment which can be used to set the environment for a scene using the SceneSettings.backgroundEnvironment property.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderEnvironment.loadCustomEnvironment(fullFilename)
This is a static method.

#include <Fusion/Render/RenderEnvironment.h>

returnValue = adsk::fusion::RenderEnvironment::loadCustomEnvironment(fullFilename);

Parameters

Name | Type | Description
fullFilename | string |

Version

Introduced in version May 2023


RenderEnvironment.name Property

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

The name of the environment.

Syntax

  • Python
  • C++
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.

# Get the value of the property.
propertyValue = renderEnvironment_var.name
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.
#include <Fusion/Render/RenderEnvironment.h>

// Get the value of the property.
string propertyValue = renderEnvironment_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderEnvironment.objectType Property

Parent Object: RenderEnvironment
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironment.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.

# Get the value of the property.
propertyValue = renderEnvironment_var.objectType
"renderEnvironment_var" is a variable referencing a RenderEnvironment object.
#include <Fusion/Render/RenderEnvironment.h>

// Get the value of the property.
string propertyValue = renderEnvironment_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderEnvironments Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

The list of available render environments. This represents the list of environments shown in the "Scene Settings" dialog as being in the "Fusion Library". It does not include a custom environment, if one has been loaded.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 render environment using an index into the collection.
itemById | Returns the render environment with the specified ID.
itemByName | Returns the specified render environment using the name as seen in the user interface.

Properties

Name | Description
count | The number of render environments 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RenderManager.renderEnvironments

Version

Introduced in version May 2023


RenderEnvironments.classType Method

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderEnvironments.classType()
This is a static method.

#include <Fusion/Render/RenderEnvironments.h>

returnValue = adsk::fusion::RenderEnvironments::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RenderEnvironments.count Property

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

The number of render environments in the collection.

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

# Get the value of the property.
propertyValue = renderEnvironments_var.count
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
#include <Fusion/Render/RenderEnvironments.h>

// Get the value of the property.
uinteger propertyValue = renderEnvironments_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2023


RenderEnvironments.isValid Property

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

# Get the value of the property.
propertyValue = renderEnvironments_var.isValid
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
#include <Fusion/Render/RenderEnvironments.h>

// Get the value of the property.
boolean propertyValue = renderEnvironments_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderEnvironments.item Method

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

Method that returns the specified render environment using an index into the collection.

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
returnValue = renderEnvironments_var.item(index)
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

#include <Fusion/Render/RenderEnvironments.h>

returnValue = renderEnvironments_var->item(index);

Return Value

Type | Description
RenderEnvironment | Returns the specified render environment 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 May 2023


RenderEnvironments.itemById Method

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

Returns the render environment with the specified ID.

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
returnValue = renderEnvironments_var.itemById(id)
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

#include <Fusion/Render/RenderEnvironments.h>

returnValue = renderEnvironments_var->itemById(id);

Return Value

Type | Description
RenderEnvironment | Returns the specified render environment or null if the ID does not match a render environment.

Parameters

Name | Type | Description
id | string | The ID of the render environment to return.

Version

Introduced in version May 2023


RenderEnvironments.itemByName Method

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

Returns the specified render environment using the name as seen in the user interface.

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
returnValue = renderEnvironments_var.itemByName(name)
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

#include <Fusion/Render/RenderEnvironments.h>

returnValue = renderEnvironments_var->itemByName(name);

Return Value

Type | Description
RenderEnvironment | Returns the specified render environment or null if there's no match on the name.

Parameters

Name | Type | Description
name | string | The name of the render environment to return.

Version

Introduced in version May 2023


RenderEnvironments.objectType Property

Parent Object: RenderEnvironments
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEnvironments.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.

# Get the value of the property.
propertyValue = renderEnvironments_var.objectType
"renderEnvironments_var" is a variable referencing a RenderEnvironments object.
#include <Fusion/Render/RenderEnvironments.h>

// Get the value of the property.
string propertyValue = renderEnvironments_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderEvent Object

Derived from: Event Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

A RenderEvent represents an event that occurs in reaction to the rendering process in the Render workspace.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

InCanvasRendering.renderComplete

Version

Introduced in version September 2023


RenderEvent.add Method

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

Add a handler to be notified when the event occurs.

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.
returnValue = renderEvent_var.add(handler)
"renderEvent_var" is a variable referencing a RenderEvent object.

#include <Fusion/Render/RenderEvent.h>

returnValue = renderEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | RenderEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version September 2023


RenderEvent.classType Method

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderEvent.classType()
This is a static method.

#include <Fusion/Render/RenderEvent.h>

returnValue = adsk::fusion::RenderEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RenderEvent.isValid Property

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.

# Get the value of the property.
propertyValue = renderEvent_var.isValid
"renderEvent_var" is a variable referencing a RenderEvent object.
#include <Fusion/Render/RenderEvent.h>

// Get the value of the property.
boolean propertyValue = renderEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RenderEvent.name Property

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.

# Get the value of the property.
propertyValue = renderEvent_var.name
"renderEvent_var" is a variable referencing a RenderEvent object.
#include <Fusion/Render/RenderEvent.h>

// Get the value of the property.
string propertyValue = renderEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RenderEvent.objectType Property

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.

# Get the value of the property.
propertyValue = renderEvent_var.objectType
"renderEvent_var" is a variable referencing a RenderEvent object.
#include <Fusion/Render/RenderEvent.h>

// Get the value of the property.
string propertyValue = renderEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RenderEvent.remove Method

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.
returnValue = renderEvent_var.remove(handler)
"renderEvent_var" is a variable referencing a RenderEvent object.

#include <Fusion/Render/RenderEvent.h>

returnValue = renderEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | RenderEventHandler | The handler object to be removed from the event.

Version

Introduced in version September 2023


RenderEvent.sender Property

Parent Object: RenderEvent
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"renderEvent_var" is a variable referencing a RenderEvent object.

# Get the value of the property.
propertyValue = renderEvent_var.sender
"renderEvent_var" is a variable referencing a RenderEvent object.
#include <Fusion/Render/RenderEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = renderEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


RenderEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

The RenderEventArgs provides information associated with the render process. Render events happen when there's a change in state of the rendering process. The most typical is when the rendering process has reached a predefined quality.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
viewport | Returns the viewport that the rendering was performed in when the render is an in-canvas rendering.

Version

Introduced in version September 2023


RenderEventArgs.classType Method

Parent Object: RenderEventArgs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderEventArgs.classType()
This is a static method.

#include <Fusion/Render/RenderEventArgs.h>

returnValue = adsk::fusion::RenderEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RenderEventArgs.firingEvent Property

Parent Object: RenderEventArgs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.

# Get the value of the property.
propertyValue = renderEventArgs_var.firingEvent
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.
#include <Fusion/Render/RenderEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = renderEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version September 2023


RenderEventArgs.isValid Property

Parent Object: RenderEventArgs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.

# Get the value of the property.
propertyValue = renderEventArgs_var.isValid
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.
#include <Fusion/Render/RenderEventArgs.h>

// Get the value of the property.
boolean propertyValue = renderEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RenderEventArgs.objectType Property

Parent Object: RenderEventArgs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.

# Get the value of the property.
propertyValue = renderEventArgs_var.objectType
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.
#include <Fusion/Render/RenderEventArgs.h>

// Get the value of the property.
string propertyValue = renderEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RenderEventArgs.viewport Property

Parent Object: RenderEventArgs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventArgs.h>

Description

Returns the viewport that the rendering was performed in when the render is an in-canvas rendering.

Syntax

  • Python
  • C++
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.

# Get the value of the property.
propertyValue = renderEventArgs_var.viewport
"renderEventArgs_var" is a variable referencing a RenderEventArgs object.
#include <Fusion/Render/RenderEventArgs.h>

// Get the value of the property.
Ptr<Viewport> propertyValue = renderEventArgs_var->viewport();

Property Value

This is a read only property whose value is a Viewport.

Version

Introduced in version September 2023


RenderEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventHandler.h>

Description

The RenderEventHandler is a client implemented class that can be added as a handler to a RenderEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version September 2023


RenderEventHandler.notify Method

Parent Object: RenderEventHandler
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"renderEventHandler_var" is a variable referencing a RenderEventHandler object.
returnValue = renderEventHandler_var.notify(eventArgs)
"renderEventHandler_var" is a variable referencing a RenderEventHandler object.

#include <Fusion/Render/RenderEventHandler.h>

returnValue = renderEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | RenderEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version September 2023


RenderFuture Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Used to check the state of a local or in canvas rendering.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | The filename that the finished rendering will be saved to. If being saved to the cloud, this is the name Fusion will use for the completed rendering.
imageHeight | Returns the height of the image. The height was specified when the rendering was started.
imageWidth | Returns the width of the image. The width was specified when the rendering was started.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
progress | Returns the progress of this rendering expressed as a percentage where 0.0 is no progress and 1.0 is complete.
renderState | Returns the current state of the rendering.

Accessed From

Rendering.startLocalRender

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderFuture.classType Method

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderFuture.classType()
This is a static method.

#include <Fusion/Render/RenderFuture.h>

returnValue = adsk::fusion::RenderFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RenderFuture.filename Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

The filename that the finished rendering will be saved to. If being saved to the cloud, this is the name Fusion will use for the completed rendering.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.filename
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
string propertyValue = renderFuture_var->filename();

Property Value

This is a read only property whose value is a string.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderFuture.imageHeight Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Returns the height of the image. The height was specified when the rendering was started.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.imageHeight
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
integer propertyValue = renderFuture_var->imageHeight();

Property Value

This is a read only property whose value is an integer.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderFuture.imageWidth Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Returns the width of the image. The width was specified when the rendering was started.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.imageWidth
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
integer propertyValue = renderFuture_var->imageWidth();

Property Value

This is a read only property whose value is an integer.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderFuture.isValid Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.isValid
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
boolean propertyValue = renderFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderFuture.objectType Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.objectType
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
string propertyValue = renderFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderFuture.progress Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Returns the progress of this rendering expressed as a percentage where 0.0 is no progress and 1.0 is complete.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.progress
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
double propertyValue = renderFuture_var->progress();

Property Value

This is a read only property whose value is a double.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderFuture.renderState Property

Parent Object: RenderFuture
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderFuture.h>

Description

Returns the current state of the rendering.

Syntax

  • Python
  • C++
"renderFuture_var" is a variable referencing a RenderFuture object.

# Get the value of the property.
propertyValue = renderFuture_var.renderState
"renderFuture_var" is a variable referencing a RenderFuture object.
#include <Fusion/Render/RenderFuture.h>

// Get the value of the property.
LocalRenderStates propertyValue = renderFuture_var->renderState();

Property Value

This is a read only property whose value is a LocalRenderStates.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


Rendering Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Provides access to the ability to render in a background process on the local machine.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
startLocalRender | Starts a local rendering process using either the active viewport or a specified camera to define the camera information. This starts a background process on the local machine to generate the rendering. Even though this is a background process, it is tied to the running Fusion process and will be terminated if Fusion is shut down. If multiple local renders are started, they are queued and only one runs at a time.

Properties

Name | Description
aspectRatio | Gets and sets the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. To define a custom aspect ratio set this property to CustomAspectRatio and use the resolutionHeight and resolutionWidth properties to define the resolution and aspect ratio. The default value is the aspect ratio defined in the scene settings. The width and height must be between 108 and 4000 pixels.
isBackgroundTransparent | Specifies if the background of the rendering should be transparent. The default is false, which means it will not be transparent.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
renderQuality | Gets and sets the desired quality of the rendering. The quality is specified using a value between 25 and 100, where 75 is the equivalent of "Final" and 100 is the same as "Excellent" in the user interface. The default value is 75
resolution | Gets and sets the resolution of the rendered image. This is the final width and height of the image in pixels. To define a custom aspect ratio, use the resolutionHeight and resolutionWidth properties to define any resolution. Using those has the side effect of setting this property to CustomRenderResolution. Setting this to anything except CustomRenderResolution, will also have the side effect of setting the aspect ratio.
resolutionHeight | Gets and sets the height of the image in pixels. If anything but CustomRenderAspectRatio is defined as the aspect ratio, the resolution width will be modified to maintain the specified aspect ratio. The height must be between 108 and 4000 pixels.
resolutionWidth | Gets and sets the width of the image in pixels. If anything but CustomRenderAspectRatio is defined as the aspect ratio, the resolution height will be modified to maintain the specified aspect ratio. The width must be between 108 and 4000 pixels.

Accessed From

RenderManager.rendering

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


Rendering.aspectRatio Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Gets and sets the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. To define a custom aspect ratio set this property to CustomAspectRatio and use the resolutionHeight and resolutionWidth properties to define the resolution and aspect ratio. The default value is the aspect ratio defined in the scene settings. The width and height must be between 108 and 4000 pixels.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.aspectRatio

# Set the value of the property.
rendering_var.aspectRatio = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
RenderAspectRatios propertyValue = rendering_var->aspectRatio();

// Set the value of the property, where value_var is a RenderAspectRatios.
bool returnValue = rendering_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a RenderAspectRatios.

Version

Introduced in version May 2023


Rendering.classType Method

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Rendering.classType()
This is a static method.

#include <Fusion/Render/Rendering.h>

returnValue = adsk::fusion::Rendering::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


Rendering.isBackgroundTransparent Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Specifies if the background of the rendering should be transparent. The default is false, which means it will not be transparent.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.isBackgroundTransparent

# Set the value of the property.
rendering_var.isBackgroundTransparent = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
boolean propertyValue = rendering_var->isBackgroundTransparent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rendering_var->isBackgroundTransparent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


Rendering.isValid Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.isValid
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
boolean propertyValue = rendering_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


Rendering.objectType Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.objectType
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
string propertyValue = rendering_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


Rendering.renderQuality Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Gets and sets the desired quality of the rendering. The quality is specified using a value between 25 and 100, where 75 is the equivalent of "Final" and 100 is the same as "Excellent" in the user interface. The default value is 75

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.renderQuality

# Set the value of the property.
rendering_var.renderQuality = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
integer propertyValue = rendering_var->renderQuality();

// Set the value of the property, where value_var is an integer.
bool returnValue = rendering_var->renderQuality(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


Rendering.resolution Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Gets and sets the resolution of the rendered image. This is the final width and height of the image in pixels. To define a custom aspect ratio, use the resolutionHeight and resolutionWidth properties to define any resolution. Using those has the side effect of setting this property to CustomRenderResolution. Setting this to anything except CustomRenderResolution, will also have the side effect of setting the aspect ratio.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.resolution

# Set the value of the property.
rendering_var.resolution = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
RenderResolutions propertyValue = rendering_var->resolution();

// Set the value of the property, where value_var is a RenderResolutions.
bool returnValue = rendering_var->resolution(value_var);

Property Value

This is a read/write property whose value is a RenderResolutions.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


Rendering.resolutionHeight Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Gets and sets the height of the image in pixels. If anything but CustomRenderAspectRatio is defined as the aspect ratio, the resolution width will be modified to maintain the specified aspect ratio. The height must be between 108 and 4000 pixels.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.resolutionHeight

# Set the value of the property.
rendering_var.resolutionHeight = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
integer propertyValue = rendering_var->resolutionHeight();

// Set the value of the property, where value_var is an integer.
bool returnValue = rendering_var->resolutionHeight(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


Rendering.resolutionWidth Property

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Gets and sets the width of the image in pixels. If anything but CustomRenderAspectRatio is defined as the aspect ratio, the resolution height will be modified to maintain the specified aspect ratio. The width must be between 108 and 4000 pixels.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.

# Get the value of the property.
propertyValue = rendering_var.resolutionWidth

# Set the value of the property.
rendering_var.resolutionWidth = propertyValue
"rendering_var" is a variable referencing a Rendering object.
#include <Fusion/Render/Rendering.h>

// Get the value of the property.
integer propertyValue = rendering_var->resolutionWidth();

// Set the value of the property, where value_var is an integer.
bool returnValue = rendering_var->resolutionWidth(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


Rendering.startLocalRender Method

Parent Object: Rendering
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/Rendering.h>

Description

Starts a local rendering process using either the active viewport or a specified camera to define the camera information. This starts a background process on the local machine to generate the rendering. Even though this is a background process, it is tied to the running Fusion process and will be terminated if Fusion is shut down. If multiple local renders are started, they are queued and only one runs at a time.

Syntax

  • Python
  • C++
"rendering_var" is a variable referencing a Rendering object.
# Uses no optional arguments.
returnValue = rendering_var.startLocalRender()

# Uses optional arguments.
returnValue = rendering_var.startLocalRender(filename, camera)
"rendering_var" is a variable referencing a Rendering object.

#include <Fusion/Render/Rendering.h>

// Uses no optional arguments.
returnValue = rendering_var->startLocalRender();

// Uses optional arguments.
returnValue = rendering_var->startLocalRender(filename, camera);

Return Value

Type | Description
RenderFuture | Returns a RenderFuture that allows you to check the current state of this rendering job.

Parameters

Name | Type | Description
filename | string | Optional argument that is the full path and filename of the file to write the resulting rendering to. The file extension can be .png, .jpg, .jpeg, or .tiff and the file will be saved as that type. If not provided or is an empty string, the rendering will be saved to the cloud as a PNG file. This is an optional argument whose default value is "".
camera | Camera | Optional argument that specifies the camera to use for the rendering. The default value is null, which will use the camera associated with the active viewport. This is an optional argument whose default value is null.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderManager Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Provides access to the Rendering functionality in Fusion and is accessed from the Design object.

Methods

Name | Description
activateRenderWorkspace | Activates the Render workspace for this design. If the workspace is already active, nothing happens and it remains active.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
inCanvasRendering | Provides access to the in-canvas rendering capabilities of Fusion. This uses the active viewport and the user will see the rendering as it takes place.
isRenderWorkspaceActive | Returns if the Render workspace for this Design is active or not. Returns true if the workspace is active.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentDesign | Returns the parent Design this RenderManager was obtained from.
renderEnvironments | Provides access to the provided environments and supports specifying a custom environment. This provides access to the same list of environments that you see in the "Environment Library" tab of the "SCENE SETTINGS" dialog.
rendering | Provides access to the local and cloud rendering capabilities of Fusion. In both cases, the rendering is done in a process external to Fusion, either a local or cloud rendering process.
sceneSettings | Returns the SceneSettings object that provides access to all of the settings that control how the scene is rendered. This provides equivalent functionality as the "Settings" tab in the "SCENE SETTINGS" dialog.

Accessed From

Design.renderManager, FlatPatternProduct.renderManager, WorkingModel.renderManager

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderManager.activateRenderWorkspace Method

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Activates the Render workspace for this design. If the workspace is already active, nothing happens and it remains active.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.
returnValue = renderManager_var.activateRenderWorkspace()
"renderManager_var" is a variable referencing a RenderManager object.

#include <Fusion/Render/RenderManager.h>

returnValue = renderManager_var->activateRenderWorkspace();

Return Value

Type | Description
boolean | Returns true if the activation was succesful or if the Render workspace was already active.

Version

Introduced in version May 2023


RenderManager.classType Method

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RenderManager.classType()
This is a static method.

#include <Fusion/Render/RenderManager.h>

returnValue = adsk::fusion::RenderManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


RenderManager.inCanvasRendering Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Provides access to the in-canvas rendering capabilities of Fusion. This uses the active viewport and the user will see the rendering as it takes place.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.inCanvasRendering
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
Ptr<InCanvasRendering> propertyValue = renderManager_var->inCanvasRendering();

Property Value

This is a read only property whose value is an InCanvasRendering.

Version

Introduced in version September 2023


RenderManager.isRenderWorkspaceActive Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Returns if the Render workspace for this Design is active or not. Returns true if the workspace is active.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.isRenderWorkspaceActive
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
boolean propertyValue = renderManager_var->isRenderWorkspaceActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderManager.isValid Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.isValid
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
boolean propertyValue = renderManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


RenderManager.objectType Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.objectType
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
string propertyValue = renderManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


RenderManager.parentDesign Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Returns the parent Design this RenderManager was obtained from.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.parentDesign
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
Ptr<Product> propertyValue = renderManager_var->parentDesign();

Property Value

This is a read only property whose value is a Product.

Version

Introduced in version May 2023


RenderManager.renderEnvironments Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Provides access to the provided environments and supports specifying a custom environment. This provides access to the same list of environments that you see in the "Environment Library" tab of the "SCENE SETTINGS" dialog.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.renderEnvironments
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
Ptr<RenderEnvironments> propertyValue = renderManager_var->renderEnvironments();

Property Value

This is a read only property whose value is a RenderEnvironments.

Version

Introduced in version May 2023


RenderManager.rendering Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Provides access to the local and cloud rendering capabilities of Fusion. In both cases, the rendering is done in a process external to Fusion, either a local or cloud rendering process.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.rendering
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
Ptr<Rendering> propertyValue = renderManager_var->rendering();

Property Value

This is a read only property whose value is a Rendering.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version May 2023


RenderManager.sceneSettings Property

Parent Object: RenderManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/RenderManager.h>

Description

Returns the SceneSettings object that provides access to all of the settings that control how the scene is rendered. This provides equivalent functionality as the "Settings" tab in the "SCENE SETTINGS" dialog.

Syntax

  • Python
  • C++
"renderManager_var" is a variable referencing a RenderManager object.

# Get the value of the property.
propertyValue = renderManager_var.sceneSettings
"renderManager_var" is a variable referencing a RenderManager object.
#include <Fusion/Render/RenderManager.h>

// Get the value of the property.
Ptr<SceneSettings> propertyValue = renderManager_var->sceneSettings();

Property Value

This is a read only property whose value is a SceneSettings.

Version

Introduced in version May 2023


ReplaceFaceFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Object that represents an existing replace face feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeature.assemblyContext Property

Parent Object: ReplaceFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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.entityToken Property

Parent Object: ReplaceFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.entityToken
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
string propertyValue = replaceFaceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ReplaceFaceFeature.errorOrWarningMessage Property

Parent Object: ReplaceFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Method that sets faces to replace.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a replace face feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.classType Method

Parent Object: ReplaceFaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.replaceFaceFeatures

Samples

Name | Description
ReplaceFace Feature | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatures.add Method

Parent Object: ReplaceFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

Creates a new replace face feature.

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
replaceFaceFeatures.add | Demonstrate the remove replaceFaceFeatures.add method.
ReplaceFace Feature | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


replaceFaceFeatures.add

Description

Demonstrate the remove replaceFaceFeatures.add method.

Code Samples

  • Python
def demo_replaceFaceFeatures_add(rootComp: adsk.fusion.Component):
    sourceFace = _ui.selectEntity('Select a source face.', 'Faces').entity
    targetFace = _ui.selectEntity('Select a target face.', 'Faces').entity

    sourceFaces = adsk.core.ObjectCollection.create()
    sourceFaces.add(sourceFace)
    isTangentChain = False

    replaceFaceFeatures = rootComp.features.replaceFaceFeatures
    input = replaceFaceFeatures.createInput(sourceFaces, isTangentChain, targetFace)
    replaceFaceFeature = replaceFaceFeatures.add(input)


ReplaceFaceFeatures.classType Method

Parent Object: ReplaceFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

The number of replace face features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

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.

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
replaceFaceFeatures.add | Demonstrate the remove replaceFaceFeatures.add method.
ReplaceFace Feature | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatures.isValid Property

Parent Object: ReplaceFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

Function that returns the specified replace face feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

Function that returns the specified replace face feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReplaceFaceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Object that represents an existing Reverse Normal feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 | Demonstrates creating a new reverse normal feature.

Version

Introduced in version September 2015


ReverseNormalFeature.assemblyContext Property

Parent Object: ReverseNormalFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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.entityToken Property

Parent Object: ReverseNormalFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.entityToken
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = reverseNormalFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ReverseNormalFeature.errorOrWarningMessage Property

Parent Object: ReverseNormalFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.reverseNormalFeatures

Samples

Name | Description
Reverse Normal Feature | Demonstrates creating a new reverse normal feature.

Version

Introduced in version September 2015


ReverseNormalFeatures.add Method

Parent Object: ReverseNormalFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

Creates a new Reverse Normal feature.

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
reverseNormalFeatures.add | Demonstrates the reverseNormalFeatures.add method.
Reverse Normal Feature | Demonstrates creating a new reverse normal feature.

Version

Introduced in version November 2015


reverseNormalFeatures.add

Description

Demonstrates the reverseNormalFeatures.add method.

Code Samples

  • Python
def demo_reverseNormalFeatures_add(rootComp: adsk.fusion.Component):
    selection: adsk.fusion.BRepBodies = _ui.selectEntity('Select body to reverse normal.', 'Bodies').entity
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(selection)

    reverseNormalFeatures = rootComp.features.reverseNormalFeatures
    reverseNormal = reverseNormalFeatures.add(bodies)


ReverseNormalFeatures.classType Method

Parent Object: ReverseNormalFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

The number of Reverse Normal features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

Function that returns the specified Reverse Normal feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

Function that returns the specified reverse normal feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ReverseNormalFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

Represents the set of information specific to a revolute joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RevoluteJointMotion.h>

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Object that represents an existing revolve feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setOneSideToExtent | Changes the extent of the revolve to be from the sketch plane to the specified "to" face. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setTwoSideAngleExtent | Changes the extent of the revolve to be defined as a two sided angle extent. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setTwoSidesToExtent | Changes the extent of the revolve to be defined as a two sided to extent. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
axis Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, linear edge or a face that defines an axis (cylinder, cone, torus, etc.). If it is not in the same plane as the profile, it is projected onto the profile plane.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isProjectAxis Specifies if the axis should be projected on the same plane as the profile sketch plane or not.

Setting this to true will use a projected axis, while setting it to false will keep it in its original location. This is initialized to false so the selected axis will be used in the feature.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the type of operation performed by the revolve.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, linear edge or a face that defines an axis (cylinder, cone, torus, etc.). If it is not in the same plane as the profile, it is projected onto the profile plane.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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.entityToken Property

Parent Object: RevolveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.entityToken
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
string propertyValue = revolveFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RevolveFeature.errorOrWarningMessage Property

Parent Object: RevolveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Indicates if this feature is parametric or not.

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.isProjectAxis Property

Parent Object: RevolveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Specifies if the axis should be projected on the same plane as the profile sketch plane or not.

Setting this to true will use a projected axis, while setting it to false will keep it in its original location. This is initialized to false so the selected axis will be used in the feature.

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.isProjectAxis

# Set the value of the property.
revolveFeature_var.isProjectAxis = 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->isProjectAxis();

// Set the value of the property, where value_var is a boolean.
bool returnValue = revolveFeature_var->isProjectAxis(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


RevolveFeature.isSolid Property

Parent Object: RevolveFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Indicates if this feature was initially created as a solid or a surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Gets and sets the type of operation performed by the revolve.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

This property returns null in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Defines the extent of the revolution to be at a defined angle.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Changes the extent of the revolve to be from the sketch plane to the specified "to" face.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Changes the extent of the revolve to be defined as a two sided angle extent.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Changes the extent of the revolve to be defined as a two sided to extent.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Property that returns all of the faces created around the perimeter of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a revolve feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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, linear edge or a face that defines an axis (cylinder, cone, torus, etc.). 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
isProjectAxis Specifies if the axis should be projected on the same plane as the profile sketch plane or not.

Setting this to true will use a projected axis, while setting it to false will keep it in its original location. This is initialized to false so the selected axis will be used in the feature.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, linear edge or a face that defines an axis (cylinder, cone, torus, etc.). If it is not in the same plane as the profile, it is projected onto the profile plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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

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.isProjectAxis Property

Parent Object: RevolveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Specifies if the axis should be projected on the same plane as the profile sketch plane or not.

Setting this to true will use a projected axis, while setting it to false will keep it in its original location. This is initialized to false so the selected axis will be used in the feature.

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.isProjectAxis

# Set the value of the property.
revolveFeatureInput_var.isProjectAxis = 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->isProjectAxis();

// Set the value of the property, where value_var is a boolean.
bool returnValue = revolveFeatureInput_var->isProjectAxis(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


RevolveFeatureInput.isSolid Property

Parent Object: RevolveFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Gets and sets the type of operation performed by the revolve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
revolveFeatures.add | Demonstrates creating a revolve feature using an angle extent.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Defines the extent of the revolve to be from the sketch or profile plane to the specified "To" face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

Description

Defines the angle of the revolve to be to applied to both sides of the profile at the specified angles.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Collection that provides access to all of the existing revolve features in a design and supports the ability to create new revolve features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

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.

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
revolveFeatures.add | Demonstrates creating a revolve feature using an angle extent.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


revolveFeatures.add

Description

Demonstrates creating a revolve feature using an angle extent.

Code Samples

  • Python
def demo_revolveFeatures_add(rootComp: adsk.fusion.Component):
    profile = _ui.selectEntity('Select a profile to revolve.', 'Profiles').entity
    axis = _ui.selectEntity('Select sketch line for axis.', 'SketchLines').entity
    operation = adsk.fusion.FeatureOperations.NewComponentFeatureOperation

    revolveFeatures = rootComp.features.revolveFeatures
    input = revolveFeatures.createInput(profile, axis, operation)
    input.setAngleExtent(False, adsk.core.ValueInput.createByString('90 deg'))
    revolveFeature = revolveFeatures.add(input)


RevolveFeatures.classType Method

Parent Object: RevolveFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

The number of revolve features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Creates a new RevolveFeatureInput object that is used to specify the input needed to create a new revolve feature.

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, linear edge or a face that defines an axis (cylinder, cone, torus, etc.). 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
revolveFeatures.add | Demonstrates creating a revolve feature using an angle extent.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Function that returns the specified revolve feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

Function that returns the specified revolve feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RevolveFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Object that represents an existing Rib feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

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.

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.entityToken Property

Parent Object: RibFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.entityToken
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
string propertyValue = ribFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RibFeature.errorOrWarningMessage Property

Parent Object: RibFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

Collection that provides access to all of the existing rib features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.ribFeatures

Version

Introduced in version September 2015


RibFeatures.classType Method

Parent Object: RibFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

The number of Rib features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

Function that returns the specified Rib feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

Function that returns the specified Rib feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RibFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Represents a rigid group within an assembly.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this group. This can be accomplished using the following code: group.timelineObject.rollTo(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 rigid group.
entityToken Returns a token for the RigidGroup object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same rigid group.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isVisible | Gets and sets whether the occurrences that are part of this rigid group are visible or not.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, FlatPatternComponent.allRigidGroups, RigidGroup.createForAssemblyContext, RigidGroup.nativeObject, RigidGroupList.item, RigidGroupList.itemByName, RigidGroups.add, RigidGroups.item, RigidGroups.itemByName

Samples

Name | Description
Rigid Group API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroup.assemblyContext Property

Parent Object: RigidGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Returns the collection of attributes associated with this rigid group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Deletes this rigid group.

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.entityToken Property

Parent Object: RigidGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Returns a token for the RigidGroup object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same rigid group.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.entityToken
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
string propertyValue = rigidGroup_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RigidGroup.isSuppressed Property

Parent Object: RigidGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Gets and sets if this rigid group is suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: RigidGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Gets and sets whether the occurrences that are part of this rigid group are visible or not.

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.isVisible

# Set the value of the property.
rigidGroup_var.isVisible = 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->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rigidGroup_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


RigidGroup.name Property

Parent Object: RigidGroup
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Gets and sets the name of the rigid group as seen in the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Returns the list of occurrences that are part of the rigid group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Returns the parent component that owns this rigid group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Sets which occurrences are to be part of this rigid group.

To use this method, you need to position the timeline marker to immediately before this group. This can be accomplished using the following code: group.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroup.h>

Description

Returns the timeline object associated with this rigid group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

A list of rigid groups.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Occurrence.rigidGroups

Version

Introduced in version January 2016


RigidGroupList.classType Method

Parent Object: RigidGroupList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

Returns number of rigid groups in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

Function that returns the specified rigid group using an index into the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

Function that returns the specified rigid group using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroupList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.rigidGroups, FlatPatternComponent.rigidGroups

Samples

Name | Description
Rigid Group API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroups.add Method

Parent Object: RigidGroups
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Creates a new rigid group.

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 API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroups.classType Method

Parent Object: RigidGroups
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Returns number of joint origins in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Function that returns the specified rigid group using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

Function that returns the specified rigid group using a name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidJointMotion.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version July 2015


RigidJointMotion.classType Method

Parent Object: RigidJointMotion
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/RigidJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


RipFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Object that represents an existing Rip feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
redefineToAlongEdge | Redefines the feature to be a rip along an edge.
redefineToBetweenPoints | Redefines the feature to be a rip between two points.
setByFace | This input method is for creating a rip from a face.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
definition | Returns the RipFeatureDefinition object which provides access to the information defining this RipFeature and the ability to edit it.
definitionType | Gets the type of rip defined.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RipFeature.createForAssemblyContext, RipFeature.nativeObject, RipFeatures.add, RipFeatures.item, RipFeatures.itemByName

Samples

Name | Description
Rip Feature Sample | Demonstrates creating a new sheet metal rip feature.

Version

Introduced in version September 2023


RipFeature.assemblyContext Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.assemblyContext
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = ripFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


RipFeature.attributes Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.attributes
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = ripFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


RipFeature.baseFeature Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.baseFeature
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = ripFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version September 2023


RipFeature.bodies Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.bodies
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = ripFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2023


RipFeature.classType Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RipFeature.classType()
This is a static method.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = adsk::fusion::RipFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RipFeature.createForAssemblyContext Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
returnValue = ripFeature_var.createForAssemblyContext(occurrence)
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = ripFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RipFeature | 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 2023


RipFeature.definition Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the RipFeatureDefinition object which provides access to the information defining this RipFeature and the ability to edit it.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.definition
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<RipFeatureDefinition> propertyValue = ripFeature_var->definition();

Property Value

This is a read only property whose value is a RipFeatureDefinition.

Version

Introduced in version September 2023


RipFeature.definitionType Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Gets the type of rip defined.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.definitionType
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
RipFeatureDefinitionTypes propertyValue = ripFeature_var->definitionType();

Property Value

This is a read only property whose value is a RipFeatureDefinitionTypes.

Version

Introduced in version September 2023


RipFeature.deleteMe Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
returnValue = ripFeature_var.deleteMe()
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = ripFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2023


RipFeature.dissolve Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
returnValue = ripFeature_var.dissolve()
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = ripFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2023


RipFeature.entityToken Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.entityToken
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
string propertyValue = ripFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RipFeature.errorOrWarningMessage Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.errorOrWarningMessage
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
string propertyValue = ripFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RipFeature.faces Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.faces
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = ripFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2023


RipFeature.healthState Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.healthState
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = ripFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version September 2023


RipFeature.isParametric Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.isParametric
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
boolean propertyValue = ripFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RipFeature.isSuppressed Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.isSuppressed

# Set the value of the property.
ripFeature_var.isSuppressed = propertyValue
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
boolean propertyValue = ripFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ripFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


RipFeature.isValid Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.isValid
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
boolean propertyValue = ripFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RipFeature.linkedFeatures Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.linkedFeatures
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = ripFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2023


RipFeature.name Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.name

# Set the value of the property.
ripFeature_var.name = propertyValue
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
string propertyValue = ripFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = ripFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2023


RipFeature.nativeObject Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

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.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.nativeObject
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<RipFeature> propertyValue = ripFeature_var->nativeObject();

Property Value

This is a read only property whose value is a RipFeature.

Version

Introduced in version September 2023


RipFeature.objectType Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.objectType
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
string propertyValue = ripFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RipFeature.parentComponent Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.parentComponent
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = ripFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2023


RipFeature.redefineToAlongEdge Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Redefines the feature to be a rip along an edge.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
returnValue = ripFeature_var.redefineToAlongEdge(edge, gapDistance)
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = ripFeature_var->redefineToAlongEdge(edge, gapDistance);

Return Value

Type | Description
boolean | Returns true if the rip definition is successful.

Parameters

Name | Type | Description
edge | BRepEdge | The BRepEdge that defines the rip.
gapDistance | ValueInput | The gap distance of the rip.

Version

Introduced in version September 2023


RipFeature.redefineToBetweenPoints Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Redefines the feature to be a rip between two points.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
# Uses no optional arguments.
returnValue = ripFeature_var.redefineToBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance)

# Uses optional arguments.
returnValue = ripFeature_var.redefineToBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance, pointOneOffset, pointTwoOffset)
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

// Uses no optional arguments.
returnValue = ripFeature_var->redefineToBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance);

// Uses optional arguments.
returnValue = ripFeature_var->redefineToBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance, pointOneOffset, pointTwoOffset);

Return Value

Type | Description
boolean | Returns true if the rip definition is successful.

Parameters

Name | Type | Description
pointOneEntity | Base | The first point of the rip. This can be defined using a BrepVertex or a BRepEdge and offset to define where the point is along the edge. If an edge is specified, the pointOneOffset parameter must be specified.
pointTwoEntity | Base | The second point of the rip and must lie on the same face as point 1. This can be defined using a BrepVertex or a BRepEdge and an offset to define where the point is along the edge. If an edge is specified, the pointTwoOffset parameter must be specified.
gapDistance | ValueInput | The gap distance of the rip.
pointOneOffset | ValueInput | If the first point lies on an edge, then this is the offset along the edge which defines the point. This is the physical distance from the topological start of the edge. If the offset is negative or exceeds the edge length, the corresponding vertex of the edge will be used. This is an optional argument whose default value is null.
pointTwoOffset | ValueInput | If the second point lies on an edge, then this is the offset along the edge which defines the point. This is the physical distance from the topological start of the edge. If the offset is negative or exceeds the edge length, the corresponding vertex of the edge will be used. This is an optional argument whose default value is null.

Version

Introduced in version September 2023


RipFeature.setByFace Method

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

This input method is for creating a rip from a face.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.
returnValue = ripFeature_var.setByFace(face)
"ripFeature_var" is a variable referencing a RipFeature object.

#include <Fusion/SheetMetal/RipFeature.h>

returnValue = ripFeature_var->setByFace(face);

Return Value

Type | Description
boolean | Returns true if the rip definition is successful.

Parameters

Name | Type | Description
face | BRepFace | The sheet metal face that defines the rip.

Version

Introduced in version September 2023


RipFeature.timelineObject Property

Parent Object: RipFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"ripFeature_var" is a variable referencing a RipFeature object.

# Get the value of the property.
propertyValue = ripFeature_var.timelineObject
"ripFeature_var" is a variable referencing a RipFeature object.
#include <Fusion/SheetMetal/RipFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = ripFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2023


RipFeatureDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureDefinition.h>

Description

A Base class to return the information used to define the RipFeature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RipFeature.definition

Derived Classes

AlongEdgeRipFeatureDefinition, BetweenPointsRipFeatureDefinition, FaceRipFeatureDefinition

Samples

Name | Description
Rip Feature Sample | Demonstrates creating a new sheet metal rip feature.

Version

Introduced in version September 2023


RipFeatureDefinition.classType Method

Parent Object: RipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RipFeatureDefinition.classType()
This is a static method.

#include <Fusion/SheetMetal/RipFeatureDefinition.h>

returnValue = adsk::fusion::RipFeatureDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RipFeatureDefinition.isValid Property

Parent Object: RipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ripFeatureDefinition_var" is a variable referencing a RipFeatureDefinition object.

# Get the value of the property.
propertyValue = ripFeatureDefinition_var.isValid
"ripFeatureDefinition_var" is a variable referencing a RipFeatureDefinition object.
#include <Fusion/SheetMetal/RipFeatureDefinition.h>

// Get the value of the property.
boolean propertyValue = ripFeatureDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RipFeatureDefinition.objectType Property

Parent Object: RipFeatureDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ripFeatureDefinition_var" is a variable referencing a RipFeatureDefinition object.

# Get the value of the property.
propertyValue = ripFeatureDefinition_var.objectType
"ripFeatureDefinition_var" is a variable referencing a RipFeatureDefinition object.
#include <Fusion/SheetMetal/RipFeatureDefinition.h>

// Get the value of the property.
string propertyValue = ripFeatureDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RipFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a Rip feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAlongEdge | Specifies the rip feature will be along an edge.
setBetweenPoints | This input method is for creating a rip between two points. Each point can be either a BRepVertex or a BRepEdge and an associated offset along the edge.
setByFace | Specifies the rip feature will be defined by a face..

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RipFeatures.createRipFeatureInput

Samples

Name | Description
Rip Feature Sample | Demonstrates creating a new sheet metal rip feature.

Version

Introduced in version September 2023


RipFeatureInput.classType Method

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RipFeatureInput.classType()
This is a static method.

#include <Fusion/SheetMetal/RipFeatureInput.h>

returnValue = adsk::fusion::RipFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RipFeatureInput.isValid Property

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.

# Get the value of the property.
propertyValue = ripFeatureInput_var.isValid
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.
#include <Fusion/SheetMetal/RipFeatureInput.h>

// Get the value of the property.
boolean propertyValue = ripFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RipFeatureInput.objectType Property

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.

# Get the value of the property.
propertyValue = ripFeatureInput_var.objectType
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.
#include <Fusion/SheetMetal/RipFeatureInput.h>

// Get the value of the property.
string propertyValue = ripFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RipFeatureInput.setAlongEdge Method

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

Specifies the rip feature will be along an edge.

Syntax

  • Python
  • C++
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.
returnValue = ripFeatureInput_var.setAlongEdge(edge, gapDistance)
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.

#include <Fusion/SheetMetal/RipFeatureInput.h>

returnValue = ripFeatureInput_var->setAlongEdge(edge, gapDistance);

Return Value

Type | Description
boolean | Returns true if the defining the rip is successful.

Parameters

Name | Type | Description
edge | BRepEdge | The BRepEdge that defines the location of the rip.
gapDistance | ValueInput | The gap distance of the rip.

Version

Introduced in version September 2023


RipFeatureInput.setBetweenPoints Method

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

This input method is for creating a rip between two points. Each point can be either a BRepVertex or a BRepEdge and an associated offset along the edge.

Syntax

  • Python
  • C++
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.
# Uses no optional arguments.
returnValue = ripFeatureInput_var.setBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance)

# Uses optional arguments.
returnValue = ripFeatureInput_var.setBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance, pointOneOffset, pointTwoOffset)
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.

#include <Fusion/SheetMetal/RipFeatureInput.h>

// Uses no optional arguments.
returnValue = ripFeatureInput_var->setBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance);

// Uses optional arguments.
returnValue = ripFeatureInput_var->setBetweenPoints(pointOneEntity, pointTwoEntity, gapDistance, pointOneOffset, pointTwoOffset);

Return Value

Type | Description
boolean | Returns true if the rip definition is successful.

Parameters

Name | Type | Description
pointOneEntity | Base | The first point of the rip. This can be defined using a BrepVertex or a BRepEdge and offset to define where the point is along the edge. If an edge is specified, the pointOneOffset parameter must be specified.
pointTwoEntity | Base | The second point of the rip and must lie on the same face as point 1. This can be defined using a BrepVertex or a BRepEdge and an offset to define where the point is along the edge. If an edge is specified, the pointTwoOffset parameter must be specified.
gapDistance | ValueInput | The gap distance of the rip.
pointOneOffset | ValueInput | If the first point lies on an edge, then this is the offset along the edge which defines the point. This is the physical distance from the topological start of the edge. If the offset is negative or exceeds the edge length, the corresponding vertex of the edge will be used. This is an optional argument whose default value is null.
pointTwoOffset | ValueInput | If the second point lies on an edge, then this is the offset along the edge which defines the point. This is the physical distance from the topological start of the edge. If the offset is negative or exceeds the edge length, the corresponding vertex of the edge will be used. This is an optional argument whose default value is null.

Version

Introduced in version September 2023


RipFeatureInput.setByFace Method

Parent Object: RipFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatureInput.h>

Description

Specifies the rip feature will be defined by a face..

Syntax

  • Python
  • C++
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.
returnValue = ripFeatureInput_var.setByFace(face)
"ripFeatureInput_var" is a variable referencing a RipFeatureInput object.

#include <Fusion/SheetMetal/RipFeatureInput.h>

returnValue = ripFeatureInput_var->setByFace(face);

Return Value

Type | Description
boolean | Returns true if the defining the rip is successful.

Parameters

Name | Type | Description
face | BRepFace | The sheet metal face that defines the rip.

Version

Introduced in version September 2023


RipFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Collection that provides access to all of the existing Rip features in a design.

Methods

Name | Description
add | Creates a new Rip 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().
createRipFeatureInput | Creates a RipFeatureInput object. Use methods on this object to define the rip you want to create and then use the add method, passing in the RipFeatureInput object.
item | Function that returns the specified Rip feature using an index into the collection.
itemByName | Function that returns the specified Rip feature using the name of the feature.

Properties

Name | Description
count | The number of Rip 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.ripFeatures

Samples

Name | Description
Rip Feature Sample | Demonstrates creating a new sheet metal rip feature.

Version

Introduced in version September 2023


RipFeatures.add Method

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Creates a new Rip feature.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.
returnValue = ripFeatures_var.add(input)
"ripFeatures_var" is a variable referencing a RipFeatures object.

#include <Fusion/SheetMetal/RipFeatures.h>

returnValue = ripFeatures_var->add(input);

Return Value

Type | Description
RipFeature | Returns the newly created RipFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | RipFeatureInput | A RipFeatureInput object that defines the desired rip. Use the createInput method to create a new RipFeatureInput object and then use methods on it (the RipFeatureInput object) to define the rip.

Version

Introduced in version September 2023


RipFeatures.classType Method

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RipFeatures.classType()
This is a static method.

#include <Fusion/SheetMetal/RipFeatures.h>

returnValue = adsk::fusion::RipFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


RipFeatures.count Property

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

The number of Rip features in the collection.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.

# Get the value of the property.
propertyValue = ripFeatures_var.count
"ripFeatures_var" is a variable referencing a RipFeatures object.
#include <Fusion/SheetMetal/RipFeatures.h>

// Get the value of the property.
uinteger propertyValue = ripFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2023


RipFeatures.createRipFeatureInput Method

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Creates a RipFeatureInput object. Use methods on this object to define the rip you want to create and then use the add method, passing in the RipFeatureInput object.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.
returnValue = ripFeatures_var.createRipFeatureInput()
"ripFeatures_var" is a variable referencing a RipFeatures object.

#include <Fusion/SheetMetal/RipFeatures.h>

returnValue = ripFeatures_var->createRipFeatureInput();

Return Value

Type | Description
RipFeatureInput | Returns the newly created RipFeatureInput object or null if the creation failed.

Version

Introduced in version September 2023


RipFeatures.isValid Property

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.

# Get the value of the property.
propertyValue = ripFeatures_var.isValid
"ripFeatures_var" is a variable referencing a RipFeatures object.
#include <Fusion/SheetMetal/RipFeatures.h>

// Get the value of the property.
boolean propertyValue = ripFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


RipFeatures.item Method

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Function that returns the specified Rip feature using an index into the collection.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.
returnValue = ripFeatures_var.item(index)
"ripFeatures_var" is a variable referencing a RipFeatures object.

#include <Fusion/SheetMetal/RipFeatures.h>

returnValue = ripFeatures_var->item(index);

Return Value

Type | Description
RipFeature | 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 2023


RipFeatures.itemByName Method

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

Function that returns the specified Rip feature using the name of the feature.

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.
returnValue = ripFeatures_var.itemByName(name)
"ripFeatures_var" is a variable referencing a RipFeatures object.

#include <Fusion/SheetMetal/RipFeatures.h>

returnValue = ripFeatures_var->itemByName(name);

Return Value

Type | Description
RipFeature | 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 2023


RipFeatures.objectType Property

Parent Object: RipFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/RipFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ripFeatures_var" is a variable referencing a RipFeatures object.

# Get the value of the property.
propertyValue = ripFeatures_var.objectType
"ripFeatures_var" is a variable referencing a RipFeatures object.
#include <Fusion/SheetMetal/RipFeatures.h>

// Get the value of the property.
string propertyValue = ripFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


RotaryMachineAxis Object

Derived from: MachineAxis Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Object that represents an axis with rotary motion (e.g. A, B, and C).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis.
hasLimits | Does this axis have a limited range of motion.
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.
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 this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
rotationAxis | The infinite line that defines the direction and location of the axis of rotation.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Version

Introduced in version April 2023


RotaryMachineAxis.axisType Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

The type of axis.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.axisType
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
MachineAxisTypes propertyValue = rotaryMachineAxis_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


RotaryMachineAxis.classType Method

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RotaryMachineAxis.classType()
This is a static method.

#include <Cam/Machine/RotaryMachineAxis.h>

returnValue = adsk::cam::RotaryMachineAxis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


RotaryMachineAxis.hasLimits Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Does this axis have a limited range of motion.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.hasLimits
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxis_var->hasLimits();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxis.homePosition Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes. Will return NaN if home position isn't set.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.homePosition

# Set the value of the property.
rotaryMachineAxis_var.homePosition = propertyValue
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxis_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxis_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


RotaryMachineAxis.isValid Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.isValid
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxis.name Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

The name of this axis.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.name

# Set the value of the property.
rotaryMachineAxis_var.name = propertyValue
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = rotaryMachineAxis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxis.objectType Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.objectType
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxis.physicalRange Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.physicalRange

# Set the value of the property.
rotaryMachineAxis_var.physicalRange = propertyValue
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = rotaryMachineAxis_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = rotaryMachineAxis_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


RotaryMachineAxis.rotationAxis Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

The infinite line that defines the direction and location of the axis of rotation.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.rotationAxis

# Set the value of the property.
rotaryMachineAxis_var.rotationAxis = propertyValue
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
Ptr<InfiniteLine3D> propertyValue = rotaryMachineAxis_var->rotationAxis();

// Set the value of the property, where value_var is an InfiniteLine3D.
bool returnValue = rotaryMachineAxis_var->rotationAxis(value_var);

Property Value

This is a read/write property whose value is an InfiniteLine3D.

Version

Introduced in version April 2023


RotaryMachineAxis.toolChangePosition Property

Parent Object: RotaryMachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxis.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.

Syntax

  • Python
  • C++
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.

# Get the value of the property.
propertyValue = rotaryMachineAxis_var.toolChangePosition

# Set the value of the property.
rotaryMachineAxis_var.toolChangePosition = propertyValue
"rotaryMachineAxis_var" is a variable referencing a RotaryMachineAxis object.
#include <Cam/Machine/RotaryMachineAxis.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxis_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxis_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


RotaryMachineAxisConfiguration Object

Derived from: MachineAxisConfiguration Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

A MachineAxisConfiguration holding settings specific to rotary axes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Delete this axis configuration from the controller configuration.

Properties

Name | Description
coordinate | Coordinate to use for post processing.
isReversed | Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxNormalSpeed | Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
maxRapidSpeed | Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
partId | ID of the part in the KinematicsMachineElement that this axis configuration modifies.
reset | Specify when to reset the initial axis position.
rotaryPreference | Specify the preferred angle direction at the beginning of an operation.
type | The type of this axis configuration. Use this to inform a cast to the derived types.
useToolCenterPointControl | Specify if the axis supports Tool Center Point Control (TCP).
wrapAroundAtRange | Specify the range that the axis value wraps around for unlimited axes. If there are no wrap around limits then wrapAroundAtRange is infinite. Units are radians.

Accessed From

MachineAxisConfigurations.addRotary

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.classType Method

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RotaryMachineAxisConfiguration.classType()
This is a static method.

#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

returnValue = adsk::cam::RotaryMachineAxisConfiguration::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.coordinate Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Coordinate to use for post processing.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.coordinate

# Set the value of the property.
rotaryMachineAxisConfiguration_var.coordinate = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisCoordinates propertyValue = rotaryMachineAxisConfiguration_var->coordinate();

// Set the value of the property, where value_var is a MachineAxisCoordinates.
bool returnValue = rotaryMachineAxisConfiguration_var->coordinate(value_var);

Property Value

This is a read/write property whose value is a MachineAxisCoordinates.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.deleteMe Method

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Delete this axis configuration from the controller configuration.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
returnValue = rotaryMachineAxisConfiguration_var.deleteMe()
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

returnValue = rotaryMachineAxisConfiguration_var->deleteMe();

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.isReversed Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Does the axis move in the opposite direction to usual. For rotary axes this would mean it uses the left hand rule, and for linear axes is moves in the opposite direction.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.isReversed

# Set the value of the property.
rotaryMachineAxisConfiguration_var.isReversed = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxisConfiguration_var->isReversed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rotaryMachineAxisConfiguration_var->isReversed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.isValid Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.isValid
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxisConfiguration_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.maxNormalSpeed Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specifies the maximum normal speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.maxNormalSpeed

# Set the value of the property.
rotaryMachineAxisConfiguration_var.maxNormalSpeed = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxisConfiguration_var->maxNormalSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxisConfiguration_var->maxNormalSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.maxRapidSpeed Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specifies the maximum rapid speed for this axis. This would be called feedrate for a linear axis or rotary speed for a rotary axis. Units are cm/s for linear axes or rad/s for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.maxRapidSpeed

# Set the value of the property.
rotaryMachineAxisConfiguration_var.maxRapidSpeed = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxisConfiguration_var->maxRapidSpeed();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxisConfiguration_var->maxRapidSpeed(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.objectType Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.objectType
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxisConfiguration_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.partId Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

ID of the part in the KinematicsMachineElement that this axis configuration modifies.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.partId
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxisConfiguration_var->partId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.reset Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specify when to reset the initial axis position.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.reset

# Set the value of the property.
rotaryMachineAxisConfiguration_var.reset = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
MachineResetOptions propertyValue = rotaryMachineAxisConfiguration_var->reset();

// Set the value of the property, where value_var is a MachineResetOptions.
bool returnValue = rotaryMachineAxisConfiguration_var->reset(value_var);

Property Value

This is a read/write property whose value is a MachineResetOptions.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.rotaryPreference Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specify the preferred angle direction at the beginning of an operation.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.rotaryPreference

# Set the value of the property.
rotaryMachineAxisConfiguration_var.rotaryPreference = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
MachineAnglePreferences propertyValue = rotaryMachineAxisConfiguration_var->rotaryPreference();

// Set the value of the property, where value_var is a MachineAnglePreferences.
bool returnValue = rotaryMachineAxisConfiguration_var->rotaryPreference(value_var);

Property Value

This is a read/write property whose value is a MachineAnglePreferences.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.type Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

The type of this axis configuration. Use this to inform a cast to the derived types.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.type
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
MachineAxisTypes propertyValue = rotaryMachineAxisConfiguration_var->type();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.useToolCenterPointControl Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specify if the axis supports Tool Center Point Control (TCP).

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.useToolCenterPointControl

# Set the value of the property.
rotaryMachineAxisConfiguration_var.useToolCenterPointControl = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxisConfiguration_var->useToolCenterPointControl();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rotaryMachineAxisConfiguration_var->useToolCenterPointControl(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxisConfiguration.wrapAroundAtRange Property

Parent Object: RotaryMachineAxisConfiguration
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisConfiguration.h>

Description

Specify the range that the axis value wraps around for unlimited axes. If there are no wrap around limits then wrapAroundAtRange is infinite. Units are radians.

Syntax

  • Python
  • C++
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.

# Get the value of the property.
propertyValue = rotaryMachineAxisConfiguration_var.wrapAroundAtRange

# Set the value of the property.
rotaryMachineAxisConfiguration_var.wrapAroundAtRange = propertyValue
"rotaryMachineAxisConfiguration_var" is a variable referencing a RotaryMachineAxisConfiguration object.
#include <Cam/Machine/RotaryMachineAxisConfiguration.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = rotaryMachineAxisConfiguration_var->wrapAroundAtRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = rotaryMachineAxisConfiguration_var->wrapAroundAtRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


RotaryMachineAxisInput Object

Derived from: MachineAxisInput Object
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Object that defines the properties required to create a new rotary machine axis object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
axisType | The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.
homePosition | Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.
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 user facing name of this axis.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
physicalRange | Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.
rotationAxis | The infinite line that defines the direction and location of the axis of rotation. This direction is in the machine's coordinate system (e.g. an A axis would typically use (1,0,0) for the direction), and follows the right-hand rule.
toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Version

Introduced in version April 2023


RotaryMachineAxisInput.axisType Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

The type of axis. This axis type determines which parameters of this object are valid to be accessed or modified.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.axisType
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
MachineAxisTypes propertyValue = rotaryMachineAxisInput_var->axisType();

Property Value

This is a read only property whose value is a MachineAxisTypes.

Version

Introduced in version April 2023


RotaryMachineAxisInput.classType Method

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.RotaryMachineAxisInput.classType()
This is a static method.

#include <Cam/Machine/RotaryMachineAxisInput.h>

returnValue = adsk::cam::RotaryMachineAxisInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


RotaryMachineAxisInput.homePosition Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Specifies the value that this axis returns to when the machine is homed. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.homePosition

# Set the value of the property.
rotaryMachineAxisInput_var.homePosition = propertyValue
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxisInput_var->homePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxisInput_var->homePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2023


RotaryMachineAxisInput.isValid Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.isValid
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
boolean propertyValue = rotaryMachineAxisInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


RotaryMachineAxisInput.name Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

The user facing name of this axis.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.name

# Set the value of the property.
rotaryMachineAxisInput_var.name = propertyValue
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxisInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = rotaryMachineAxisInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxisInput.objectType Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.objectType
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
string propertyValue = rotaryMachineAxisInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


RotaryMachineAxisInput.physicalRange Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Range of possible values for this axis. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.physicalRange

# Set the value of the property.
rotaryMachineAxisInput_var.physicalRange = propertyValue
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
Ptr<MachineAxisRange> propertyValue = rotaryMachineAxisInput_var->physicalRange();

// Set the value of the property, where value_var is a MachineAxisRange.
bool returnValue = rotaryMachineAxisInput_var->physicalRange(value_var);

Property Value

This is a read/write property whose value is a MachineAxisRange.

Version

Introduced in version April 2023


RotaryMachineAxisInput.rotationAxis Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

The infinite line that defines the direction and location of the axis of rotation. This direction is in the machine's coordinate system (e.g. an A axis would typically use (1,0,0) for the direction), and follows the right-hand rule.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.rotationAxis

# Set the value of the property.
rotaryMachineAxisInput_var.rotationAxis = propertyValue
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
Ptr<InfiniteLine3D> propertyValue = rotaryMachineAxisInput_var->rotationAxis();

// Set the value of the property, where value_var is an InfiniteLine3D.
bool returnValue = rotaryMachineAxisInput_var->rotationAxis(value_var);

Property Value

This is a read/write property whose value is an InfiniteLine3D.

Version

Introduced in version April 2023


RotaryMachineAxisInput.toolChangePosition Property

Parent Object: RotaryMachineAxisInput
Defined in namespace "adsk::cam" and the header file is <Cam/Machine/RotaryMachineAxisInput.h>

Description

Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.

Syntax

  • Python
  • C++
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.

# Get the value of the property.
propertyValue = rotaryMachineAxisInput_var.toolChangePosition

# Set the value of the property.
rotaryMachineAxisInput_var.toolChangePosition = propertyValue
"rotaryMachineAxisInput_var" is a variable referencing a RotaryMachineAxisInput object.
#include <Cam/Machine/RotaryMachineAxisInput.h>

// Get the value of the property.
double propertyValue = rotaryMachineAxisInput_var->toolChangePosition();

// Set the value of the property, where value_var is a double.
bool returnValue = rotaryMachineAxisInput_var->toolChangePosition(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2025


RuledSurfaceFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Object that represents an existing RuledSurface feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
alternateFace | Gets and sets if the other face is used for creation of the Ruled Surface. When creating a ruled surface using the edges of a solid or the interior edges of a surface the angle of the ruled surface is measured with respect to the face the selected edge is bounding. For a solid, or an interior edge on a surface, the edge connects to two faces. This setting toggles which of the two faces will be used for measuring the angle.
angle | Returns the parameter controlling the Ruled Surface angle. You can edit the angle by editing the value of the parameter 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 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
cornerType | Gets and sets the corner type for the ruled surface, indicating if the corners will be rounded or mitered. The default value is rounded.
direction Gets and sets the entity that defines the direction when the ruled surface type is DirectionRuledSurfaceType. The direction is specified by providing a linear or planar entity. For example, a linear edge, construction axis, planar face, or construction plane can be used as input.

If this property is set when the ruledSurfaceType is not DirectionRuledSurfaceType, the type will automatically be changed to DirectionRuledSurfaceType. If you get this property when the direction is not DirectionRuledSurfaceType, it will return null.
distance | Returns the parameter controlling the Ruled Surface distance. You can edit the distance by editing the value of the parameter object.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
profile Gets and sets the Profile object that defines the sketch geometry or edges that define the shape of the ruled surface. The Component.createBRepEdgeProfile method is useful to create a profile defined from edges.

In many cases the RuledSurface operation results in the profile being consumed so it is 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 profile still exists.
ruledSurfaceType | Gets and sets the type of ruled surface. To set this to DirectionRuledSurfaceType, use the direction property to set the direction entity, which will automatically set this to DirectionRuledSurfaceType.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RuledSurfaceFeature.createForAssemblyContext, RuledSurfaceFeature.nativeObject, RuledSurfaceFeatures.add, RuledSurfaceFeatures.item, RuledSurfaceFeatures.itemByName

Samples

Name | Description
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version September 2020


RuledSurfaceFeature.alternateFace Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets if the other face is used for creation of the Ruled Surface. When creating a ruled surface using the edges of a solid or the interior edges of a surface the angle of the ruled surface is measured with respect to the face the selected edge is bounding. For a solid, or an interior edge on a surface, the edge connects to two faces. This setting toggles which of the two faces will be used for measuring the angle.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.alternateFace

# Set the value of the property.
ruledSurfaceFeature_var.alternateFace = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeature_var->alternateFace();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ruledSurfaceFeature_var->alternateFace(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeature.angle Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the parameter controlling the Ruled Surface angle. You can edit the angle by editing the value of the parameter object.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.angle
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = ruledSurfaceFeature_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2020


RuledSurfaceFeature.assemblyContext Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.assemblyContext
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = ruledSurfaceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2020


RuledSurfaceFeature.attributes Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.attributes
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = ruledSurfaceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2020


RuledSurfaceFeature.baseFeature Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.baseFeature
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = ruledSurfaceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version September 2020


RuledSurfaceFeature.bodies Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.bodies
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = ruledSurfaceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2020


RuledSurfaceFeature.classType Method

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RuledSurfaceFeature.classType()
This is a static method.

#include <Fusion/Features/RuledSurfaceFeature.h>

returnValue = adsk::fusion::RuledSurfaceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


RuledSurfaceFeature.cornerType Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets the corner type for the ruled surface, indicating if the corners will be rounded or mitered. The default value is rounded.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.cornerType

# Set the value of the property.
ruledSurfaceFeature_var.cornerType = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
RuledSurfaceCornerTypes propertyValue = ruledSurfaceFeature_var->cornerType();

// Set the value of the property, where value_var is a RuledSurfaceCornerTypes.
bool returnValue = ruledSurfaceFeature_var->cornerType(value_var);

Property Value

This is a read/write property whose value is a RuledSurfaceCornerTypes.

Version

Introduced in version August 2021


RuledSurfaceFeature.createForAssemblyContext Method

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
returnValue = ruledSurfaceFeature_var.createForAssemblyContext(occurrence)
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

#include <Fusion/Features/RuledSurfaceFeature.h>

returnValue = ruledSurfaceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RuledSurfaceFeature | 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 2020


RuledSurfaceFeature.deleteMe Method

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
returnValue = ruledSurfaceFeature_var.deleteMe()
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

#include <Fusion/Features/RuledSurfaceFeature.h>

returnValue = ruledSurfaceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2020


RuledSurfaceFeature.direction Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets the entity that defines the direction when the ruled surface type is DirectionRuledSurfaceType. The direction is specified by providing a linear or planar entity. For example, a linear edge, construction axis, planar face, or construction plane can be used as input.

If this property is set when the ruledSurfaceType is not DirectionRuledSurfaceType, the type will automatically be changed to DirectionRuledSurfaceType. If you get this property when the direction is not DirectionRuledSurfaceType, it will return null.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.direction

# Set the value of the property.
ruledSurfaceFeature_var.direction = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = ruledSurfaceFeature_var->direction();

// Set the value of the property, where value_var is a Base.
bool returnValue = ruledSurfaceFeature_var->direction(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2020


RuledSurfaceFeature.dissolve Method

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
returnValue = ruledSurfaceFeature_var.dissolve()
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

#include <Fusion/Features/RuledSurfaceFeature.h>

returnValue = ruledSurfaceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2020


RuledSurfaceFeature.distance Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the parameter controlling the Ruled Surface distance. You can edit the distance by editing the value of the parameter object.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.distance
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = ruledSurfaceFeature_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2020


RuledSurfaceFeature.entityToken Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.entityToken
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuledSurfaceFeature.errorOrWarningMessage Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.errorOrWarningMessage
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuledSurfaceFeature.faces Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.faces
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = ruledSurfaceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2020


RuledSurfaceFeature.healthState Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.healthState
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = ruledSurfaceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version September 2020


RuledSurfaceFeature.isParametric Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.isParametric
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeature.isSuppressed Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.isSuppressed

# Set the value of the property.
ruledSurfaceFeature_var.isSuppressed = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ruledSurfaceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeature.isValid Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.isValid
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeature.linkedFeatures Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.linkedFeatures
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = ruledSurfaceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2020


RuledSurfaceFeature.name Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.name

# Set the value of the property.
ruledSurfaceFeature_var.name = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = ruledSurfaceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2020


RuledSurfaceFeature.nativeObject Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.nativeObject
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<RuledSurfaceFeature> propertyValue = ruledSurfaceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a RuledSurfaceFeature.

Version

Introduced in version September 2020


RuledSurfaceFeature.objectType Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.objectType
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuledSurfaceFeature.parentComponent Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.parentComponent
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = ruledSurfaceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2020


RuledSurfaceFeature.profile Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets the Profile object that defines the sketch geometry or edges that define the shape of the ruled surface. The Component.createBRepEdgeProfile method is useful to create a profile defined from edges.

In many cases the RuledSurface operation results in the profile being consumed so it is 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 profile still exists.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.profile

# Set the value of the property.
ruledSurfaceFeature_var.profile = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = ruledSurfaceFeature_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = ruledSurfaceFeature_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2020


RuledSurfaceFeature.ruledSurfaceType Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Gets and sets the type of ruled surface. To set this to DirectionRuledSurfaceType, use the direction property to set the direction entity, which will automatically set this to DirectionRuledSurfaceType.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.ruledSurfaceType

# Set the value of the property.
ruledSurfaceFeature_var.ruledSurfaceType = propertyValue
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
RuledSurfaceTypes propertyValue = ruledSurfaceFeature_var->ruledSurfaceType();

// Set the value of the property, where value_var is a RuledSurfaceTypes.
bool returnValue = ruledSurfaceFeature_var->ruledSurfaceType(value_var);

Property Value

This is a read/write property whose value is a RuledSurfaceTypes.

Version

Introduced in version September 2020


RuledSurfaceFeature.timelineObject Property

Parent Object: RuledSurfaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.

# Get the value of the property.
propertyValue = ruledSurfaceFeature_var.timelineObject
"ruledSurfaceFeature_var" is a variable referencing a RuledSurfaceFeature object.
#include <Fusion/Features/RuledSurfaceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = ruledSurfaceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a Ruled Surface feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
alternateFace | Gets and sets if the other face is used for creation of the Ruled Surface. When creating a ruled surface using the edges of a solid or the interior edges of a surface the angle of the ruled surface is measured with respect to the face the selected edge is bounding. For a solid, or an interior edge on a surface, the edge connects to two faces. This setting toggles which of the two faces will be used for measuring the angle.
angle | Gets and sets the ValueInput object that defines the Ruled Surface angle. If the input is a real value, the units are radians.
cornerType | Gets and sets the corner type for the ruled surface, indicating if the corners will be rounded or mitered. The default value is rounded.
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Ruled Surface is created based on geometry (e.g. a profile) in another component AND (the Ruled Surface) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
direction Gets and sets the entity that defines the direction when the ruled surface type is DirectionRuledSurfaceType. The direction is specified by providing a linear or planar entity. For example, a linear edge, construction axis, planar face, or construction plane can be used as input.

If this property is set when the ruledSurfaceType is not DirectionRuledSurfaceType, the type will automatically be changed to DirectionRuledSurfaceType. If you get this property when the direction is not DirectionRuledSurfaceType, it will return null.
distance | Gets and sets the ValueInput object that defines the Ruled Surface distance. If the value input is a real value it will define the 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.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation | Gets and sets the type of operation performed by the ruled surface.
profile | Gets and sets the Profile object that defines the sketch geometry or edges that define the shape of the ruled surface. The Component.createBRepEdgeProfile method is useful to create a profile defined from edges.
ruledSurfaceType | Gets and sets the type of ruled surface to create. To set this to DirectionRuledSurfaceType, use the direction property to set the direction entity, which will automatically set this to DirectionRuledSurfaceType.
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

RuledSurfaceFeatures.createInput

Samples

Name | Description
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.alternateFace Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets if the other face is used for creation of the Ruled Surface. When creating a ruled surface using the edges of a solid or the interior edges of a surface the angle of the ruled surface is measured with respect to the face the selected edge is bounding. For a solid, or an interior edge on a surface, the edge connects to two faces. This setting toggles which of the two faces will be used for measuring the angle.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.alternateFace

# Set the value of the property.
ruledSurfaceFeatureInput_var.alternateFace = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeatureInput_var->alternateFace();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ruledSurfaceFeatureInput_var->alternateFace(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.angle Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the Ruled Surface angle. If the input is a real value, the units are radians.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.angle

# Set the value of the property.
ruledSurfaceFeatureInput_var.angle = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = ruledSurfaceFeatureInput_var->angle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = ruledSurfaceFeatureInput_var->angle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.classType Method

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RuledSurfaceFeatureInput.classType()
This is a static method.

#include <Fusion/Features/RuledSurfaceFeatureInput.h>

returnValue = adsk::fusion::RuledSurfaceFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.cornerType Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the corner type for the ruled surface, indicating if the corners will be rounded or mitered. The default value is rounded.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.cornerType

# Set the value of the property.
ruledSurfaceFeatureInput_var.cornerType = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
RuledSurfaceCornerTypes propertyValue = ruledSurfaceFeatureInput_var->cornerType();

// Set the value of the property, where value_var is a RuledSurfaceCornerTypes.
bool returnValue = ruledSurfaceFeatureInput_var->cornerType(value_var);

Property Value

This is a read/write property whose value is a RuledSurfaceCornerTypes.

Version

Introduced in version August 2021


RuledSurfaceFeatureInput.creationOccurrence Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Ruled Surface is created based on geometry (e.g. a profile) in another component AND (the Ruled Surface) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.creationOccurrence

# Set the value of the property.
ruledSurfaceFeatureInput_var.creationOccurrence = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = ruledSurfaceFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = ruledSurfaceFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.direction Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the entity that defines the direction when the ruled surface type is DirectionRuledSurfaceType. The direction is specified by providing a linear or planar entity. For example, a linear edge, construction axis, planar face, or construction plane can be used as input.

If this property is set when the ruledSurfaceType is not DirectionRuledSurfaceType, the type will automatically be changed to DirectionRuledSurfaceType. If you get this property when the direction is not DirectionRuledSurfaceType, it will return null.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.direction

# Set the value of the property.
ruledSurfaceFeatureInput_var.direction = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = ruledSurfaceFeatureInput_var->direction();

// Set the value of the property, where value_var is a Base.
bool returnValue = ruledSurfaceFeatureInput_var->direction(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.distance Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the Ruled Surface distance. If the value input is a real value it will define the distance in centimeters.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.distance

# Set the value of the property.
ruledSurfaceFeatureInput_var.distance = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = ruledSurfaceFeatureInput_var->distance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = ruledSurfaceFeatureInput_var->distance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.isValid Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.isValid
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.objectType Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.objectType
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.operation Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the type of operation performed by the ruled surface.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.operation

# Set the value of the property.
ruledSurfaceFeatureInput_var.operation = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = ruledSurfaceFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = ruledSurfaceFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version July 2021


RuledSurfaceFeatureInput.profile Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the Profile object that defines the sketch geometry or edges that define the shape of the ruled surface. The Component.createBRepEdgeProfile method is useful to create a profile defined from edges.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.profile

# Set the value of the property.
ruledSurfaceFeatureInput_var.profile = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = ruledSurfaceFeatureInput_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = ruledSurfaceFeatureInput_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.ruledSurfaceType Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

Description

Gets and sets the type of ruled surface to create. To set this to DirectionRuledSurfaceType, use the direction property to set the direction entity, which will automatically set this to DirectionRuledSurfaceType.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.ruledSurfaceType

# Set the value of the property.
ruledSurfaceFeatureInput_var.ruledSurfaceType = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
RuledSurfaceTypes propertyValue = ruledSurfaceFeatureInput_var->ruledSurfaceType();

// Set the value of the property, where value_var is a RuledSurfaceTypes.
bool returnValue = ruledSurfaceFeatureInput_var->ruledSurfaceType(value_var);

Property Value

This is a read/write property whose value is a RuledSurfaceTypes.

Version

Introduced in version September 2020


RuledSurfaceFeatureInput.targetBaseFeature Property

Parent Object: RuledSurfaceFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatureInput.h>

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.

Syntax

  • Python
  • C++
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatureInput_var.targetBaseFeature

# Set the value of the property.
ruledSurfaceFeatureInput_var.targetBaseFeature = propertyValue
"ruledSurfaceFeatureInput_var" is a variable referencing a RuledSurfaceFeatureInput object.
#include <Fusion/Features/RuledSurfaceFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = ruledSurfaceFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = ruledSurfaceFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version September 2020


RuledSurfaceFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Collection that provides access to all of the existing Ruled Surface features in a component and supports the ability to create new Ruled Surface features.

Methods

Name | Description
add | Creates a new RuledSurface 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 RuledSurfaceFeatureInput object that defines the input needed to create a ruled surface feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the RuledSurfaceFeatureInput object.
item | Function that returns the specified ruled surface feature using an index into the collection.
itemByName | Function that returns the specified RuledSurface feature using the name of the feature.

Properties

Name | Description
count | The number of RuledSurface 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.ruledSurfaceFeatures

Samples

Name | Description
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version September 2020


RuledSurfaceFeatures.add Method

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Creates a new RuledSurface feature.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
returnValue = ruledSurfaceFeatures_var.add(input)
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

#include <Fusion/Features/RuledSurfaceFeatures.h>

returnValue = ruledSurfaceFeatures_var->add(input);

Return Value

Type | Description
RuledSurfaceFeature | Returns the newly created RuledSurfaceFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | RuledSurfaceFeatureInput | An RuledSurfaceFeatureInput object that defines the desired RuledSurface feature. Use the createInput method to create a new RuledSurfaceFeatureInput object and then use methods on it (the RuledSurfaceFeatureInput object) to define the desired options for the ruled surface feature.

Version

Introduced in version September 2020


RuledSurfaceFeatures.classType Method

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RuledSurfaceFeatures.classType()
This is a static method.

#include <Fusion/Features/RuledSurfaceFeatures.h>

returnValue = adsk::fusion::RuledSurfaceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2020


RuledSurfaceFeatures.count Property

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

The number of RuledSurface features in the collection.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatures_var.count
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
#include <Fusion/Features/RuledSurfaceFeatures.h>

// Get the value of the property.
uinteger propertyValue = ruledSurfaceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2020


RuledSurfaceFeatures.createInput Method

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Creates a RuledSurfaceFeatureInput object that defines the input needed to create a ruled surface feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the RuledSurfaceFeatureInput object.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
# Uses no optional arguments.
returnValue = ruledSurfaceFeatures_var.createInput(profile, distance, angle, ruledSurfaceType)

# Uses optional arguments.
returnValue = ruledSurfaceFeatures_var.createInput(profile, distance, angle, ruledSurfaceType, direction)
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

#include <Fusion/Features/RuledSurfaceFeatures.h>

// Uses no optional arguments.
returnValue = ruledSurfaceFeatures_var->createInput(profile, distance, angle, ruledSurfaceType);

// Uses optional arguments.
returnValue = ruledSurfaceFeatures_var->createInput(profile, distance, angle, ruledSurfaceType, direction);

Return Value

Type | Description
RuledSurfaceFeatureInput | Returns the newly created RuledSurfaceFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
profile | Base | A Profile object that defines the sketch geometry or edges that define the shape of the ruled surface. The Component.createBRepEdgeProfile method is useful to create a profile defined from edges.
distance | ValueInput | ValueInput object that defines the extension distance of the Ruled Surface..
angle | ValueInput | ValueInput object that defines angle to use when creating the Ruled Surface. When the input is a real value, the units are radians.
ruledSurfaceType | RuledSurfaceTypes | The Ruled Surface type (TangentRuledSurfaceType, NormalRuledSurfaceType, or DirectionRuledSurfaceType).
direction | Base | If the ruled surface type is DirectionRuledSurfaceType, you must specify the direction. The direction is specified by providing a linear or planar entity. For example, a linear edge, construction axis, planar face, or construction plane can be used as input. This is an optional argument whose default value is null.

Version

Introduced in version September 2020


RuledSurfaceFeatures.isValid Property

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatures_var.isValid
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
#include <Fusion/Features/RuledSurfaceFeatures.h>

// Get the value of the property.
boolean propertyValue = ruledSurfaceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2020


RuledSurfaceFeatures.item Method

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Function that returns the specified ruled surface feature using an index into the collection.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
returnValue = ruledSurfaceFeatures_var.item(index)
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

#include <Fusion/Features/RuledSurfaceFeatures.h>

returnValue = ruledSurfaceFeatures_var->item(index);

Return Value

Type | Description
RuledSurfaceFeature | 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 2020


RuledSurfaceFeatures.itemByName Method

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

Function that returns the specified RuledSurface feature using the name of the feature.

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
returnValue = ruledSurfaceFeatures_var.itemByName(name)
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

#include <Fusion/Features/RuledSurfaceFeatures.h>

returnValue = ruledSurfaceFeatures_var->itemByName(name);

Return Value

Type | Description
RuledSurfaceFeature | 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 2020


RuledSurfaceFeatures.objectType Property

Parent Object: RuledSurfaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuledSurfaceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.

# Get the value of the property.
propertyValue = ruledSurfaceFeatures_var.objectType
"ruledSurfaceFeatures_var" is a variable referencing a RuledSurfaceFeatures object.
#include <Fusion/Features/RuledSurfaceFeatures.h>

// Get the value of the property.
string propertyValue = ruledSurfaceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuleFilletFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Object that represents an existing rule fillet feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

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.

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.entityToken Property

Parent Object: RuleFilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.entityToken
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
string propertyValue = ruleFilletFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


RuleFilletFeature.errorOrWarningMessage Property

Parent Object: RuleFilletFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

Collection that provides access to all of the existing rule fillet features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.ruleFilletFeatures

Version

Introduced in version September 2015


RuleFilletFeatures.classType Method

Parent Object: RuleFilletFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

The number of rule fillet features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

Function that returns the specified rule fillet feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

Function that returns the specified rule fillet feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/RuleFilletFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

Description

Defines that a SAT export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SATExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

Description

Defines that a SAT import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ImportManager.createSATImportOptions

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


SATImportOptions.classType Method

Parent Object: SATImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SATImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SaveImageFileOptions Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Class that defines the various options that can be used when saving a viewport as an image. This object is created by using the static create method on the class and is then used as input to the Viewport.saveAsImageFileWithOptions method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 SaveImageFileOptions object. The returned object can be used to define the various options to use when saving a viewport as an image. The object is passed into the ViewPort.saveAsImageFileWithOptions method to create an image of the viewport.

Properties

Name | Description
filename | Gets and sets 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.
height | Gets and set the height of the image to be created in pixels. A value of zero is valid and indicates the current height of the viewport is to be used. When the SaveImageFileOptions object is initially created, this is initialized to 0.
isAntiAliased Gets and sets if the rendered image should be anti-aliased or not. If false, there is no anti-aliasing.

When the SaveImageFileOptions object is initially created, this is initialized to true.
isBackgroundTransparent Gets and sets if the background should be rendered as transparent. If false, the background will be the same as seen in Fusion.

When the SaveImageFileOptions object is initially created, this is initialized to 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
width | Gets and set the width of the image to be created in pixels. A value of zero is valid and indicates the current width of the viewport is to be used. When the SaveImageFileOptions object is initially created, this is initialized to 0.

Accessed From

SaveImageFileOptions.create

Version

Introduced in version May 2022


SaveImageFileOptions.classType Method

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SaveImageFileOptions.classType()
This is a static method.

#include <Core/Application/SaveImageFileOptions.h>

returnValue = adsk::core::SaveImageFileOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


SaveImageFileOptions.create Method

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Creates a new SaveImageFileOptions object. The returned object can be used to define the various options to use when saving a viewport as an image. The object is passed into the ViewPort.saveAsImageFileWithOptions method to create an image of the viewport.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SaveImageFileOptions.create(filename)
This is a static method.

#include <Core/Application/SaveImageFileOptions.h>

returnValue = adsk::core::SaveImageFileOptions::create(filename);

Return Value

Type | Description
SaveImageFileOptions | Returns a SaveImageFileOptions object.

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.

Version

Introduced in version May 2022


SaveImageFileOptions.filename Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Gets and sets 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.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.filename

# Set the value of the property.
saveImageFileOptions_var.filename = propertyValue
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
string propertyValue = saveImageFileOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = saveImageFileOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


SaveImageFileOptions.height Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Gets and set the height of the image to be created in pixels. A value of zero is valid and indicates the current height of the viewport is to be used. When the SaveImageFileOptions object is initially created, this is initialized to 0.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.height

# Set the value of the property.
saveImageFileOptions_var.height = propertyValue
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
integer propertyValue = saveImageFileOptions_var->height();

// Set the value of the property, where value_var is an integer.
bool returnValue = saveImageFileOptions_var->height(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2022


SaveImageFileOptions.isAntiAliased Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Gets and sets if the rendered image should be anti-aliased or not. If false, there is no anti-aliasing.

When the SaveImageFileOptions object is initially created, this is initialized to true.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.isAntiAliased

# Set the value of the property.
saveImageFileOptions_var.isAntiAliased = propertyValue
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
boolean propertyValue = saveImageFileOptions_var->isAntiAliased();

// Set the value of the property, where value_var is a boolean.
bool returnValue = saveImageFileOptions_var->isAntiAliased(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


SaveImageFileOptions.isBackgroundTransparent Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Gets and sets if the background should be rendered as transparent. If false, the background will be the same as seen in Fusion.

When the SaveImageFileOptions object is initially created, this is initialized to false.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.isBackgroundTransparent

# Set the value of the property.
saveImageFileOptions_var.isBackgroundTransparent = propertyValue
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
boolean propertyValue = saveImageFileOptions_var->isBackgroundTransparent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = saveImageFileOptions_var->isBackgroundTransparent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


SaveImageFileOptions.isValid Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.isValid
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
boolean propertyValue = saveImageFileOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


SaveImageFileOptions.objectType Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.objectType
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
string propertyValue = saveImageFileOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


SaveImageFileOptions.width Property

Parent Object: SaveImageFileOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SaveImageFileOptions.h>

Description

Gets and set the width of the image to be created in pixels. A value of zero is valid and indicates the current width of the viewport is to be used. When the SaveImageFileOptions object is initially created, this is initialized to 0.

Syntax

  • Python
  • C++
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.

# Get the value of the property.
propertyValue = saveImageFileOptions_var.width

# Set the value of the property.
saveImageFileOptions_var.width = propertyValue
"saveImageFileOptions_var" is a variable referencing a SaveImageFileOptions object.
#include <Core/Application/SaveImageFileOptions.h>

// Get the value of the property.
integer propertyValue = saveImageFileOptions_var->width();

// Set the value of the property, where value_var is an integer.
bool returnValue = saveImageFileOptions_var->width(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2022


ScalarControlPoint Object

ScalarControlPoint Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A read-only structure that represents a control point used in ScalarControlPointMapGraphNodeProperty.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
interpolator | The interpolator function.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameter | The parameter inside the input domain of the control point map for this point.
value | The output double value of the control point for this point.

Accessed From

ScalarControlPointMapGraphNodeProperty.getPoint

Version

Introduced in version May 2025


ScalarControlPoint.classType Method

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ScalarControlPoint.classType()
This is a static method.

#include <Volume/Volumetric/ScalarControlPoint.h>

returnValue = adsk::volume::ScalarControlPoint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ScalarControlPoint.interpolator Property

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

The interpolator function.

Syntax

  • Python
  • C++
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.

# Get the value of the property.
propertyValue = scalarControlPoint_var.interpolator
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.
#include <Volume/Volumetric/ScalarControlPoint.h>

// Get the value of the property.
ControlPointInterpolators propertyValue = scalarControlPoint_var->interpolator();

Property Value

This is a read only property whose value is a ControlPointInterpolators.

Version

Introduced in version May 2025


ScalarControlPoint.isValid Property

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.

# Get the value of the property.
propertyValue = scalarControlPoint_var.isValid
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.
#include <Volume/Volumetric/ScalarControlPoint.h>

// Get the value of the property.
boolean propertyValue = scalarControlPoint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ScalarControlPoint.objectType Property

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.

# Get the value of the property.
propertyValue = scalarControlPoint_var.objectType
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.
#include <Volume/Volumetric/ScalarControlPoint.h>

// Get the value of the property.
string propertyValue = scalarControlPoint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarControlPoint.parameter Property

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

The parameter inside the input domain of the control point map for this point.

Syntax

  • Python
  • C++
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.

# Get the value of the property.
propertyValue = scalarControlPoint_var.parameter
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.
#include <Volume/Volumetric/ScalarControlPoint.h>

// Get the value of the property.
double propertyValue = scalarControlPoint_var->parameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


ScalarControlPoint.value Property

Parent Object: ScalarControlPoint

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPoint.h>

Description

The output double value of the control point for this point.

Syntax

  • Python
  • C++
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.

# Get the value of the property.
propertyValue = scalarControlPoint_var.value
"scalarControlPoint_var" is a variable referencing a ScalarControlPoint object.
#include <Volume/Volumetric/ScalarControlPoint.h>

// Get the value of the property.
double propertyValue = scalarControlPoint_var->value();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty Object

ScalarControlPointMapGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that defines a complex mapping curve from an input domain of double values to an output range of double values. The mapping is represented by a set of points ordered by their domain value parameters. For a given input value, the output value is interpolated from the values of the two points before and after it using the specified interpolation function for each point.

Methods

Name | Description
addPoint | Add a point to the map.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Remove all points from the map.
getPoint | Get the point at index.
removePoint | Remove a point from the map.

Properties

Name | Description
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pointCount | The number of points.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.addPoint Method

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Add a point to the map.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
returnValue = scalarControlPointMapGraphNodeProperty_var.addPoint(parameter, value, interpolator)
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

returnValue = scalarControlPointMapGraphNodeProperty_var->addPoint(parameter, value, interpolator);

Return Value

Type | Description
boolean | True if successfully added.

Parameters

Name | Type | Description
parameter | double | Where in the input domain where the point lies.
value | double | The double value of the parameter in the output domain.
interpolator | ControlPointInterpolators | The function used to interpolate an output value for a input parameter between this point and the next.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.classType Method

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ScalarControlPointMapGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

returnValue = adsk::volume::ScalarControlPointMapGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.clear Method

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Remove all points from the map.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
returnValue = scalarControlPointMapGraphNodeProperty_var.clear()
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

returnValue = scalarControlPointMapGraphNodeProperty_var->clear();

Return Value

Type | Description
boolean | True if successfully cleared.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.description Property

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarControlPointMapGraphNodeProperty_var.description
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarControlPointMapGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.getPoint Method

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Get the point at index.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
returnValue = scalarControlPointMapGraphNodeProperty_var.getPoint(index)
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

returnValue = scalarControlPointMapGraphNodeProperty_var->getPoint(index);

Return Value

Type | Description
ScalarControlPoint | The control point at this index.

Parameters

Name | Type | Description
index | uinteger | Index of the point to get.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.isValid Property

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarControlPointMapGraphNodeProperty_var.isValid
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = scalarControlPointMapGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.name Property

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarControlPointMapGraphNodeProperty_var.name
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarControlPointMapGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.objectType Property

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarControlPointMapGraphNodeProperty_var.objectType
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarControlPointMapGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.pointCount Property

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

The number of points.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarControlPointMapGraphNodeProperty_var.pointCount
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

// Get the value of the property.
uinteger propertyValue = scalarControlPointMapGraphNodeProperty_var->pointCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


ScalarControlPointMapGraphNodeProperty.removePoint Method

Parent Object: ScalarControlPointMapGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

Description

Remove a point from the map.

Syntax

  • Python
  • C++
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.
returnValue = scalarControlPointMapGraphNodeProperty_var.removePoint(index)
"scalarControlPointMapGraphNodeProperty_var" is a variable referencing a ScalarControlPointMapGraphNodeProperty object.

#include <Volume/Volumetric/ScalarControlPointMapGraphNodeProperty.h>

returnValue = scalarControlPointMapGraphNodeProperty_var->removePoint(index);

Return Value

Type | Description
boolean | True if successfully removed.

Parameters

Name | Type | Description
index | uinteger | Index of the point to remove.

Version

Introduced in version May 2025


ScalarGraphNodeProperty Object

ScalarGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a floating point value.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.classType Method

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.ScalarGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

returnValue = adsk::volume::ScalarGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.description Property

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarGraphNodeProperty_var.description
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.
#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.isValid Property

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarGraphNodeProperty_var.isValid
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.
#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = scalarGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.name Property

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarGraphNodeProperty_var.name
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.
#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.objectType Property

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarGraphNodeProperty_var.objectType
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.
#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = scalarGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


ScalarGraphNodeProperty.value Property

Parent Object: ScalarGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/ScalarGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.

# Get the value of the property.
propertyValue = scalarGraphNodeProperty_var.value

# Set the value of the property.
scalarGraphNodeProperty_var.value = propertyValue
"scalarGraphNodeProperty_var" is a variable referencing a ScalarGraphNodeProperty object.
#include <Volume/Volumetric/ScalarGraphNodeProperty.h>

// Get the value of the property.
double propertyValue = scalarGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = scalarGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2025


ScaleFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Object that represents an existing scale feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setToUniform | Calling this method will change to a uniform scale. The isUniform is set to true if successful. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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.entityToken Property

Parent Object: ScaleFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.entityToken
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
string propertyValue = scaleFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ScaleFeature.errorOrWarningMessage Property

Parent Object: ScaleFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Gets if it's uniform scale.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Gets and sets the point as reference to scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Calling this method will change to a uniform scale. The isUniform is set to true if successful.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a scale feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Gets if the scale is uniform.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Gets and sets the origin point of the scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Gets the scale in X direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Gets the scale in Y direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatureInput.h>

Description

Gets the scale in Z direction.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Collection that provides access to all of the existing scale features in a component and supports the ability to create new scale features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Creates a new scale feature.

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
scaleFeatures.add | Demonstrates the creation a scale feature.
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


scaleFeatures.add

Description

Demonstrates the creation a scale feature.

Code Samples

  • Python
def demo_scaleFeatures_add(rootComp: adsk.fusion.Component):
    body = _ui.selectEntity('Select a body', 'Bodies').entity
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(body)
    scalePoint: adsk.fusion.BRepVertex = _ui.selectEntity('Select a vertex as the scale origin.', 'Vertices').entity
    scaleFactor = adsk.core.ValueInput.createByReal(0.5)

    scaleFeatures = rootComp.features.scaleFeatures
    input = scaleFeatures.createInput(bodies, scalePoint, scaleFactor)
    scaleFeature = scaleFeatures.add(input)


ScaleFeatures.classType Method

Parent Object: ScaleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

The number of scale features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

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.

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
scaleFeatures.add | Demonstrates the creation a scale feature.
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatures.isValid Property

Parent Object: ScaleFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Function that returns the specified scale feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

Function that returns the specified scale feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ScaleFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SceneSettings Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Provides access to all the settings that control how the scene is rendered.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
restoreDefaults | Changes all of the scene settings to the default values.
saveAsDefaults | Saves all of the scene settings as the default settings for this Design.

Properties

Name | Description
aspectRatio Gets and sets the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. To define a custom aspect ratio set this property to CustomRenderAspectRatio and use the aspectRatioHeight and aspectRatioWidth properties to define any aspect ratio.

This is used for in-canvas render to allow you to use a different aspect ratio than what is implicitly defined by the size of the active viewport.

If this is set to CustomRenderAspectRatio, use the aspectRatioHeight and aspectRatioWidth to define the aspect ratio.
aspectRatioHeight Gets and sets the height of the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. For example specifying the width and height of 4:3 is equivalent to setting 20:15. It's only the ratio of the numbers that matters.

The resolution is determined by the screen resolution when rendering in-canvas or is specified when rendering locally or using the cloud. When setting this property the aspectRatio property is automatically set to CustomRenderAspectRatio.
aspectRatioWidth Gets and sets the width of the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. For example specifying the width and height of 4:3 is equivalent to setting 20:15. It's only the ratio of the numbers that matters.

The resolution is determined by the screen resolution when rendering in-canvas or is specified when rendering locally or using the cloud. When setting this property the aspectRatio property is automatically set to CustomRenderAspectRatio.
backgroundEnvironment Gets and sets the environment to use for the background. The available environments can be accessed through the RenderManager.renderEnvironments property.

Getting this property is only valid when the backgroundType property returns EnvironmentRenderSceneBackgroundType. Setting this property will automatically set the background type to EnvironmentRenderSceneBackgroundType.
backgroundSolidColor Gets and sets the background color. When this property is set, it defines the background to be a solid color. The opacity component of the color is ignored.

Getting this property is only valid when the backgroundType property returns SolidColorRenderSceneBackgroundType. Setting this property will automatically set the background type to SolidColorRenderSceneBackgroundType.
backgroundType | Specifies the current type of background being used to render the scene. To change the background type use either the backgroundEnvironment or the backgroundSolidColor to set the environment or color.
brightness | Gets and sets the brightness or luminance of the scene. This must be a value between 0 and 100,000 and is in lux units.
cameraExposure | Gets and sets if the exposure of the camera as specified using the "Exposure Value" (EV). Valid values are between -15.0 and 25.0, inclusive.
cameraFocalLength | Gets and sets the focal length of the camera, specified in millimeters. Changing the perspective angle of the camera associated with the active viewport will also change the focal length. Focal length and perspective angle are two different ways to control the same setting.
cameraType | Gets and sets the type of camera to use when rendering the scene.
centerOfFocus When the isDepthofFieldEnabled property is true, this point is used as the center of focus. All objects that are the same distance from the camera as this point will be in focus. Any geometry that is closer or further away from the camera than this point will appear more out of focus.

Setting this property has the side effect of setting the isDepthOfField property to true. If the isDepthOfFieldEnabled property is false, the value of this property is ignored.
depthOfFieldBlur Specify the amount of blur to apply to objects outside the center of focus. This must be a value between 0.001 and 2.000 inclusive. The depth of field is defined by using the centerOfFocus property to set the depth where the model is in focus.

Setting this property has the side effect of setting the isDepthOfField property to true. If the isDepthOfFieldEnabled property is false, the value of this property is ignored.
groundOffset Gets and sets the distance of the ground from the bottom of the model. A value of 0 is at the bottom of the model and a positive value moves the plane up and negative down. The value is in centimeters.

If the isGroundFlattened property is true, and a texture is being applied to the ground, the groundPosition property can be used to change both the offset and location of the texture on the ground. The lightAngle property controls the orientation of the texture.
groundPosition Gets and sets the origin of the projection of the environment onto the textured ground plane. This lets you position the environment relative to the model. This is only used when the isGroundFlattened property is true.

If the isGroundFlattened property is true, and a texture is being applied to the ground, the groundPosition property can be used to change both the offset and location of the texture on the ground. The lightAngle property controls the orientation of the texture.
groundRoughness | Gets and sets the roughness of the ground which controls the sharpness of the reflection. This is only used when the isGroundReflections property is true. This is a value between 0 and 1, where 0 is smooth and 1 is rough.
isDepthOfFieldEnabled | Gets and sets if the depth of field option is enabled. When setting this to true, use the centerOfFocus and depthOfFieldBlur properties to specify how the depth of field is defined.
isGroundDisplayed | Gets and sets if the ground plane is displayed. The plane allows shadows on the ground and reflections if the isGroundReflections property is true.
isGroundFlattened | Gets and sets if the ground plane is "textured" where the environment image is mapped as a texture.
isGroundReflections | Gets and sets if objects are reflected on the ground plane.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lightAngle Specifies the rotation of the lighting. The angle is specified in Radians.

When the isGroundFlattened property is true, this also controls the angle of the texture that is applied to the ground. When the background is an environment, this controls the rotation of the environment relative to the model.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

RenderManager.sceneSettings

Version

Introduced in version May 2023


SceneSettings.aspectRatio Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. To define a custom aspect ratio set this property to CustomRenderAspectRatio and use the aspectRatioHeight and aspectRatioWidth properties to define any aspect ratio.

This is used for in-canvas render to allow you to use a different aspect ratio than what is implicitly defined by the size of the active viewport.

If this is set to CustomRenderAspectRatio, use the aspectRatioHeight and aspectRatioWidth to define the aspect ratio.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.aspectRatio

# Set the value of the property.
sceneSettings_var.aspectRatio = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
RenderAspectRatios propertyValue = sceneSettings_var->aspectRatio();

// Set the value of the property, where value_var is a RenderAspectRatios.
bool returnValue = sceneSettings_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a RenderAspectRatios.

Version

Introduced in version May 2023


SceneSettings.aspectRatioHeight Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the height of the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. For example specifying the width and height of 4:3 is equivalent to setting 20:15. It's only the ratio of the numbers that matters.

The resolution is determined by the screen resolution when rendering in-canvas or is specified when rendering locally or using the cloud. When setting this property the aspectRatio property is automatically set to CustomRenderAspectRatio.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.aspectRatioHeight

# Set the value of the property.
sceneSettings_var.aspectRatioHeight = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
integer propertyValue = sceneSettings_var->aspectRatioHeight();

// Set the value of the property, where value_var is an integer.
bool returnValue = sceneSettings_var->aspectRatioHeight(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


SceneSettings.aspectRatioWidth Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the width of the aspect ratio of the rendered image. This is not the resolution, but only the aspect ratio. For example specifying the width and height of 4:3 is equivalent to setting 20:15. It's only the ratio of the numbers that matters.

The resolution is determined by the screen resolution when rendering in-canvas or is specified when rendering locally or using the cloud. When setting this property the aspectRatio property is automatically set to CustomRenderAspectRatio.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.aspectRatioWidth

# Set the value of the property.
sceneSettings_var.aspectRatioWidth = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
integer propertyValue = sceneSettings_var->aspectRatioWidth();

// Set the value of the property, where value_var is an integer.
bool returnValue = sceneSettings_var->aspectRatioWidth(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version May 2023


SceneSettings.backgroundEnvironment Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the environment to use for the background. The available environments can be accessed through the RenderManager.renderEnvironments property.

Getting this property is only valid when the backgroundType property returns EnvironmentRenderSceneBackgroundType. Setting this property will automatically set the background type to EnvironmentRenderSceneBackgroundType.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.backgroundEnvironment

# Set the value of the property.
sceneSettings_var.backgroundEnvironment = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
Ptr<RenderEnvironment> propertyValue = sceneSettings_var->backgroundEnvironment();

// Set the value of the property, where value_var is a RenderEnvironment.
bool returnValue = sceneSettings_var->backgroundEnvironment(value_var);

Property Value

This is a read/write property whose value is a RenderEnvironment.

Version

Introduced in version May 2023


SceneSettings.backgroundSolidColor Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the background color. When this property is set, it defines the background to be a solid color. The opacity component of the color is ignored.

Getting this property is only valid when the backgroundType property returns SolidColorRenderSceneBackgroundType. Setting this property will automatically set the background type to SolidColorRenderSceneBackgroundType.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.backgroundSolidColor

# Set the value of the property.
sceneSettings_var.backgroundSolidColor = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
Ptr<Color> propertyValue = sceneSettings_var->backgroundSolidColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = sceneSettings_var->backgroundSolidColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version May 2023


SceneSettings.backgroundType Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Specifies the current type of background being used to render the scene. To change the background type use either the backgroundEnvironment or the backgroundSolidColor to set the environment or color.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.backgroundType
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
RenderSceneBackgroundTypes propertyValue = sceneSettings_var->backgroundType();

Property Value

This is a read only property whose value is a RenderSceneBackgroundTypes.

Version

Introduced in version May 2023


SceneSettings.brightness Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the brightness or luminance of the scene. This must be a value between 0 and 100,000 and is in lux units.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.brightness

# Set the value of the property.
sceneSettings_var.brightness = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->brightness();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->brightness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.cameraExposure Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets if the exposure of the camera as specified using the "Exposure Value" (EV). Valid values are between -15.0 and 25.0, inclusive.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.cameraExposure

# Set the value of the property.
sceneSettings_var.cameraExposure = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->cameraExposure();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->cameraExposure(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.cameraFocalLength Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the focal length of the camera, specified in millimeters. Changing the perspective angle of the camera associated with the active viewport will also change the focal length. Focal length and perspective angle are two different ways to control the same setting.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.cameraFocalLength

# Set the value of the property.
sceneSettings_var.cameraFocalLength = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->cameraFocalLength();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->cameraFocalLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.cameraType Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the type of camera to use when rendering the scene.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.cameraType

# Set the value of the property.
sceneSettings_var.cameraType = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
CameraTypes propertyValue = sceneSettings_var->cameraType();

// Set the value of the property, where value_var is a CameraTypes.
bool returnValue = sceneSettings_var->cameraType(value_var);

Property Value

This is a read/write property whose value is a CameraTypes.

Version

Introduced in version May 2023


SceneSettings.centerOfFocus Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

When the isDepthofFieldEnabled property is true, this point is used as the center of focus. All objects that are the same distance from the camera as this point will be in focus. Any geometry that is closer or further away from the camera than this point will appear more out of focus.

Setting this property has the side effect of setting the isDepthOfField property to true. If the isDepthOfFieldEnabled property is false, the value of this property is ignored.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.centerOfFocus

# Set the value of the property.
sceneSettings_var.centerOfFocus = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sceneSettings_var->centerOfFocus();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sceneSettings_var->centerOfFocus(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version May 2023


SceneSettings.classType Method

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SceneSettings.classType()
This is a static method.

#include <Fusion/Render/SceneSettings.h>

returnValue = adsk::fusion::SceneSettings::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2023


SceneSettings.depthOfFieldBlur Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Specify the amount of blur to apply to objects outside the center of focus. This must be a value between 0.001 and 2.000 inclusive. The depth of field is defined by using the centerOfFocus property to set the depth where the model is in focus.

Setting this property has the side effect of setting the isDepthOfField property to true. If the isDepthOfFieldEnabled property is false, the value of this property is ignored.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.depthOfFieldBlur

# Set the value of the property.
sceneSettings_var.depthOfFieldBlur = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->depthOfFieldBlur();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->depthOfFieldBlur(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.groundOffset Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the distance of the ground from the bottom of the model. A value of 0 is at the bottom of the model and a positive value moves the plane up and negative down. The value is in centimeters.

If the isGroundFlattened property is true, and a texture is being applied to the ground, the groundPosition property can be used to change both the offset and location of the texture on the ground. The lightAngle property controls the orientation of the texture.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.groundOffset

# Set the value of the property.
sceneSettings_var.groundOffset = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->groundOffset();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->groundOffset(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.groundPosition Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the origin of the projection of the environment onto the textured ground plane. This lets you position the environment relative to the model. This is only used when the isGroundFlattened property is true.

If the isGroundFlattened property is true, and a texture is being applied to the ground, the groundPosition property can be used to change both the offset and location of the texture on the ground. The lightAngle property controls the orientation of the texture.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.groundPosition

# Set the value of the property.
sceneSettings_var.groundPosition = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sceneSettings_var->groundPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sceneSettings_var->groundPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version May 2023


SceneSettings.groundRoughness Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets the roughness of the ground which controls the sharpness of the reflection. This is only used when the isGroundReflections property is true. This is a value between 0 and 1, where 0 is smooth and 1 is rough.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.groundRoughness

# Set the value of the property.
sceneSettings_var.groundRoughness = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->groundRoughness();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->groundRoughness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.isDepthOfFieldEnabled Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets if the depth of field option is enabled. When setting this to true, use the centerOfFocus and depthOfFieldBlur properties to specify how the depth of field is defined.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.isDepthOfFieldEnabled

# Set the value of the property.
sceneSettings_var.isDepthOfFieldEnabled = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
boolean propertyValue = sceneSettings_var->isDepthOfFieldEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sceneSettings_var->isDepthOfFieldEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


SceneSettings.isGroundDisplayed Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets if the ground plane is displayed. The plane allows shadows on the ground and reflections if the isGroundReflections property is true.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.isGroundDisplayed

# Set the value of the property.
sceneSettings_var.isGroundDisplayed = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
boolean propertyValue = sceneSettings_var->isGroundDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sceneSettings_var->isGroundDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


SceneSettings.isGroundFlattened Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets if the ground plane is "textured" where the environment image is mapped as a texture.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.isGroundFlattened

# Set the value of the property.
sceneSettings_var.isGroundFlattened = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
boolean propertyValue = sceneSettings_var->isGroundFlattened();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sceneSettings_var->isGroundFlattened(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


SceneSettings.isGroundReflections Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Gets and sets if objects are reflected on the ground plane.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.isGroundReflections

# Set the value of the property.
sceneSettings_var.isGroundReflections = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
boolean propertyValue = sceneSettings_var->isGroundReflections();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sceneSettings_var->isGroundReflections(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2023


SceneSettings.isValid Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.isValid
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
boolean propertyValue = sceneSettings_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2023


SceneSettings.lightAngle Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Specifies the rotation of the lighting. The angle is specified in Radians.

When the isGroundFlattened property is true, this also controls the angle of the texture that is applied to the ground. When the background is an environment, this controls the rotation of the environment relative to the model.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.lightAngle

# Set the value of the property.
sceneSettings_var.lightAngle = propertyValue
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
double propertyValue = sceneSettings_var->lightAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = sceneSettings_var->lightAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2023


SceneSettings.objectType Property

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.

# Get the value of the property.
propertyValue = sceneSettings_var.objectType
"sceneSettings_var" is a variable referencing a SceneSettings object.
#include <Fusion/Render/SceneSettings.h>

// Get the value of the property.
string propertyValue = sceneSettings_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2023


SceneSettings.restoreDefaults Method

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Changes all of the scene settings to the default values.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.
returnValue = sceneSettings_var.restoreDefaults()
"sceneSettings_var" is a variable referencing a SceneSettings object.

#include <Fusion/Render/SceneSettings.h>

returnValue = sceneSettings_var->restoreDefaults();

Return Value

Type | Description
boolean | Returns true if setting to the default settings was successful.

Version

Introduced in version May 2023


SceneSettings.saveAsDefaults Method

Parent Object: SceneSettings
Defined in namespace "adsk::fusion" and the header file is <Fusion/Render/SceneSettings.h>

Description

Saves all of the scene settings as the default settings for this Design.

Syntax

  • Python
  • C++
"sceneSettings_var" is a variable referencing a SceneSettings object.
returnValue = sceneSettings_var.saveAsDefaults()
"sceneSettings_var" is a variable referencing a SceneSettings object.

#include <Fusion/Render/SceneSettings.h>

returnValue = sceneSettings_var->saveAsDefaults();

Return Value

Type | Description
boolean | Returns true if saving the defaults was successful.

Version

Introduced in version May 2023


Script Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Object that represents a script or add-in.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
edit | Invokes the default edit behavior for this script or add-in.
run | Runs this script or add-in, if it's not already running.
stop | If this script or add-in is running, this method will stop it. The isRunning property can be used to determine if it is running. If the script or add-in is not running and this method is called, there is no effect.
unlink | Unlinks this script or add-in. This removes it from Fusion's list of linked scripts and add-ins, so it is no longer displayed in the dialog, and if it's an add-in, it will no longer run on startup. This is only valid for a script or add-in that is linked; the sourceLocation property returns LinkedScriptSourceLocation.

Properties

Name | Description
appStoreURL | For an add-in installed from the Autodesk App Store, this property returns the URL on the store for the page of this app. This property returns an empty string for all scripts and add-ins not installed from the App Store and if there is a problem determining the URL for an App Store app.
author | Returns the author information associated with this script or add-in.
description | Gets the description of this script or add-in.
folder | Gets the full path of the folder that contains this script or add-in.
helpFilename | Returns the filename of a local html file that serves as the help file for this script or add-in. This filename is defined in the manifest of the script or add-in using the "helpFilename" setting.
iconFilename | Returns the filename of the image file that can be used as the icon for this script or add-in. This filename is defined in the manifest of the script or add-in using the "iconFilename" setting.
id | Gets the ID of this script or add-in. This is typically a GUID and is assumed to be unique with respect to all other add-ins.
isAddIn | Gets if this Script object represents a script or an add-in. Returns true if it is an add-in.
isEditable | Indicates if this script or add-in is blocked from being edited by the user in the "Scripts and Add-Ins" dialog.
isFavorite | Gets and sets whether this script or add-in is a favorite of the user.
isInternal | Indicates if this is an internal script or add-in that is delivered with Fusion. Returns true if it is an internal script or add-in.
isRunning | Gets if this script or add-in is currently running.
isRunOnStartup | Gets and sets whether this add-in will automatically run when Fusion is started. This property is only valid when the isAddIn 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.
isVisible | Gets and sets whether the script or add-in is visible within the “Scripts and Add-Ins” dialog. By default, all scripts and add-ins are visible. Setting this to false will cause it to be hidden and unloaded if it is already running. Also, if it’s an add-in set to load on startup, it will no longer be loaded.
location | Gets which standard location this script is located.
manifestContent | Gets the full contents of the manifest file associated with this script or add-in. This is particularly useful if you have any custom information defined in the manifest. The manifest file uses JSON to format its content.
name | Gets the name of this script or add-in.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
programmingLanguage | Returns the programming language this script or add-in is written in.
targetOperatingSystem | Returns the operating systems this script or add-in is available for.
version | Returns the version information associated with this script or add-in.

Accessed From

Scripts.addExisting, Scripts.addNew, Scripts.item, Scripts.itemByPath, Scripts.itemsByName

Version

Introduced in version October 2023


Script.appStoreURL Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

For an add-in installed from the Autodesk App Store, this property returns the URL on the store for the page of this app. This property returns an empty string for all scripts and add-ins not installed from the App Store and if there is a problem determining the URL for an App Store app.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.appStoreURL
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->appStoreURL();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


Script.author Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the author information associated with this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.author
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->author();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.classType Method

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Script.classType()
This is a static method.

#include <Core/Application/Script.h>

returnValue = adsk::core::Script::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


Script.description Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets the description of this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.description
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.edit Method

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Invokes the default edit behavior for this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.
returnValue = script_var.edit()
"script_var" is a variable referencing a Script object.

#include <Core/Application/Script.h>

returnValue = script_var->edit();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version October 2023


Script.folder Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets the full path of the folder that contains this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.folder
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->folder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.helpFilename Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the filename of a local html file that serves as the help file for this script or add-in. This filename is defined in the manifest of the script or add-in using the "helpFilename" setting.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.helpFilename
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->helpFilename();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


Script.iconFilename Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the filename of the image file that can be used as the icon for this script or add-in. This filename is defined in the manifest of the script or add-in using the "iconFilename" setting.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.iconFilename
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->iconFilename();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


Script.id Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets the ID of this script or add-in. This is typically a GUID and is assumed to be unique with respect to all other add-ins.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.id
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.isAddIn Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets if this Script object represents a script or an add-in. Returns true if it is an add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isAddIn
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isAddIn();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Script.isEditable Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Indicates if this script or add-in is blocked from being edited by the user in the "Scripts and Add-Ins" dialog.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isEditable
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isEditable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Script.isFavorite Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets and sets whether this script or add-in is a favorite of the user.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isFavorite

# Set the value of the property.
script_var.isFavorite = propertyValue
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isFavorite();

// Set the value of the property, where value_var is a boolean.
bool returnValue = script_var->isFavorite(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


Script.isInternal Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Indicates if this is an internal script or add-in that is delivered with Fusion. Returns true if it is an internal script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isInternal
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isInternal();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Script.isRunning Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets if this script or add-in is currently running.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isRunning
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isRunning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Script.isRunOnStartup Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets and sets whether this add-in will automatically run when Fusion is started. This property is only valid when the isAddIn property returns true.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isRunOnStartup

# Set the value of the property.
script_var.isRunOnStartup = propertyValue
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isRunOnStartup();

// Set the value of the property, where value_var is a boolean.
bool returnValue = script_var->isRunOnStartup(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


Script.isValid Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isValid
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Script.isVisible Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets and sets whether the script or add-in is visible within the “Scripts and Add-Ins” dialog. By default, all scripts and add-ins are visible. Setting this to false will cause it to be hidden and unloaded if it is already running. Also, if it’s an add-in set to load on startup, it will no longer be loaded.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.isVisible

# Set the value of the property.
script_var.isVisible = propertyValue
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
boolean propertyValue = script_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = script_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


Script.location Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets which standard location this script is located.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.location
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
ScriptSourceLocations propertyValue = script_var->location();

Property Value

This is a read only property whose value is a ScriptSourceLocations.

Version

Introduced in version January 2025


Script.manifestContent Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets the full contents of the manifest file associated with this script or add-in. This is particularly useful if you have any custom information defined in the manifest. The manifest file uses JSON to format its content.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.manifestContent
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->manifestContent();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.name Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Gets the name of this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.name
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.objectType Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.objectType
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


Script.programmingLanguage Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the programming language this script or add-in is written in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.programmingLanguage
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
ProgrammingLanguages propertyValue = script_var->programmingLanguage();

Property Value

This is a read only property whose value is a ProgrammingLanguages.

Version

Introduced in version October 2023


Script.run Method

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Runs this script or add-in, if it's not already running.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.
# Uses no optional arguments.
returnValue = script_var.run()

# Uses optional arguments.
returnValue = script_var.run(waitForFinish)
"script_var" is a variable referencing a Script object.

#include <Core/Application/Script.h>

// Uses no optional arguments.
returnValue = script_var->run();

// Uses optional arguments.
returnValue = script_var->run(waitForFinish);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
waitForFinish | boolean | Specifies if call will wait until the script or add-in has finished running. For add-ins, this should always be false, because they typically continue to run for the entire Fusion session. For scripts, there are cases where you might want to set this to true, where you need to wait for the script to finish because you want to do something with whatever it creates. Typically, this should be false, so it starts the script and immediately returns. This is an optional argument whose default value is False.

Version

Introduced in version October 2023


Script.stop Method

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

If this script or add-in is running, this method will stop it. The isRunning property can be used to determine if it is running. If the script or add-in is not running and this method is called, there is no effect.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.
returnValue = script_var.stop()
"script_var" is a variable referencing a Script object.

#include <Core/Application/Script.h>

returnValue = script_var->stop();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version October 2023


Script.targetOperatingSystem Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the operating systems this script or add-in is available for.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.targetOperatingSystem
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
OperatingSystems propertyValue = script_var->targetOperatingSystem();

Property Value

This is a read only property whose value is an OperatingSystems.

Version

Introduced in version October 2023


Script.unlink Method

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Unlinks this script or add-in. This removes it from Fusion's list of linked scripts and add-ins, so it is no longer displayed in the dialog, and if it's an add-in, it will no longer run on startup.

This is only valid for a script or add-in that is linked; the sourceLocation property returns LinkedScriptSourceLocation.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.
returnValue = script_var.unlink()
"script_var" is a variable referencing a Script object.

#include <Core/Application/Script.h>

returnValue = script_var->unlink();

Return Value

Type | Description
boolean | Returns true if the unlink was successful.

Version

Introduced in version January 2025


Script.version Property

Parent Object: Script
Defined in namespace "adsk::core" and the header file is <Core/Application/Script.h>

Description

Returns the version information associated with this script or add-in.

Syntax

  • Python
  • C++
"script_var" is a variable referencing a Script object.

# Get the value of the property.
propertyValue = script_var.version
"script_var" is a variable referencing a Script object.
#include <Core/Application/Script.h>

// Get the value of the property.
string propertyValue = script_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


ScriptInput Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Used when creating a new script or add-in to specify all of the required and optional settings needed. This is created using the createScriptInput method on the Scripts object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
author | The author of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.
description | The description of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.
isAddIn | Specifies if a script or add-in is to be created. A value of true indicates an add-in will be created.
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 script or add-in to create. This name must be unique with respect to the other scripts and add-ins in the folder specified by the targetFolder property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
programmingLanguage | Gets and sets which programming language the new script or add-in will use.
runOnStartup | If this Script represents an add-in and isAddIn is True, this specifies if the add-in should be automatically started when Fusion starts up.
targetFolder | The full path to the folder where the script or add-in will be created. By default, this is an empty string which uses the default folder specified by the "Default Path for Scripts and Add-Ins" preference. Specifying a path overrides the default and will create the script or add-in in the specified location. No "Scripts" or "AddIns" sub-folder is created.
targetOperatingSystem | Specifies the operating systems this script or add-in will be displayed in the "Scripts and Add-Ins" dialog and where it will be automatically run on startup, if that option is specified. Defaults to WindowsAndMacOperatingSystem
version | The version of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.

Accessed From

Scripts.createScriptInput

Version

Introduced in version October 2023


ScriptInput.author Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

The author of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.author

# Set the value of the property.
scriptInput_var.author = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->author();

// Set the value of the property, where value_var is a string.
bool returnValue = scriptInput_var->author(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


ScriptInput.classType Method

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ScriptInput.classType()
This is a static method.

#include <Core/Application/ScriptInput.h>

returnValue = adsk::core::ScriptInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


ScriptInput.description Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

The description of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.description

# Set the value of the property.
scriptInput_var.description = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = scriptInput_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


ScriptInput.isAddIn Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Specifies if a script or add-in is to be created. A value of true indicates an add-in will be created.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.isAddIn

# Set the value of the property.
scriptInput_var.isAddIn = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
boolean propertyValue = scriptInput_var->isAddIn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = scriptInput_var->isAddIn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


ScriptInput.isValid Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.isValid
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
boolean propertyValue = scriptInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


ScriptInput.name Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Gets and sets the name of the script or add-in to create. This name must be unique with respect to the other scripts and add-ins in the folder specified by the targetFolder property.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.name

# Set the value of the property.
scriptInput_var.name = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = scriptInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


ScriptInput.objectType Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.objectType
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


ScriptInput.programmingLanguage Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Gets and sets which programming language the new script or add-in will use.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.programmingLanguage

# Set the value of the property.
scriptInput_var.programmingLanguage = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
ProgrammingLanguages propertyValue = scriptInput_var->programmingLanguage();

// Set the value of the property, where value_var is a ProgrammingLanguages.
bool returnValue = scriptInput_var->programmingLanguage(value_var);

Property Value

This is a read/write property whose value is a ProgrammingLanguages.

Version

Introduced in version October 2023


ScriptInput.runOnStartup Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

If this Script represents an add-in and isAddIn is True, this specifies if the add-in should be automatically started when Fusion starts up.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.runOnStartup

# Set the value of the property.
scriptInput_var.runOnStartup = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
boolean propertyValue = scriptInput_var->runOnStartup();

// Set the value of the property, where value_var is a boolean.
bool returnValue = scriptInput_var->runOnStartup(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2023


ScriptInput.targetFolder Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

The full path to the folder where the script or add-in will be created. By default, this is an empty string which uses the default folder specified by the "Default Path for Scripts and Add-Ins" preference. Specifying a path overrides the default and will create the script or add-in in the specified location. No "Scripts" or "AddIns" sub-folder is created.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.targetFolder

# Set the value of the property.
scriptInput_var.targetFolder = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->targetFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = scriptInput_var->targetFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


ScriptInput.targetOperatingSystem Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

Specifies the operating systems this script or add-in will be displayed in the "Scripts and Add-Ins" dialog and where it will be automatically run on startup, if that option is specified. Defaults to WindowsAndMacOperatingSystem

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.targetOperatingSystem

# Set the value of the property.
scriptInput_var.targetOperatingSystem = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
OperatingSystems propertyValue = scriptInput_var->targetOperatingSystem();

// Set the value of the property, where value_var is an OperatingSystems.
bool returnValue = scriptInput_var->targetOperatingSystem(value_var);

Property Value

This is a read/write property whose value is an OperatingSystems.

Version

Introduced in version October 2023


ScriptInput.version Property

Parent Object: ScriptInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ScriptInput.h>

Description

The version of the add-in that is displayed in the "Scripts and Add-Ins" dialog. This defaults to an empty string.

Syntax

  • Python
  • C++
"scriptInput_var" is a variable referencing a ScriptInput object.

# Get the value of the property.
propertyValue = scriptInput_var.version

# Set the value of the property.
scriptInput_var.version = propertyValue
"scriptInput_var" is a variable referencing a ScriptInput object.
#include <Core/Application/ScriptInput.h>

// Get the value of the property.
string propertyValue = scriptInput_var->version();

// Set the value of the property, where value_var is a string.
bool returnValue = scriptInput_var->version(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2023


Scripts Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

API object that provides equivalent functionality of the "Scripts and Add-Ins" dialog. Provides access to the scripts and add-ins that Fusion is aware of. It also supports loading other unknown scripts and add-ins, and creating new scripts and add-ins.

Methods

Name | Description
addExisting | Fusion looks in specific folders for scripts and add-ins, but you can manually add other scripts and add-ins to the list of known scripts and add-ins so they will be listed in the "Scripts and Add-ins" dialog. This method does that.
addNew | Creates a new script or add-in. This uses the same internal template that's used when creating a new script or add-in using the "Scripts and Add-Ins" dialog. The provided ScriptInput object defines the information needed to create a new script or add-in.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createScriptInput | Creates a new ScriptInput object. Logically, this object is equivalent to the dialog that is shown when you click the "Create" button in the "Scripts and Add-Ins" command dialog. It collects the information needed to create a new script or add-in. To create the script or add-in, call the addNew method, passing in the ScriptInput object.
item | Function that returns the specified script or add-in using an index into the collection.
itemByPath | Function that returns the script that is located in the specified folder.
itemsByName | Function that returns an array of scripts that have the specified name. In most cases this will return an array containing a single script, but it's possible to have more than one script with the same name in the case where the scripts are in different folders.

Properties

Name | Description
count | Returns the number of scripts and add-ins.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Application.scripts

Version

Introduced in version October 2023


Scripts.addExisting Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Fusion looks in specific folders for scripts and add-ins, but you can manually add other scripts and add-ins to the list of known scripts and add-ins so they will be listed in the "Scripts and Add-ins" dialog. This method does that.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.addExisting(scriptFolderPath)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->addExisting(scriptFolderPath);

Return Value

Type | Description
Script | Returns the Script object that represents the script or add-in just added. Returns null in the case of failure.

Parameters

Name | Type | Description
scriptFolderPath | string | The full path to the folder that contains the script or add-in.

Version

Introduced in version October 2023


Scripts.addNew Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Creates a new script or add-in. This uses the same internal template that's used when creating a new script or add-in using the "Scripts and Add-Ins" dialog. The provided ScriptInput object defines the information needed to create a new script or add-in.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.addNew(input)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->addNew(input);

Return Value

Type | Description
Script | Returns the newly created Script object.

Parameters

Name | Type | Description
input | ScriptInput | A ScriptInput object which defines the required information to create a new script or add-in. It is created using the createNewScriptInput method.

Version

Introduced in version October 2023


Scripts.classType Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Scripts.classType()
This is a static method.

#include <Core/Application/Scripts.h>

returnValue = adsk::core::Scripts::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2023


Scripts.count Property

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Returns the number of scripts and add-ins.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.

# Get the value of the property.
propertyValue = scripts_var.count
"scripts_var" is a variable referencing a Scripts object.
#include <Core/Application/Scripts.h>

// Get the value of the property.
uinteger propertyValue = scripts_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version October 2023


Scripts.createScriptInput Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Creates a new ScriptInput object. Logically, this object is equivalent to the dialog that is shown when you click the "Create" button in the "Scripts and Add-Ins" command dialog. It collects the information needed to create a new script or add-in. To create the script or add-in, call the addNew method, passing in the ScriptInput object.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.createScriptInput(name, programmingLanguage, isAddIn)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->createScriptInput(name, programmingLanguage, isAddIn);

Return Value

Type | Description
ScriptInput | Returns a ScriptInput object or null in the case of failure.

Parameters

Name | Type | Description
name | string | The name of the script or add-in to create. By default, it will be created in the folder specified by the "Default Path for Scripts and Add-Ins" preference, but a different path can be specified using the returned ScriptInput object. Regardless of where it is created, the name must be unique with respect to the other scripts and add-ins in that folder. If it's not unique the creation of the script or add-in will fail.
programmingLanguage | ProgrammingLanguages | The programming language to use for the new script or add-in.
isAddIn | boolean | Specifies if a script or add-in is to be created. If true, an add-in is created.

Version

Introduced in version October 2023


Scripts.isValid Property

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.

# Get the value of the property.
propertyValue = scripts_var.isValid
"scripts_var" is a variable referencing a Scripts object.
#include <Core/Application/Scripts.h>

// Get the value of the property.
boolean propertyValue = scripts_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2023


Scripts.item Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Function that returns the specified script or add-in using an index into the collection.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.item(index)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->item(index);

Return Value

Type | Description
Script | 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 October 2023


Scripts.itemByPath Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Function that returns the script that is located in the specified folder.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.itemByPath(folderPath)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->itemByPath(folderPath);

Return Value

Type | Description
Script | Returns the specified script or null if there isn't a script at the specified path.

Parameters

Name | Type | Description
folderPath | string | The full path to the folder that contains the script. This does not include the name of the script, but only the path. For example "C:\Scripts\MyScript" is valid where "C:\Scripts\MyScripts\MyScript.py" is not.

Version

Introduced in version July 2024


Scripts.itemsByName Method

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

Function that returns an array of scripts that have the specified name. In most cases this will return an array containing a single script, but it's possible to have more than one script with the same name in the case where the scripts are in different folders.

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.
returnValue = scripts_var.itemsByName(name)
"scripts_var" is a variable referencing a Scripts object.

#include <Core/Application/Scripts.h>

returnValue = scripts_var->itemsByName(name);

Return Value

Type | Description
Script[] | Returns the scripts with the specified name or an empty array if there aren't any scripts with that name.

Parameters

Name | Type | Description
name | string | The script name to search for.

Version

Introduced in version July 2024


Scripts.objectType Property

Parent Object: Scripts
Defined in namespace "adsk::core" and the header file is <Core/Application/Scripts.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"scripts_var" is a variable referencing a Scripts object.

# Get the value of the property.
propertyValue = scripts_var.objectType
"scripts_var" is a variable referencing a Scripts object.
#include <Core/Application/Scripts.h>

// Get the value of the property.
string propertyValue = scripts_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2023


SectionAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Provides access to any section analyses results in the design and supports the ability to create new sections.

Methods

Name | Description
add | Creates a new Section Analysis.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 SectionAnalysisInput object to use when creating a new Section Analysis. A SectionAnalysisInput object is the API equivalent of the command dialog that contains the inputs to create a section analysis. Use this object to define the settings you need and then pass this into the add method to create the section analysis.
item | A method that returns the specified SectionAnalysis object using an index into the collection.
itemByName | A method that returns the specified SectionAnalysis object using the name of the analysis as displayed in the browser.

Properties

Name | Description
count | Returns the number of SectionAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.sectionAnalyses

Version

Introduced in version January 2023


SectionAnalyses.add Method

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Creates a new Section Analysis.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
returnValue = sectionAnalyses_var.add(input)
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

#include <Fusion/Fusion/SectionAnalyses.h>

returnValue = sectionAnalyses_var->add(input);

Return Value

Type | Description
SectionAnalysis | Returns the new SectionAnalysis object if successful.

Parameters

Name | Type | Description
input | SectionAnalysisInput | A SectionAnalysisInput object that defines how the section analysis should be created. Use the createInput method to create a new SectionAnalysisInput object.

Version

Introduced in version April 2023


SectionAnalyses.classType Method

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SectionAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/SectionAnalyses.h>

returnValue = adsk::fusion::SectionAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


SectionAnalyses.count Property

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Returns the number of SectionAnalysis objects in the collection.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

# Get the value of the property.
propertyValue = sectionAnalyses_var.count
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
#include <Fusion/Fusion/SectionAnalyses.h>

// Get the value of the property.
uinteger propertyValue = sectionAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


SectionAnalyses.createInput Method

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Creates a new SectionAnalysisInput object to use when creating a new Section Analysis. A SectionAnalysisInput object is the API equivalent of the command dialog that contains the inputs to create a section analysis. Use this object to define the settings you need and then pass this into the add method to create the section analysis.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
returnValue = sectionAnalyses_var.createInput(cutPlaneEntity, distance)
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

#include <Fusion/Fusion/SectionAnalyses.h>

returnValue = sectionAnalyses_var->createInput(cutPlaneEntity, distance);

Return Value

Type | Description
SectionAnalysisInput | Returns a SectionAnalysisInput object if successful.

Parameters

Name | Type | Description
cutPlaneEntity | Base | The planar entity used to define the cut plane and can be either a planar BRepFace or a ConstructionPlane object.
distance | double | The offset distance of the section from the cut plane. A positive value will offset in the positive normal direction of the cut plane entity. The value is in centimeters. This value is used to create a transformation matrix that defines the specified offset.

Version

Introduced in version April 2023


SectionAnalyses.isValid Property

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

# Get the value of the property.
propertyValue = sectionAnalyses_var.isValid
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
#include <Fusion/Fusion/SectionAnalyses.h>

// Get the value of the property.
boolean propertyValue = sectionAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalyses.item Method

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

A method that returns the specified SectionAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
returnValue = sectionAnalyses_var.item(index)
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

#include <Fusion/Fusion/SectionAnalyses.h>

returnValue = sectionAnalyses_var->item(index);

Return Value

Type | Description
SectionAnalysis | 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 2023


SectionAnalyses.itemByName Method

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

A method that returns the specified SectionAnalysis object using the name of the analysis as displayed in the browser.

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
returnValue = sectionAnalyses_var.itemByName(name)
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

#include <Fusion/Fusion/SectionAnalyses.h>

returnValue = sectionAnalyses_var->itemByName(name);

Return Value

Type | Description
SectionAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the SectionAnalysis object as displayed in the browser.

Version

Introduced in version January 2023


SectionAnalyses.objectType Property

Parent Object: SectionAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.

# Get the value of the property.
propertyValue = sectionAnalyses_var.objectType
"sectionAnalyses_var" is a variable referencing a SectionAnalyses object.
#include <Fusion/Fusion/SectionAnalyses.h>

// Get the value of the property.
string propertyValue = sectionAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


SectionAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Represents any existing Section Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.
flip | A property that flips which side of the part is cut away by the section. This is a convenience method that results in flipping the Z axis of the transform while maintaining a valid rectangular coordinate system. You can directly manipulate the transform matrix to have the same effect.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
cutPlane | A property that gets and sets the planar entity used to define the cut plane and can be either a planar BRepFace or a ConstructionPlane object.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
initialPosition | Returns the matrix that describes the initial position and orientation of the specified cut plane entity. Any additional offsets or rotations are defined by a transformation matrix that is applied to this initial position. That matrix can be obtained and set using the transform property.
isHatchShown | A property that gets and sets if a hatch pattern should be shown on the section.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sectionColor | A property that gets and sets the color of the section. A value of null indicates the component color should be used. The opacity value of the color is ignored.
transform | The initial position of the section plane is defined by the specified cut plane entity. Any offsets or rotations are defined by a transformation matrix that is applied to the initial position. This property allows you to get and set the transformation matrix.

Accessed From

SectionAnalyses.add, SectionAnalyses.item, SectionAnalyses.itemByName

Version

Introduced in version January 2023


SectionAnalysis.attributes Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.attributes
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sectionAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


SectionAnalysis.classType Method

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SectionAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/SectionAnalysis.h>

returnValue = adsk::fusion::SectionAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


SectionAnalysis.cutPlane Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that gets and sets the planar entity used to define the cut plane and can be either a planar BRepFace or a ConstructionPlane object.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.cutPlane

# Set the value of the property.
sectionAnalysis_var.cutPlane = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
Ptr<Base> propertyValue = sectionAnalysis_var->cutPlane();

// Set the value of the property, where value_var is a Base.
bool returnValue = sectionAnalysis_var->cutPlane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version April 2023


SectionAnalysis.deleteMe Method

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
returnValue = sectionAnalysis_var.deleteMe()
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

#include <Fusion/Fusion/SectionAnalysis.h>

returnValue = sectionAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


SectionAnalysis.entityToken Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.entityToken
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
string propertyValue = sectionAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


SectionAnalysis.flip Method

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that flips which side of the part is cut away by the section. This is a convenience method that results in flipping the Z axis of the transform while maintaining a valid rectangular coordinate system. You can directly manipulate the transform matrix to have the same effect.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
returnValue = sectionAnalysis_var.flip()
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

#include <Fusion/Fusion/SectionAnalysis.h>

returnValue = sectionAnalysis_var->flip();

Version

Introduced in version April 2023


SectionAnalysis.initialPosition Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Returns the matrix that describes the initial position and orientation of the specified cut plane entity. Any additional offsets or rotations are defined by a transformation matrix that is applied to this initial position. That matrix can be obtained and set using the transform property.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.initialPosition
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sectionAnalysis_var->initialPosition();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version April 2023


SectionAnalysis.isHatchShown Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that gets and sets if a hatch pattern should be shown on the section.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.isHatchShown

# Set the value of the property.
sectionAnalysis_var.isHatchShown = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysis_var->isHatchShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sectionAnalysis_var->isHatchShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


SectionAnalysis.isLightBulbOn Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.isLightBulbOn

# Set the value of the property.
sectionAnalysis_var.isLightBulbOn = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sectionAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalysis.isValid Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.isValid
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalysis.isVisible Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.isVisible
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalysis.name Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.name

# Set the value of the property.
sectionAnalysis_var.name = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
string propertyValue = sectionAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = sectionAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


SectionAnalysis.objectType Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.objectType
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
string propertyValue = sectionAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


SectionAnalysis.sectionColor Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

A property that gets and sets the color of the section. A value of null indicates the component color should be used. The opacity value of the color is ignored.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.sectionColor

# Set the value of the property.
sectionAnalysis_var.sectionColor = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
Ptr<Color> propertyValue = sectionAnalysis_var->sectionColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = sectionAnalysis_var->sectionColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version April 2023


SectionAnalysis.transform Property

Parent Object: SectionAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysis.h>

Description

The initial position of the section plane is defined by the specified cut plane entity. Any offsets or rotations are defined by a transformation matrix that is applied to the initial position. This property allows you to get and set the transformation matrix.

Syntax

  • Python
  • C++
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.

# Get the value of the property.
propertyValue = sectionAnalysis_var.transform

# Set the value of the property.
sectionAnalysis_var.transform = propertyValue
"sectionAnalysis_var" is a variable referencing a SectionAnalysis object.
#include <Fusion/Fusion/SectionAnalysis.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sectionAnalysis_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = sectionAnalysis_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version April 2023


SectionAnalysisInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

Provides access the all of the settings available when creating a section analysis. This object is the API equivalent of the command dialog that contains the inputs to create a section analysis. Use this object to define the settings you need and then pass this into the add method to create the section analysis.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
flip | A property that flips which side of the part is cut away by the section. This is a convenience method that results in flipping the Z axis of the transform while maintaining a valid rectangular coordinate system. You can directly manipulate the transform matrix to have the same effect.

Properties

Name | Description
cutPlaneEntity | A property that gets and sets the planar entity used to define the cut plane and can be either a planar BRepFace or a ConstructionPlane object.
initialPosition | Returns the matrix that describes the initial position and orientation of the specified cut plane entity. Any additional offsets or rotations are defined by a transformation matrix that is applied to this initial position matrix. That matrix is obtained and set using the transform property.
isHatchShown | A property that gets and sets if a hatch pattern should be shown on the section. This property defaults to true when the input is created.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sectionColor | A property that gets and sets the color of the section. This property defaults to null, indicating that the component color should be used. The opacity value of the color is ignored.
transform | The initial position of the section plane is defined by the specified cut plane entity. Any offsets or rotations are defined by a transformation matrix that is applied to the initial position. This property allows you to get and set the transformation matrix.

Accessed From

SectionAnalyses.createInput

Version

Introduced in version January 2023


SectionAnalysisInput.classType Method

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SectionAnalysisInput.classType()
This is a static method.

#include <Fusion/Fusion/SectionAnalysisInput.h>

returnValue = adsk::fusion::SectionAnalysisInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


SectionAnalysisInput.cutPlaneEntity Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

A property that gets and sets the planar entity used to define the cut plane and can be either a planar BRepFace or a ConstructionPlane object.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.cutPlaneEntity

# Set the value of the property.
sectionAnalysisInput_var.cutPlaneEntity = propertyValue
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = sectionAnalysisInput_var->cutPlaneEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = sectionAnalysisInput_var->cutPlaneEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2023


SectionAnalysisInput.flip Method

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

A property that flips which side of the part is cut away by the section. This is a convenience method that results in flipping the Z axis of the transform while maintaining a valid rectangular coordinate system. You can directly manipulate the transform matrix to have the same effect.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
returnValue = sectionAnalysisInput_var.flip()
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

#include <Fusion/Fusion/SectionAnalysisInput.h>

returnValue = sectionAnalysisInput_var->flip();

Version

Introduced in version January 2023


SectionAnalysisInput.initialPosition Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

Returns the matrix that describes the initial position and orientation of the specified cut plane entity. Any additional offsets or rotations are defined by a transformation matrix that is applied to this initial position matrix. That matrix is obtained and set using the transform property.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.initialPosition
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sectionAnalysisInput_var->initialPosition();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version January 2023


SectionAnalysisInput.isHatchShown Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

A property that gets and sets if a hatch pattern should be shown on the section. This property defaults to true when the input is created.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.isHatchShown

# Set the value of the property.
sectionAnalysisInput_var.isHatchShown = propertyValue
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysisInput_var->isHatchShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sectionAnalysisInput_var->isHatchShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalysisInput.isValid Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.isValid
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
boolean propertyValue = sectionAnalysisInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


SectionAnalysisInput.objectType Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.objectType
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
string propertyValue = sectionAnalysisInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


SectionAnalysisInput.sectionColor Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

A property that gets and sets the color of the section. This property defaults to null, indicating that the component color should be used. The opacity value of the color is ignored.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.sectionColor

# Set the value of the property.
sectionAnalysisInput_var.sectionColor = propertyValue
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
Ptr<Color> propertyValue = sectionAnalysisInput_var->sectionColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = sectionAnalysisInput_var->sectionColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version January 2023


SectionAnalysisInput.transform Property

Parent Object: SectionAnalysisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SectionAnalysisInput.h>

Description

The initial position of the section plane is defined by the specified cut plane entity. Any offsets or rotations are defined by a transformation matrix that is applied to the initial position. This property allows you to get and set the transformation matrix.

Syntax

  • Python
  • C++
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.

# Get the value of the property.
propertyValue = sectionAnalysisInput_var.transform

# Set the value of the property.
sectionAnalysisInput_var.transform = propertyValue
"sectionAnalysisInput_var" is a variable referencing a SectionAnalysisInput object.
#include <Fusion/Fusion/SectionAnalysisInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sectionAnalysisInput_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = sectionAnalysisInput_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version January 2023


Selection Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

Provides access to a selection of an entity in the user interface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Gets the selection point on the object.

Accessed From

ActiveSelectionEventArgs.currentSelection, SelectionCommandInput.selection, SelectionEventArgs.selection, Selections.asArray, Selections.item, UserInterface.selectEntity

Version

Introduced in version August 2014


Selection.classType Method

Parent Object: Selection
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

Gets the selected entity.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selection.h>

Description

Gets the selection point on the object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Provides a command input to get a selection from the user.

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.
deleteMe | Deletes this Command input.
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.

Setting hasFocus to True for a selection input whose isVisible property is false will fail.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.
isUseCurrentSelections Preview Determines if any selections the user has made before starting the command can be used by the command's selection inputs. The default is true, which means the active selections will be added to the first selection input whose selection filter allows for that entity type. For example, if you have two selection inputs that have filters to select any number of faces and there are four faces selected when the command is started, those four faces will be selected by the selection input. If there's another selection input for the same command that has the filter set to select sketch curves, and there are faces and sketch curves selected when you start the command, the faces will be selected by the selection input filtering for faces, and the sketch curves will be selected by the selection input filtering for sketch curves.

You can programmatically control which selected entities will be added to the selection inputs by using the preSelect event of the command. The preSelect event will fire for each entity that was already selected before it's added to the selection input, and you can use it to control if it will be added to the selection input.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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.
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Adds an additional filter to the existing filter list.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Clears the current selection so no entities are in the selection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Clears the list of selection filters.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets or sets the tooltip shown next to the cursor.

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.deleteMe Method

Parent Object: SelectionCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.deleteMe()
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


SelectionCommandInput.getSelectionLimits Method

Parent Object: SelectionCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Get the limits currently defined for this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

Setting hasFocus to True for a selection input whose isVisible property is false will fail.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

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.isUseCurrentSelections Property

Parent Object: SelectionCommandInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Determines if any selections the user has made before starting the command can be used by the command's selection inputs. The default is true, which means the active selections will be added to the first selection input whose selection filter allows for that entity type. For example, if you have two selection inputs that have filters to select any number of faces and there are four faces selected when the command is started, those four faces will be selected by the selection input. If there's another selection input for the same command that has the filter set to select sketch curves, and there are faces and sketch curves selected when you start the command, the faces will be selected by the selection input filtering for faces, and the sketch curves will be selected by the selection input filtering for sketch curves.

You can programmatically control which selected entities will be added to the selection inputs by using the preSelect event of the command. The preSelect event will fire for each entity that was already selected before it's added to the selection input, and you can use it to control if it will be added to the selection input.

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.isUseCurrentSelections

# Set the value of the property.
selectionCommandInput_var.isUseCurrentSelections = 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->isUseCurrentSelections();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionCommandInput_var->isUseCurrentSelections(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2024


SelectionCommandInput.isValid Property

Parent Object: SelectionCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Returns the selection at the specified index.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets the current number of selections the user has made for this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Gets or sets the list of selection filters.

Remarks

The valid list of selection filters can be found here: Selection Filters.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

Description

Defines the limits for the number of selections associated with this input. A maximum value of 0 indicates that there is no maximum.

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 minimum, 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

An event endpoint that supports the connection to client implemented SelectionEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.preSelectStart, Command.select, Command.selectionEvent, Command.unselect

Version

Introduced in version August 2014


SelectionEvent.activeInput Property

Parent Object: SelectionEvent
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

Adds an event handler to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

Provides a set of arguments from a firing SelectionEvent to a SelectionEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 entities 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
selection | Gets the entity that is valid for selection.

Version

Introduced in version August 2014


SelectionEventArgs.activeInput Property

Parent Object: SelectionEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

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 entities 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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventArgs.h>

Description

Gets the entity that is valid for selection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"selectionEventHandler_var" is a variable referencing a SelectionEventHandler object.
returnValue = selectionEventHandler_var.notify(eventArgs)
"selectionEventHandler_var" is a variable referencing a SelectionEventHandler object.

#include <Core/UserInterface/SelectionEventHandler.h>

returnValue = 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


SelectionFilters Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionFilters.h>

Description

Provides access to the various filter settings for selections.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version May 2024


SelectionFilters.classType Method

Parent Object: SelectionFilters
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionFilters.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionFilters.classType()
This is a static method.

#include <Core/UserInterface/SelectionFilters.h>

returnValue = adsk::core::SelectionFilters::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


SelectionFilters.isValid Property

Parent Object: SelectionFilters
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionFilters.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"selectionFilters_var" is a variable referencing a SelectionFilters object.

# Get the value of the property.
propertyValue = selectionFilters_var.isValid
"selectionFilters_var" is a variable referencing a SelectionFilters object.
#include <Core/UserInterface/SelectionFilters.h>

// Get the value of the property.
boolean propertyValue = selectionFilters_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


SelectionFilters.objectType Property

Parent Object: SelectionFilters
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SelectionFilters.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"selectionFilters_var" is a variable referencing a SelectionFilters object.

# Get the value of the property.
propertyValue = selectionFilters_var.objectType
"selectionFilters_var" is a variable referencing a SelectionFilters object.
#include <Core/UserInterface/SelectionFilters.h>

// Get the value of the property.
string propertyValue = selectionFilters_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


Selections Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Provides access to and control over the set of selected entities in the user interface.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

UserInterface.activeSelections

Version

Introduced in version August 2014


Selections.add Method

Parent Object: Selections
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Adds the entity to the set of currently selected entities. The user will see the entity become selected in the user interface.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Gets or sets all entities currently selected.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Clears the selection set so no entities are currently selected.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Gets the number of entities currently selected.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Returns the specified selection using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Removes the selections that are associated with the specified entity from the set of selected entities.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Removes an item from the set of selected entities.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Selections.h>

Description

Removes the specified selection from the set of selected entities.

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


SelectionSet Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

The SelectionSet object represents a Selection Set as seen in the user interface. Using a SelectionSet, you can access all the associated data, activate, and delete a selection set.

In the user interface, selection sets are created by selecting geometry and then running the "Create Selection Set" command from the context menu. All existing selection sets are shown in a "Selection Sets" folder in the browser where they can be activated and deleted.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 SelectionSet object.
select | Causes the entities in this SelectionSet object to be the active selection.

Properties

Name | Description
entities Gets and sets the entities in the selection set. Setting this property is the equivalent of using the "Update" option for a selection set in the user-interface.

Setting the entities can fail in the case where you provide an entity that is not valid for selection. All entities must be in the context of the root component. This means if the entity isn't directly owned by the root component, it must be a proxy.
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 SelectionSet object. If a name is assigned that is already used, Fusion will append a counter to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SelectionSets.add, SelectionSets.item, SelectionSets.itemByName

Version

Introduced in version May 2022


SelectionSet.classType Method

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionSet.classType()
This is a static method.

#include <Core/Application/SelectionSet.h>

returnValue = adsk::core::SelectionSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


SelectionSet.deleteMe Method

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Deletes this SelectionSet object.

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.
returnValue = selectionSet_var.deleteMe()
"selectionSet_var" is a variable referencing a SelectionSet object.

#include <Core/Application/SelectionSet.h>

returnValue = selectionSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version May 2022


SelectionSet.entities Property

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Gets and sets the entities in the selection set. Setting this property is the equivalent of using the "Update" option for a selection set in the user-interface.

Setting the entities can fail in the case where you provide an entity that is not valid for selection. All entities must be in the context of the root component. This means if the entity isn't directly owned by the root component, it must be a proxy.

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.

# Get the value of the property.
propertyValue = selectionSet_var.entities

# Set the value of the property.
selectionSet_var.entities = propertyValue
"selectionSet_var" is a variable referencing a SelectionSet object.
#include <Core/Application/SelectionSet.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = selectionSet_var->entities();

// Set the value of the property, where value_var is a Base.
bool returnValue = selectionSet_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version May 2022


SelectionSet.isValid Property

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.

# Get the value of the property.
propertyValue = selectionSet_var.isValid
"selectionSet_var" is a variable referencing a SelectionSet object.
#include <Core/Application/SelectionSet.h>

// Get the value of the property.
boolean propertyValue = selectionSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


SelectionSet.name Property

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Gets and sets the name of the SelectionSet object. If a name is assigned that is already used, Fusion will append a counter to the name to make it unique.

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.

# Get the value of the property.
propertyValue = selectionSet_var.name

# Set the value of the property.
selectionSet_var.name = propertyValue
"selectionSet_var" is a variable referencing a SelectionSet object.
#include <Core/Application/SelectionSet.h>

// Get the value of the property.
string propertyValue = selectionSet_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = selectionSet_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


SelectionSet.objectType Property

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.

# Get the value of the property.
propertyValue = selectionSet_var.objectType
"selectionSet_var" is a variable referencing a SelectionSet object.
#include <Core/Application/SelectionSet.h>

// Get the value of the property.
string propertyValue = selectionSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


SelectionSet.select Method

Parent Object: SelectionSet
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSet.h>

Description

Causes the entities in this SelectionSet object to be the active selection.

Syntax

  • Python
  • C++
"selectionSet_var" is a variable referencing a SelectionSet object.
returnValue = selectionSet_var.select()
"selectionSet_var" is a variable referencing a SelectionSet object.

#include <Core/Application/SelectionSet.h>

returnValue = selectionSet_var->select();

Return Value

Type | Description
boolean | Returns true if the selection was successful.

Version

Introduced in version May 2022


SelectionSets Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

The SelectionSets object is used to create and access existing selection sets.

In the user interface, selection sets are created by selecting geometry and then running the "Create Selection Set" command from the context menu. All existing selection sets are shown in a "Selection Sets" folder in the browser.

Methods

Name | Description
add | Adds a new SelectionSet to the parent 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 SelectionSet object using an index into the collection.
itemByName | Returns the specified SelectionSet object using the name of the selection set.

Properties

Name | Description
count | Returns the number of SelectionSet 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.selectionSets, Design.selectionSets, Drawing.selectionSets, FlatPatternProduct.selectionSets, Product.selectionSets, WorkingModel.selectionSets

Version

Introduced in version May 2022


SelectionSets.add Method

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Adds a new SelectionSet to the parent product.

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.
# Uses no optional arguments.
returnValue = selectionSets_var.add(entities)

# Uses optional arguments.
returnValue = selectionSets_var.add(entities, name)
"selectionSets_var" is a variable referencing a SelectionSets object.

#include <Core/Application/SelectionSets.h>

// Uses no optional arguments.
returnValue = selectionSets_var->add(entities);

// Uses optional arguments.
returnValue = selectionSets_var->add(entities, name);

Return Value

Type | Description
SelectionSet | Returns the created selection set or null in the case the selection set couldn't be created. This method can fail in the case where no entities are provided or if any of the provided entities are not selectable.

Parameters

Name | Type | Description
entities | Base[] | An array of entities that will be in the created selection set. All entities must be in the context of the root component. This means if the entity isn't directly owned by the root component, it must be a proxy.
name | string | The name of the selection set. This is an optional argument is if not specified, or an empty string is provided, Fusion will create a name for the selection set. If provided, the name should be unique with respect to other selection sets in the product. If a name is provided that is the same as an existing selection set, Fusion will append a counter to the name to make the name unique. This is an optional argument whose default value is "".

Version

Introduced in version May 2022


SelectionSets.classType Method

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionSets.classType()
This is a static method.

#include <Core/Application/SelectionSets.h>

returnValue = adsk::core::SelectionSets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


SelectionSets.count Property

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Returns the number of SelectionSet objects in the collection.

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.

# Get the value of the property.
propertyValue = selectionSets_var.count
"selectionSets_var" is a variable referencing a SelectionSets object.
#include <Core/Application/SelectionSets.h>

// Get the value of the property.
uinteger propertyValue = selectionSets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2022


SelectionSets.isValid Property

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.

# Get the value of the property.
propertyValue = selectionSets_var.isValid
"selectionSets_var" is a variable referencing a SelectionSets object.
#include <Core/Application/SelectionSets.h>

// Get the value of the property.
boolean propertyValue = selectionSets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


SelectionSets.item Method

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Returns the specified SelectionSet object using an index into the collection.

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.
returnValue = selectionSets_var.item(index)
"selectionSets_var" is a variable referencing a SelectionSets object.

#include <Core/Application/SelectionSets.h>

returnValue = selectionSets_var->item(index);

Return Value

Type | Description
SelectionSet | Returns the specified SelectionSet or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the SelectionSet within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version May 2022


SelectionSets.itemByName Method

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

Returns the specified SelectionSet object using the name of the selection set.

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.
returnValue = selectionSets_var.itemByName(name)
"selectionSets_var" is a variable referencing a SelectionSets object.

#include <Core/Application/SelectionSets.h>

returnValue = selectionSets_var->itemByName(name);

Return Value

Type | Description
SelectionSet | Returns the specified SelectionSet object or null if no SelectionSet object exists with the specified name.

Parameters

Name | Type | Description
name | string | The name of the SelectionSet object to return.

Version

Introduced in version May 2022


SelectionSets.objectType Property

Parent Object: SelectionSets
Defined in namespace "adsk::core" and the header file is <Core/Application/SelectionSets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"selectionSets_var" is a variable referencing a SelectionSets object.

# Get the value of the property.
propertyValue = selectionSets_var.objectType
"selectionSets_var" is a variable referencing a SelectionSets object.
#include <Core/Application/SelectionSets.h>

// Get the value of the property.
string propertyValue = selectionSets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


SeparatorCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

An object that represents a visual separator within a command dialog.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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.addSeparatorCommandInput

Version

Introduced in version May 2024


SeparatorCommandInput.classType Method

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SeparatorCommandInput.classType()
This is a static method.

#include <Core/UserInterface/SeparatorCommandInput.h>

returnValue = adsk::core::SeparatorCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


SeparatorCommandInput.commandInputs Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.commandInputs
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = separatorCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version May 2024


SeparatorCommandInput.deleteMe Method

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
returnValue = separatorCommandInput_var.deleteMe()
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

#include <Core/UserInterface/SeparatorCommandInput.h>

returnValue = separatorCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2024


SeparatorCommandInput.id Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.id
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SeparatorCommandInput.isEnabled Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.isEnabled

# Set the value of the property.
separatorCommandInput_var.isEnabled = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
boolean propertyValue = separatorCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = separatorCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SeparatorCommandInput.isFullWidth Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

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.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.isFullWidth

# Set the value of the property.
separatorCommandInput_var.isFullWidth = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
boolean propertyValue = separatorCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = separatorCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SeparatorCommandInput.isValid Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.isValid
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
boolean propertyValue = separatorCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


SeparatorCommandInput.isVisible Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.isVisible

# Set the value of the property.
separatorCommandInput_var.isVisible = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
boolean propertyValue = separatorCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = separatorCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SeparatorCommandInput.name Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets the user visible name of this input.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.name
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SeparatorCommandInput.objectType Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.objectType
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SeparatorCommandInput.parentCommand Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets the parent Command.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.parentCommand
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = separatorCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version May 2024


SeparatorCommandInput.parentCommandInput Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.parentCommandInput
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = separatorCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version May 2024


SeparatorCommandInput.toolClipFilename Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

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.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.toolClipFilename

# Set the value of the property.
separatorCommandInput_var.toolClipFilename = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = separatorCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2024


SeparatorCommandInput.tooltip Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

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.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.tooltip

# Set the value of the property.
separatorCommandInput_var.tooltip = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = separatorCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2024


SeparatorCommandInput.tooltipDescription Property

Parent Object: SeparatorCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorCommandInput.h>

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.

Syntax

  • Python
  • C++
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.

# Get the value of the property.
propertyValue = separatorCommandInput_var.tooltipDescription

# Set the value of the property.
separatorCommandInput_var.tooltipDescription = propertyValue
"separatorCommandInput_var" is a variable referencing a SeparatorCommandInput object.
#include <Core/UserInterface/SeparatorCommandInput.h>

// Get the value of the property.
string propertyValue = separatorCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = separatorCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2024


SeparatorControl Object

Derived from: ToolbarControl Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Represents a separator within a panel, toolbar, or drop-down control.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SeparatorControl.classType Method

Parent Object: SeparatorControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Deletes the ToolbarControl

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

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.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SeparatorControl.index Property

Parent Object: SeparatorControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

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.

Version

Introduced in version August 2014


SeparatorControl.isValid Property

Parent Object: SeparatorControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Gets or sets if this control is currently visible.

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.

Version

Introduced in version August 2014


SeparatorControl.objectType Property

Parent Object: SeparatorControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SeparatorControl.parent Property

Parent Object: SeparatorControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SeparatorControl.h>

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Object that represents an existing Setup.

Methods

Name | Description
activate | Sets this object as the default container.
additiveContainerByType | Preview Returns the additive container with 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().
copyAfter | Preview Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyBefore | Preview Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.
copyInto | Preview Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.
createFromCAMTemplate | **RETIRED** Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.
createFromCAMTemplate2 | Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.
createFromTemplate | **RETIRED** Create and add operations, folders or patterns from the specified template file to the end of this setup.
createFromTemplateXML | **RETIRED** Create and add operations, folders or patterns from the specified template content XML to the end of this setup.
deleteMe | Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.
duplicate | Preview Creates a duplicate of the operation in the tree after the itself.
modifyUtility | Preview Get ModifyUtility for the current operation by given utility type.
moveAfter | Preview Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveBefore | Preview Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.
moveInto | Preview Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Properties

Name | Description
allOperations | Returns an ObjectCollection containing all of the operations in this setup. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this object.
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.
error | Returns a message corresponding to any active error associated with the value of this parameter.
fixtureEnabled | Set this value to enable the use of fixtures for this setup. To then set the fixture models themselves use the `fixtures` property.
fixtures | Gets and sets the fixtures associated with the setup, which are represented by an ObjectCollection of models, where a model can be an Occurrence, BRepBody, or MeshBody. To be able to set models as fixtures, the fixturesEnabled property has to be set first.
folders | Returns the Folders collection that provides access to existing folders in this setup.
generatedDataCollection | Preview Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs
hasError | Gets if errors were encountered when generating the operation.
hasWarning | Gets if problems were encountered when generating the operation.
isActive | Gets if this setup is active.
isLightBulbOn | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
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.
isVisible | Preview Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.
machine | Gets and sets the Machine associated with the setup. The returned Machine is a transient copy, so the Machine needs to be set to the Setup again to apply any changes.
models | Gets and sets the input models associated with the setup. Passing in an empty ObjectCollection will remove all current inputs. Valid collection items are Occurrence, BRepBody, or MeshBody.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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. It can be MillingOperation, TurningOperation, JetOperation or AdditiveOperation.
parameters | Gets the CAMParameters collection for this operation.
parentSetup | Gets the Setup this operation belongs to.
patterns | Returns the Patterns collection that provides access to existing patterns in this setup.
printSetting | Gets and sets the PrintSetting associated with the setup.
stockMaterial | Preview Gets/ and sets the Stock material associated with the setup.
stockMode | 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.
stockSolids | Gets and sets the stock solids associated with the setup, which are represented by an ObjectCollection of models, where a model can be an Occurrence, BRepBody, or MeshBody. StockMode has to be set to `SolidStock` otherwise this will throw an error.
strategy | Gets the name of the strategy associated with this operation.
visibilityManager | Visibility manager for this setup.
warning | Returns a message corresponding to any active warning associated with the value of this parameter.
workCoordinateSystem | Gets the Work Coordinate System associated with the setup as 4x4 matrix. From Matrix3D, Orientation and Origin data can be fetched.

Accessed From

CAMAdditiveContainer.parentSetup, CAMFolder.parentSetup, CAMHoleRecognition.parentSetup, CAMPattern.parentSetup, DocumentStockMaterialLibrary.setupsByStockMaterial, NCProgram.parentSetup, Operation.parentSetup, OperationBase.parentSetup, Setup.parentSetup, SetupChangeEventArgs.setup, SetupEventArgs.setup, Setups.add, Setups.item, Setups.itemByName, Setups.itemByOperationId

Samples

Name | Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Generate Setup Sheets API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version January 2016


Setup.activate Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Sets this object as the default container.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.activate()
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version April 2023


Setup.additiveContainerByType Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns the additive container with the specified type.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.additiveContainerByType(containerType)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->additiveContainerByType(containerType);

Return Value

Type | Description
CAMAdditiveContainer | Returns the specified container or null in the case where there is no container with the specified type.

Parameters

Name | Type | Description
containerType | CAMAdditiveContainerTypes | The type of the container

Version

Introduced in version July 2024


Setup.allOperations Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns an ObjectCollection containing all of the operations in this setup. This includes all operations nested in folders and patterns.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setup.attributes Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns the collection of attributes associated with this object.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.attributes
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = setup_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2021


Setup.children Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.copyAfter Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Creates a duplicate of the operation in the tree after the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.copyAfter(operation)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->copyAfter(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation after.

Version

Introduced in version May 2024


Setup.copyBefore Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Creates a duplicate of the operation in the tree before the given operation. Throws an exception if a not allowed copy operation is made for example copying a operation out of a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.copyBefore(operation)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->copyBefore(operation);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to copy targeted operation before.

Version

Introduced in version May 2024


Setup.copyInto Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Creates a duplicate of the operation into the given container. You can only copy into containers, such as setups or folders. Copied operation will be copied at the end of all operations already in the container. Throws an exception if a not allowed copy operation is made for example copying a setup into a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.copyInto(container)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->copyInto(container);

Return Value

Type | Description
boolean | Returns if copy command was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to copy targeted operation into.

Version

Introduced in version May 2024


Setup.createFromCAMTemplate Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.createFromCAMTemplate(camTemplate)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->createFromCAMTemplate(camTemplate);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
camTemplate | CAMTemplate | The CAMTemplate object to use to create the new operation, folder, or pattern.

Version

Introduced in version April 2023
Retired in version July 2024


Setup.createFromCAMTemplate2 Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Create new operations, folders, or patterns from the specified CAMTemplate. They are added to the end of the parent setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.createFromCAMTemplate2(input)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->createFromCAMTemplate2(input);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
input | CreateFromCAMTemplateInput | Input object that contains the template to create from and the generation mode.

Samples

Name | Description
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.
Create CAM Operation From Template API Sample | Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.

Version

Introduced in version October 2023


Setup.createFromTemplate Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Create and add operations, folders or patterns from the specified template file to the end of this setup.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.createFromTemplate(templateFilePath)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_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 September 2020
Retired in version July 2024


Setup.createFromTemplateXML Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Create and add operations, folders or patterns from the specified template content XML to the end of this setup.

Remarks

This property has been retired. Please use createFromCAMTemplate2 in conjunction with a CreateFromCAMTemplateInput to create operations from a template file.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.createFromTemplateXML(templateXML)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->createFromTemplateXML(templateXML);

Return Value

Type | Description
OperationBase[] | Returns an array containing all of the operations, folders and patterns created from the template.

Parameters

Name | Type | Description
templateXML | string | The full XML content of the template.

Version

Introduced in version April 2023
Retired in version July 2024


Setup.deleteMe Method

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Deletes the operation from the document. In case of a setup or folder, all containing child operations will be deleted as well. Note: Child classes may overwrite this function and throw an exception if the object cannot be deleted.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.deleteMe()
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2023


Setup.duplicate Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Creates a duplicate of the operation in the tree after the itself.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.duplicate()
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->duplicate();

Return Value

Type | Description
boolean | Returns if duplicate command was successful.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version May 2024


Setup.error Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns a message corresponding to any active error associated with the value of this parameter.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.error
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Setup.fixtureEnabled Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Set this value to enable the use of fixtures for this setup. To then set the fixture models themselves use the `fixtures` property.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.fixtureEnabled

# Set the value of the property.
setup_var.fixtureEnabled = 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->fixtureEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setup_var->fixtureEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


Setup.fixtures Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the fixtures associated with the setup, which are represented by an ObjectCollection of models, where a model can be an Occurrence, BRepBody, or MeshBody. To be able to set models as fixtures, the fixturesEnabled property has to be set first.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.fixtures

# Set the value of the property.
setup_var.fixtures = 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->fixtures();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = setup_var->fixtures(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version May 2020


Setup.folders Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns the Folders collection that provides access to existing folders in this setup.

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.generatedDataCollection Property

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Get the generated data associated with a given operation base instance. The type of data depends on the strategy type and might not be available for all strategy types. The available types can be found in GeneratedData.cs

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.generatedDataCollection
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<GeneratedDataCollection> propertyValue = setup_var->generatedDataCollection();

Property Value

This is a read only property whose value is a GeneratedDataCollection.

Version

Introduced in version July 2023


Setup.hasError Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if errors were encountered when generating the operation.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.hasError
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Setup.hasWarning Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if problems were encountered when generating the operation.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.hasWarning
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Setup.isActive Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if this setup is active.

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.isLightBulbOn Property

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible, just that it should be visible if all of its parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isLightBulbOn

# Set the value of the property.
setup_var.isLightBulbOn = 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->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setup_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2023


Setup.isOptional Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if this operation is selected in the 'Setups' browser.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVisible Property

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets if this operation is currently visible in the graphics window. Use the isLightBulbOn to change if the eye icon beside the operation 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 operation is actually visible or not.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isVisible
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


Setup.machine Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the Machine associated with the setup. The returned Machine is a transient copy, so the Machine needs to be set to the Setup again to apply any changes.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.machine

# Set the value of the property.
setup_var.machine = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<Machine> propertyValue = setup_var->machine();

// Set the value of the property, where value_var is a Machine.
bool returnValue = setup_var->machine(value_var);

Property Value

This is a read/write property whose value is a Machine.

Version

Introduced in version April 2023


Setup.models Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the input models associated with the setup. Passing in an empty ObjectCollection will remove all current inputs. Valid collection items are Occurrence, BRepBody, or MeshBody.

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.modifyUtility Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Get ModifyUtility for the current operation by given utility type.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.modifyUtility(utility)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->modifyUtility(utility);

Return Value

Type | Description
ModifyUtility | Returns ModifyUtility for specific type or null if the type is not compatible with the operation.

Parameters

Name | Type | Description
utility | ModifyUtilityTypes | Defines the specific ModifyUtility.

Version

Introduced in version September 2023


Setup.moveAfter Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Move operation in tree after the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.moveAfter(operation)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->moveAfter(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation after.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version May 2024


Setup.moveBefore Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Move operation in tree before the given operation. Throws an exception if a not allowed move is made for example moving a operation out of a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.moveBefore(operation)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->moveBefore(operation);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
operation | OperationBase | Operation to move targeted operation before.

Version

Introduced in version May 2024


Setup.moveInto Method

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Move operation in tree into the given container. This only works with setups, patterns and folders. Moved operation will be moved at the end of all operations already in the container. Throws an exception if a not allowed move is made for example moving a setup into a setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.
returnValue = setup_var.moveInto(container)
"setup_var" is a variable referencing a Setup object.

#include <Cam/CAM/Setup.h>

returnValue = setup_var->moveInto(container);

Return Value

Type | Description
boolean | Returns if move operation was successful.

Parameters

Name | Type | Description
container | OperationBase | Container to move targeted operation into.

Version

Introduced in version May 2024


Setup.name Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

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.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version January 2016


Setup.notes Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the notes of the operation.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

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.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns the Operations collection that provides access to existing operations in this setup.

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.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version January 2016


Setup.operationType Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets the Operation Type. It can be MillingOperation, TurningOperation, JetOperation or AdditiveOperation.

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.parameters Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets the CAMParameters collection for this operation.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.parameters
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = setup_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name | Description
CAM Parameter Modification API Sample | Demonstrates changing parameters of existing toolpaths.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version September 2020


Setup.parentSetup Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets the Setup this operation belongs to.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns the Patterns collection that provides access to existing patterns in this setup.

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


Setup.printSetting Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the PrintSetting associated with the setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.printSetting

# Set the value of the property.
setup_var.printSetting = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<PrintSetting> propertyValue = setup_var->printSetting();

// Set the value of the property, where value_var is a PrintSetting.
bool returnValue = setup_var->printSetting(value_var);

Property Value

This is a read/write property whose value is a PrintSetting.

Version

Introduced in version April 2023


Setup.stockMaterial Property

Parent Object: Setup

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets/ and sets the Stock material associated with the setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.stockMaterial

# Set the value of the property.
setup_var.stockMaterial = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<StockMaterial> propertyValue = setup_var->stockMaterial();

// Set the value of the property, where value_var is a StockMaterial.
bool returnValue = setup_var->stockMaterial(value_var);

Property Value

This is a read/write property whose value is a StockMaterial.

Version

Introduced in version September 2024


Setup.stockMode Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

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.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.stockMode

# Set the value of the property.
setup_var.stockMode = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
SetupStockModes propertyValue = setup_var->stockMode();

// Set the value of the property, where value_var is a SetupStockModes.
bool returnValue = setup_var->stockMode(value_var);

Property Value

This is a read/write property whose value is a SetupStockModes.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version September 2022


Setup.stockSolids Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets and sets the stock solids associated with the setup, which are represented by an ObjectCollection of models, where a model can be an Occurrence, BRepBody, or MeshBody. StockMode has to be set to `SolidStock` otherwise this will throw an error.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.stockSolids

# Set the value of the property.
setup_var.stockSolids = 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->stockSolids();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = setup_var->stockSolids(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Samples

Name Description
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version August 2020


Setup.strategy Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets the name of the strategy associated with this operation.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.strategy
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->strategy();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


Setup.visibilityManager Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Visibility manager for this setup.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.visibilityManager
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<SetupVisibilityManager> propertyValue = setup_var->visibilityManager();

Property Value

This is a read only property whose value is a SetupVisibilityManager.

Version

Introduced in version January 2024


Setup.warning Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Returns a message corresponding to any active warning associated with the value of this parameter.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.warning
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Setup.workCoordinateSystem Property

Parent Object: Setup
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setup.h>

Description

Gets the Work Coordinate System associated with the setup as 4x4 matrix. From Matrix3D, Orientation and Origin data can be fetched.

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.workCoordinateSystem
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = setup_var->workCoordinateSystem();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version April 2023


SetupChangeEvent Object

Derived from: Event Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

A SetupChangeEvent represents a setup related change event. It is used for SetupChanged notifications.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CAM.setupChanged

Version

Introduced in version April 2023


SetupChangeEvent.add Method

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

Add a handler to be notified when the file event occurs.

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
returnValue = setupChangeEvent_var.add(handler)
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

#include <Cam/CAM/SetupChangeEvent.h>

returnValue = setupChangeEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | SetupChangeEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version April 2023


SetupChangeEvent.classType Method

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupChangeEvent.classType()
This is a static method.

#include <Cam/CAM/SetupChangeEvent.h>

returnValue = adsk::cam::SetupChangeEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SetupChangeEvent.isValid Property

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

# Get the value of the property.
propertyValue = setupChangeEvent_var.isValid
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
#include <Cam/CAM/SetupChangeEvent.h>

// Get the value of the property.
boolean propertyValue = setupChangeEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SetupChangeEvent.name Property

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

# Get the value of the property.
propertyValue = setupChangeEvent_var.name
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
#include <Cam/CAM/SetupChangeEvent.h>

// Get the value of the property.
string propertyValue = setupChangeEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupChangeEvent.objectType Property

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

# Get the value of the property.
propertyValue = setupChangeEvent_var.objectType
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
#include <Cam/CAM/SetupChangeEvent.h>

// Get the value of the property.
string propertyValue = setupChangeEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupChangeEvent.remove Method

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
returnValue = setupChangeEvent_var.remove(handler)
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

#include <Cam/CAM/SetupChangeEvent.h>

returnValue = setupChangeEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | SetupChangeEventHandler | The handler object to be removed from the event.

Version

Introduced in version April 2023


SetupChangeEvent.sender Property

Parent Object: SetupChangeEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.

# Get the value of the property.
propertyValue = setupChangeEvent_var.sender
"setupChangeEvent_var" is a variable referencing a SetupChangeEvent object.
#include <Cam/CAM/SetupChangeEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = setupChangeEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version April 2023


SetupChangeEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

The SetupChangeEventArgs provides information associated with a change event of a setup.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
info | Provides access to an information string. The optional string may contain additional information about the change.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
setup | Provides access to the setup. Can be null in the case where the event is fired before the setup has been created or after it has been deleted.
type | The type specifies the actual change.

Version

Introduced in version April 2023


SetupChangeEventArgs.classType Method

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupChangeEventArgs.classType()
This is a static method.

#include <Cam/CAM/SetupChangeEventArgs.h>

returnValue = adsk::cam::SetupChangeEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SetupChangeEventArgs.firingEvent Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.firingEvent
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = setupChangeEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version April 2023


SetupChangeEventArgs.info Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

Provides access to an information string. The optional string may contain additional information about the change.

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.info
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
string propertyValue = setupChangeEventArgs_var->info();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupChangeEventArgs.isValid Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.isValid
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
boolean propertyValue = setupChangeEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SetupChangeEventArgs.objectType Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.objectType
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
string propertyValue = setupChangeEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupChangeEventArgs.setup Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

Provides access to the setup. Can be null in the case where the event is fired before the setup has been created or after it has been deleted.

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.setup
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
Ptr<Setup> propertyValue = setupChangeEventArgs_var->setup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version April 2023


SetupChangeEventArgs.type Property

Parent Object: SetupChangeEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventArgs.h>

Description

The type specifies the actual change.

Syntax

  • Python
  • C++
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.

# Get the value of the property.
propertyValue = setupChangeEventArgs_var.type
"setupChangeEventArgs_var" is a variable referencing a SetupChangeEventArgs object.
#include <Cam/CAM/SetupChangeEventArgs.h>

// Get the value of the property.
SetupChangeEventType propertyValue = setupChangeEventArgs_var->type();

Property Value

This is a read only property whose value is a SetupChangeEventType.

Version

Introduced in version April 2023


SetupChangeEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventHandler.h>

Description

The SetupChangeEventHandler is a client implemented class that can be added as a handler to a SetupChangeEvent.

Methods

Name | Description
notify | The function called by CAM when the associated event is fired.

Version

Introduced in version April 2023


SetupChangeEventHandler.notify Method

Parent Object: SetupChangeEventHandler
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupChangeEventHandler.h>

Description

The function called by CAM when the associated event is fired.

Syntax

  • Python
  • C++
"setupChangeEventHandler_var" is a variable referencing a SetupChangeEventHandler object.
returnValue = setupChangeEventHandler_var.notify(eventArgs)
"setupChangeEventHandler_var" is a variable referencing a SetupChangeEventHandler object.

#include <Cam/CAM/SetupChangeEventHandler.h>

returnValue = setupChangeEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | SetupChangeEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version April 2023


SetupEvent Object

Derived from: Event Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

A SetupEvent represents a setup related event. For example, SetupCreated or SetupDestroying.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CAM.setupActivated, CAM.setupActivating, CAM.setupCreated, CAM.setupDeactivated, CAM.setupDeactivating, CAM.setupDestroying

Version

Introduced in version April 2023


SetupEvent.add Method

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

Add a handler to be notified when the file event occurs.

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.
returnValue = setupEvent_var.add(handler)
"setupEvent_var" is a variable referencing a SetupEvent object.

#include <Cam/CAM/SetupEvent.h>

returnValue = setupEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | SetupEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version April 2023


SetupEvent.classType Method

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupEvent.classType()
This is a static method.

#include <Cam/CAM/SetupEvent.h>

returnValue = adsk::cam::SetupEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SetupEvent.isValid Property

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.

# Get the value of the property.
propertyValue = setupEvent_var.isValid
"setupEvent_var" is a variable referencing a SetupEvent object.
#include <Cam/CAM/SetupEvent.h>

// Get the value of the property.
boolean propertyValue = setupEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SetupEvent.name Property

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.

# Get the value of the property.
propertyValue = setupEvent_var.name
"setupEvent_var" is a variable referencing a SetupEvent object.
#include <Cam/CAM/SetupEvent.h>

// Get the value of the property.
string propertyValue = setupEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupEvent.objectType Property

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.

# Get the value of the property.
propertyValue = setupEvent_var.objectType
"setupEvent_var" is a variable referencing a SetupEvent object.
#include <Cam/CAM/SetupEvent.h>

// Get the value of the property.
string propertyValue = setupEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupEvent.remove Method

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

Removes a handler from the event.

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.
returnValue = setupEvent_var.remove(handler)
"setupEvent_var" is a variable referencing a SetupEvent object.

#include <Cam/CAM/SetupEvent.h>

returnValue = setupEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | SetupEventHandler | The handler object to be removed from the event.

Version

Introduced in version April 2023


SetupEvent.sender Property

Parent Object: SetupEvent
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Syntax

  • Python
  • C++
"setupEvent_var" is a variable referencing a SetupEvent object.

# Get the value of the property.
propertyValue = setupEvent_var.sender
"setupEvent_var" is a variable referencing a SetupEvent object.
#include <Cam/CAM/SetupEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = setupEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version April 2023


SetupEventArgs Object

Derived from: EventArgs Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

The SetupEventArgs provides information associated with a setup event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
setup | Provides access to the setup. Can be null in the case where the event is fired before the setup has been created or after it has been deleted.

Version

Introduced in version April 2023


SetupEventArgs.classType Method

Parent Object: SetupEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupEventArgs.classType()
This is a static method.

#include <Cam/CAM/SetupEventArgs.h>

returnValue = adsk::cam::SetupEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SetupEventArgs.firingEvent Property

Parent Object: SetupEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

The event that the firing is in response to.

Syntax

  • Python
  • C++
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.

# Get the value of the property.
propertyValue = setupEventArgs_var.firingEvent
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.
#include <Cam/CAM/SetupEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = setupEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version April 2023


SetupEventArgs.isValid Property

Parent Object: SetupEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.

# Get the value of the property.
propertyValue = setupEventArgs_var.isValid
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.
#include <Cam/CAM/SetupEventArgs.h>

// Get the value of the property.
boolean propertyValue = setupEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SetupEventArgs.objectType Property

Parent Object: SetupEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.

# Get the value of the property.
propertyValue = setupEventArgs_var.objectType
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.
#include <Cam/CAM/SetupEventArgs.h>

// Get the value of the property.
string propertyValue = setupEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupEventArgs.setup Property

Parent Object: SetupEventArgs
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventArgs.h>

Description

Provides access to the setup. Can be null in the case where the event is fired before the setup has been created or after it has been deleted.

Syntax

  • Python
  • C++
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.

# Get the value of the property.
propertyValue = setupEventArgs_var.setup
"setupEventArgs_var" is a variable referencing a SetupEventArgs object.
#include <Cam/CAM/SetupEventArgs.h>

// Get the value of the property.
Ptr<Setup> propertyValue = setupEventArgs_var->setup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version April 2023


SetupEventHandler Object

Derived from: EventHandler Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventHandler.h>

Description

The SetupEventHandler is a client implemented class that can be added as a handler to a SetupEvent.

Methods

Name | Description
notify | The function called by CAM when the associated event is fired.

Version

Introduced in version April 2023


SetupEventHandler.notify Method

Parent Object: SetupEventHandler
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupEventHandler.h>

Description

The function called by CAM when the associated event is fired.

Syntax

  • Python
  • C++
"setupEventHandler_var" is a variable referencing a SetupEventHandler object.
returnValue = setupEventHandler_var.notify(eventArgs)
"setupEventHandler_var" is a variable referencing a SetupEventHandler object.

#include <Cam/CAM/SetupEventHandler.h>

returnValue = setupEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | SetupEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version April 2023


SetupInput Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Object that represents an setup creation parameters. The input-object can be used from the Setups.add method to instantiate a new setup

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
fixtureEnabled | Set this value to enable the use of fixtures for this setup. To then set the fixture models themselves use the `fixtures` property.
fixtures An array of models that represent fixtures, where a model can be an Occurrence, BRepBody, or MeshBody.

The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign using this property, although, that is supported too.
isUsingPreviousSetupData | Preview Get and set if data from the previous setup should be used when creating another setup. The data applied from the previous setup is machine information and the stock from the preceeding setup. By default this value 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.
machine | Gets and sets the Machine associated with the setup.
models | A list of models, where a model can be an Occurrence, BRepBody, or MeshBody. The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign it using this property, although, that is supported too.
name | Name of the new setup. This is displayed in the browser tree and can be used to access the setup from Setups.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operationType | Operation Type for the setup
parameters | Get all parameters for the setup to be created. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.
printSetting | Gets and sets the PrintSetting associated with the setup.
stockMode | StockMode for the setup.
stockSolids An array of models, where a model can be an Occurrence, ManufacturingModel, BRepBody, or MeshBody. Setting this property, or adding the first object to the returned array will automatically set the stockMode to "SolidStock".

The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign it using this property, although, that is supported too.

Accessed From

Setups.createInput

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version April 2023


SetupInput.classType Method

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupInput.classType()
This is a static method.

#include <Cam/CAM/SetupInput.h>

returnValue = adsk::cam::SetupInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SetupInput.fixtureEnabled Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Set this value to enable the use of fixtures for this setup. To then set the fixture models themselves use the `fixtures` property.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.fixtureEnabled

# Set the value of the property.
setupInput_var.fixtureEnabled = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
boolean propertyValue = setupInput_var->fixtureEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setupInput_var->fixtureEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version April 2023


SetupInput.fixtures Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

An array of models that represent fixtures, where a model can be an Occurrence, BRepBody, or MeshBody.

The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign using this property, although, that is supported too.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.fixtures

# Set the value of the property.
setupInput_var.fixtures = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = setupInput_var->fixtures();

// Set the value of the property, where value_var is a Base.
bool returnValue = setupInput_var->fixtures(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version April 2023


SetupInput.isUsingPreviousSetupData Property

Parent Object: SetupInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Get and set if data from the previous setup should be used when creating another setup. The data applied from the previous setup is machine information and the stock from the preceeding setup. By default this value is false.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.isUsingPreviousSetupData

# Set the value of the property.
setupInput_var.isUsingPreviousSetupData = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
boolean propertyValue = setupInput_var->isUsingPreviousSetupData();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setupInput_var->isUsingPreviousSetupData(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


SetupInput.isValid Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.isValid
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
boolean propertyValue = setupInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SetupInput.machine Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Gets and sets the Machine associated with the setup.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.machine

# Set the value of the property.
setupInput_var.machine = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
Ptr<Machine> propertyValue = setupInput_var->machine();

// Set the value of the property, where value_var is a Machine.
bool returnValue = setupInput_var->machine(value_var);

Property Value

This is a read/write property whose value is a Machine.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


SetupInput.models Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

A list of models, where a model can be an Occurrence, BRepBody, or MeshBody. The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign it using this property, although, that is supported too.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.models

# Set the value of the property.
setupInput_var.models = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = setupInput_var->models();

// Set the value of the property, where value_var is a Base.
bool returnValue = setupInput_var->models(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version April 2023


SetupInput.name Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Name of the new setup. This is displayed in the browser tree and can be used to access the setup from Setups.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.name

# Set the value of the property.
setupInput_var.name = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
string propertyValue = setupInput_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = setupInput_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version April 2023


SetupInput.objectType Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.objectType
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
string propertyValue = setupInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SetupInput.operationType Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Operation Type for the setup

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.operationType
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
OperationTypes propertyValue = setupInput_var->operationType();

Property Value

This is a read only property whose value is an OperationTypes.

Version

Introduced in version April 2023


SetupInput.parameters Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Get all parameters for the setup to be created. Parameters are initialized by user defaults. Configure operation parameters before creation for a better performance.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.parameters
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = setupInput_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version May 2023


SetupInput.printSetting Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

Gets and sets the PrintSetting associated with the setup.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.printSetting

# Set the value of the property.
setupInput_var.printSetting = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
Ptr<PrintSetting> propertyValue = setupInput_var->printSetting();

// Set the value of the property, where value_var is a PrintSetting.
bool returnValue = setupInput_var->printSetting(value_var);

Property Value

This is a read/write property whose value is a PrintSetting.

Samples

Name Description
Additive Manufacturing FFF API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Additive Manufacturing SLA API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Version

Introduced in version April 2023


SetupInput.stockMode Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

StockMode for the setup.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.stockMode

# Set the value of the property.
setupInput_var.stockMode = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
SetupStockModes propertyValue = setupInput_var->stockMode();

// Set the value of the property, where value_var is a SetupStockModes.
bool returnValue = setupInput_var->stockMode(value_var);

Property Value

This is a read/write property whose value is a SetupStockModes.

Version

Introduced in version April 2023


SetupInput.stockSolids Property

Parent Object: SetupInput
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/SetupInput.h>

Description

An array of models, where a model can be an Occurrence, ManufacturingModel, BRepBody, or MeshBody. Setting this property, or adding the first object to the returned array will automatically set the stockMode to "SolidStock".

The returned array is connected to the SetupInput and can be added to directly without needing to create a new array, populate it, and assign it using this property, although, that is supported too.

Syntax

  • Python
  • C++
"setupInput_var" is a variable referencing a SetupInput object.

# Get the value of the property.
propertyValue = setupInput_var.stockSolids

# Set the value of the property.
setupInput_var.stockSolids = propertyValue
"setupInput_var" is a variable referencing a SetupInput object.
#include <Cam/CAM/SetupInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = setupInput_var->stockSolids();

// Set the value of the property, where value_var is a Base.
bool returnValue = setupInput_var->stockSolids(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version April 2023


Setups Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Collection that provides access to all of the existing setups in a document.

Methods

Name | Description
add | Creates a new setup.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 SetupInput object that is used to specify the input needed to create a new setup.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.setups

Samples

Name | Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Generate Setup Sheets API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Version

Introduced in version January 2016


Setups.add Method

Parent Object: Setups
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Creates a new setup.

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.
returnValue = setups_var.add(input)
"setups_var" is a variable referencing a Setups object.

#include <Cam/CAM/Setups.h>

returnValue = setups_var->add(input);

Return Value

Type | Description
Setup | Returns newly created Setup instance.

Parameters

Name | Type | Description
input | SetupInput | The input holds all the information needed to create a valid setup.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


Setups.classType Method

Parent Object: Setups
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

The number of setups in the collection.

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.createInput Method

Parent Object: Setups
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Creates a new SetupInput object that is used to specify the input needed to create a new setup.

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.
returnValue = setups_var.createInput(type)
"setups_var" is a variable referencing a Setups object.

#include <Cam/CAM/Setups.h>

returnValue = setups_var->createInput(type);

Return Value

Type | Description
SetupInput | Returns new SetupInput object.

Parameters

Name | Type | Description
type | OperationTypes | The type specifies the type of the setup that should be created.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Set Vise Origin As Setup WCS Origin API Sample

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


Setups.isValid Property

Parent Object: Setups
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Function that returns the specified setup using an index into the collection.

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 API Sample | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths API Sample | Demonstrates generating the toolpaths in the active document.
Post Toolpaths API Sample | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setups.itemByName Method

Parent Object: Setups
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Returns the setup with the specified name.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

Returns the setup with the specified operation id.

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
Defined in namespace "adsk::cam" and the header file is <Cam/CAM/Setups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SetupVisibilityManager Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

Class to manage the visibility of various elements of the setup.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
machineBaseVisible | Controls the visibility of the setup's machine base where it exists. This is always disabled for additive setups.
machineVisible | Controls the visibility of the setup's machine.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Setup.visibilityManager

Version

Introduced in version January 2024


SetupVisibilityManager.classType Method

Parent Object: SetupVisibilityManager
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SetupVisibilityManager.classType()
This is a static method.

#include <Cam/Visibility/SetupVisibilityManager.h>

returnValue = adsk::cam::SetupVisibilityManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


SetupVisibilityManager.isValid Property

Parent Object: SetupVisibilityManager
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.

# Get the value of the property.
propertyValue = setupVisibilityManager_var.isValid
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.
#include <Cam/Visibility/SetupVisibilityManager.h>

// Get the value of the property.
boolean propertyValue = setupVisibilityManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


SetupVisibilityManager.machineBaseVisible Property

Parent Object: SetupVisibilityManager
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

Controls the visibility of the setup's machine base where it exists. This is always disabled for additive setups.

Syntax

  • Python
  • C++
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.

# Get the value of the property.
propertyValue = setupVisibilityManager_var.machineBaseVisible

# Set the value of the property.
setupVisibilityManager_var.machineBaseVisible = propertyValue
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.
#include <Cam/Visibility/SetupVisibilityManager.h>

// Get the value of the property.
boolean propertyValue = setupVisibilityManager_var->machineBaseVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setupVisibilityManager_var->machineBaseVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


SetupVisibilityManager.machineVisible Property

Parent Object: SetupVisibilityManager
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

Controls the visibility of the setup's machine.

Syntax

  • Python
  • C++
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.

# Get the value of the property.
propertyValue = setupVisibilityManager_var.machineVisible

# Set the value of the property.
setupVisibilityManager_var.machineVisible = propertyValue
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.
#include <Cam/Visibility/SetupVisibilityManager.h>

// Get the value of the property.
boolean propertyValue = setupVisibilityManager_var->machineVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setupVisibilityManager_var->machineVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


SetupVisibilityManager.objectType Property

Parent Object: SetupVisibilityManager
Defined in namespace "adsk::cam" and the header file is <Cam/Visibility/SetupVisibilityManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.

# Get the value of the property.
propertyValue = setupVisibilityManager_var.objectType
"setupVisibilityManager_var" is a variable referencing a SetupVisibilityManager object.
#include <Cam/Visibility/SetupVisibilityManager.h>

// Get the value of the property.
string propertyValue = setupVisibilityManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


SharedLink Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Provides access to the URL that can be used to share this DataFile with others. This object also provides access to the various settings that control the link's behavior.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setPassword | Sets the password to access the web page to view the file. Setting a password makes using the password required to access the page. The password takes effect immediately for anyone using the URL. To turn off the password requirement, set the isPasswordRequired property to false.

Properties

Name | Description
isDownloadAllowed | Specifies if the user with the shared link can download the file or only view it. Changing this setting changes the behavior of the existing link. When a DataFile is shared, and a link is created, this defaults to true, allowing anyone with the link to download the file.
isPasswordRequired | Gets if a password is required to access the file's web page using the link URL. This property can be set to false to turn off the password requirement. It cannot be set to true. To enable a password, use the setPassword method, which sets the password and has the side effect of setting this property to true.
isShared | Gets and sets if a shared link should be made available for this DataFile. This property defaults to false for a new DataFile. Setting it to true will allow the URL for the file to be obtained. Setting it to false will restrict access to the URL and block access for anyone currently using it. In other words, this is a dynamic setting and doesn't just control getting the link URL.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkURL | Returns the URL of the shared link. Returns an empty string in the case where isShared is False.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DataFile.sharedLink

Version

Introduced in version May 2024


SharedLink.classType Method

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SharedLink.classType()
This is a static method.

#include <Core/Dashboard/SharedLink.h>

returnValue = adsk::core::SharedLink::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2024


SharedLink.isDownloadAllowed Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Specifies if the user with the shared link can download the file or only view it. Changing this setting changes the behavior of the existing link. When a DataFile is shared, and a link is created, this defaults to true, allowing anyone with the link to download the file.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.isDownloadAllowed

# Set the value of the property.
sharedLink_var.isDownloadAllowed = propertyValue
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
boolean propertyValue = sharedLink_var->isDownloadAllowed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sharedLink_var->isDownloadAllowed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SharedLink.isPasswordRequired Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Gets if a password is required to access the file's web page using the link URL. This property can be set to false to turn off the password requirement. It cannot be set to true. To enable a password, use the setPassword method, which sets the password and has the side effect of setting this property to true.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.isPasswordRequired

# Set the value of the property.
sharedLink_var.isPasswordRequired = propertyValue
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
boolean propertyValue = sharedLink_var->isPasswordRequired();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sharedLink_var->isPasswordRequired(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SharedLink.isShared Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Gets and sets if a shared link should be made available for this DataFile. This property defaults to false for a new DataFile. Setting it to true will allow the URL for the file to be obtained. Setting it to false will restrict access to the URL and block access for anyone currently using it. In other words, this is a dynamic setting and doesn't just control getting the link URL.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.isShared

# Set the value of the property.
sharedLink_var.isShared = propertyValue
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
boolean propertyValue = sharedLink_var->isShared();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sharedLink_var->isShared(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2024


SharedLink.isValid Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.isValid
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
boolean propertyValue = sharedLink_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2024


SharedLink.linkURL Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Returns the URL of the shared link. Returns an empty string in the case where isShared is False.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.linkURL
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
string propertyValue = sharedLink_var->linkURL();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SharedLink.objectType Property

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.

# Get the value of the property.
propertyValue = sharedLink_var.objectType
"sharedLink_var" is a variable referencing a SharedLink object.
#include <Core/Dashboard/SharedLink.h>

// Get the value of the property.
string propertyValue = sharedLink_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SharedLink.setPassword Method

Parent Object: SharedLink
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/SharedLink.h>

Description

Sets the password to access the web page to view the file. Setting a password makes using the password required to access the page. The password takes effect immediately for anyone using the URL. To turn off the password requirement, set the isPasswordRequired property to false.

Syntax

  • Python
  • C++
"sharedLink_var" is a variable referencing a SharedLink object.
returnValue = sharedLink_var.setPassword(password)
"sharedLink_var" is a variable referencing a SharedLink object.

#include <Core/Dashboard/SharedLink.h>

returnValue = sharedLink_var->setPassword(password);

Return Value

Type | Description
boolean | Returns true if setting the password was successful.

Parameters

Name | Type | Description
password | string | The password to use.

Version

Introduced in version May 2024


SharedPointCoincident Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

An object that is only used when a glyph representing a special type of coincident constraint is selected in the user interface. An example of its use is when two lines are connected at their endpoints. If you hover the mouse over the shared endpoint, a coincident constraint glyph is displayed and highlights the two lines. Selecting the glyph and deleting it will cause the lines to be separate. In this case, there isn't a real coincident constraint, but the two lines share the same sketch point. The UI uses this "fake" coincident constraint to indicate that the lines share the same point. It also supports separating them when the glyph is deleted by creating a new point and moving one of the lines to it.

A selection returns this object when a glyph representing this special type of coincident constraint is selected. It is only used for selections and provides access to the highlighted entities when the glyph is selected.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
curveOne | Returns the first sketch curve that is highlighted when the glyph was selected.
curveTwo | Returns the second sketch curve that is highlighted when the glyph was 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Returns the sketch point that the sketch curves are connected to.

Version

Introduced in version March 2025


SharedPointCoincident.classType Method

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SharedPointCoincident.classType()
This is a static method.

#include <Fusion/Sketch/SharedPointCoincident.h>

returnValue = adsk::fusion::SharedPointCoincident::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2025


SharedPointCoincident.curveOne Property

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

Returns the first sketch curve that is highlighted when the glyph was selected.

Syntax

  • Python
  • C++
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.

# Get the value of the property.
propertyValue = sharedPointCoincident_var.curveOne
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.
#include <Fusion/Sketch/SharedPointCoincident.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sharedPointCoincident_var->curveOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version March 2025


SharedPointCoincident.curveTwo Property

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

Returns the second sketch curve that is highlighted when the glyph was selected.

Syntax

  • Python
  • C++
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.

# Get the value of the property.
propertyValue = sharedPointCoincident_var.curveTwo
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.
#include <Fusion/Sketch/SharedPointCoincident.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sharedPointCoincident_var->curveTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version March 2025


SharedPointCoincident.isValid Property

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.

# Get the value of the property.
propertyValue = sharedPointCoincident_var.isValid
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.
#include <Fusion/Sketch/SharedPointCoincident.h>

// Get the value of the property.
boolean propertyValue = sharedPointCoincident_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2025


SharedPointCoincident.objectType Property

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.

# Get the value of the property.
propertyValue = sharedPointCoincident_var.objectType
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.
#include <Fusion/Sketch/SharedPointCoincident.h>

// Get the value of the property.
string propertyValue = sharedPointCoincident_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2025


SharedPointCoincident.point Property

Parent Object: SharedPointCoincident
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SharedPointCoincident.h>

Description

Returns the sketch point that the sketch curves are connected to.

Syntax

  • Python
  • C++
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.

# Get the value of the property.
propertyValue = sharedPointCoincident_var.point
"sharedPointCoincident_var" is a variable referencing a SharedPointCoincident object.
#include <Fusion/Sketch/SharedPointCoincident.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sharedPointCoincident_var->point();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version March 2025


SheetMetalRule Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

A sheet metal rule.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 rule from the design or library. If the rule is in the library and set as the default rule, you cannot delete it. If the rule is in a design and is used by a component you cannot use it.

Properties

Name | Description
bendRadius | The interior radius of the bends. Use the returned SheetMetalRuleValue object to get and set the current value of the radius.
gap | The value used for miter, rip, and seam, gaps. Use the returned SheetMetalRuleValue object to get and set the current value of the gap.
isDefault | This gets and sets which rule in a library is the default rule. This is only valid for rules in a library and will fail for rules in a design.
isUsed | Indicates if this rule is currently being used by a component. This is only valid for rules in a design.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
kFactor | The K Factor value that is used when calculating the flat pattern. It must be a value between 0 and 1.
name | The name of the sheet metal rule. When setting the name, it should be unique with respect to other sheet metal rules in the design or library.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentDesign | Returns the parent design for a sheet metal rule in a design or it returns null if the sheet metal rule is in the library.
reliefDepth | The relief depth used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief depth.
reliefRemnant | The relief remnant used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief remnant.
reliefShape | Gets and sets the bend relief shape to use.
reliefWidth | The relief width used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief width.
thickness | The thickness of the part. Use the returned SheetMetalRuleValue object to get and set the current value of the thickness.
threeBendReliefRadius | The relief size used when three bends meet in the flat pattern and the relief shape is "round with radius". Use the returned SheetMetalRuleValue object to get and set the current value of the relief size.
threeBendReliefShape | Gets and sets the relief shape to use when three bends intersect.
twoBendReliefPlacement | Gets and sets the relief placement for a two bend relief shape. When the relief shape is round, both intersection and tangent are valid placements. For square shape, only intersection is valid. For all other shapes, this property will return NoTwoBendReliefPlacement because the placement option is not used.
twoBendReliefShape Gets and sets the relief shape to use when two bends intersect.

When set to square or round relief shape, the value of the twoBendReliefPlacement property will be set to IntersectionTwoBendReliefPlacement. For a round relief shape you can change the twoBendReliefPlacment property to TangentTwoBendReliefPlacement.
twoBendReliefSize | The relief size used when two bends meet in the flat pattern and the relief shape is round or square. Use the returned SheetMetalRuleValue object to get and set the current value of the relief size.
units | Gets the units this rule uses to display values in the dialog. Rules currently only use mm or inch and the units are permanently associated with a rule and cannot be modified.

Accessed From

Component.activeSheetMetalRule, ConfigurationSheetMetalRuleCell.sheetMetalRule, FlatPatternComponent.activeSheetMetalRule, SheetMetalRules.addByCopy, SheetMetalRules.item, SheetMetalRules.itemByName

Version

Introduced in version November 2022


SheetMetalRule.bendRadius Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The interior radius of the bends. Use the returned SheetMetalRuleValue object to get and set the current value of the radius.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.bendRadius
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->bendRadius();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.classType Method

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SheetMetalRule.classType()
This is a static method.

#include <Fusion/SheetMetal/SheetMetalRule.h>

returnValue = adsk::fusion::SheetMetalRule::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


SheetMetalRule.deleteMe Method

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Deletes the rule from the design or library. If the rule is in the library and set as the default rule, you cannot delete it. If the rule is in a design and is used by a component you cannot use it.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
returnValue = sheetMetalRule_var.deleteMe()
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

#include <Fusion/SheetMetal/SheetMetalRule.h>

returnValue = sheetMetalRule_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version November 2022


SheetMetalRule.gap Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The value used for miter, rip, and seam, gaps. Use the returned SheetMetalRuleValue object to get and set the current value of the gap.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.gap
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->gap();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.isDefault Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

This gets and sets which rule in a library is the default rule. This is only valid for rules in a library and will fail for rules in a design.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.isDefault

# Set the value of the property.
sheetMetalRule_var.isDefault = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
boolean propertyValue = sheetMetalRule_var->isDefault();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sheetMetalRule_var->isDefault(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


SheetMetalRule.isUsed Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Indicates if this rule is currently being used by a component. This is only valid for rules in a design.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.isUsed
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
boolean propertyValue = sheetMetalRule_var->isUsed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


SheetMetalRule.isValid Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.isValid
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
boolean propertyValue = sheetMetalRule_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


SheetMetalRule.kFactor Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The K Factor value that is used when calculating the flat pattern. It must be a value between 0 and 1.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.kFactor

# Set the value of the property.
sheetMetalRule_var.kFactor = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
double propertyValue = sheetMetalRule_var->kFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = sheetMetalRule_var->kFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


SheetMetalRule.name Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The name of the sheet metal rule. When setting the name, it should be unique with respect to other sheet metal rules in the design or library.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.name

# Set the value of the property.
sheetMetalRule_var.name = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
string propertyValue = sheetMetalRule_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = sheetMetalRule_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2022


SheetMetalRule.objectType Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.objectType
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
string propertyValue = sheetMetalRule_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


SheetMetalRule.parentDesign Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Returns the parent design for a sheet metal rule in a design or it returns null if the sheet metal rule is in the library.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.parentDesign
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<Design> propertyValue = sheetMetalRule_var->parentDesign();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version November 2022


SheetMetalRule.reliefDepth Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The relief depth used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief depth.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.reliefDepth
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->reliefDepth();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.reliefRemnant Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The relief remnant used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief remnant.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.reliefRemnant
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->reliefRemnant();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.reliefShape Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Gets and sets the bend relief shape to use.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.reliefShape

# Set the value of the property.
sheetMetalRule_var.reliefShape = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
BendReliefShapes propertyValue = sheetMetalRule_var->reliefShape();

// Set the value of the property, where value_var is a BendReliefShapes.
bool returnValue = sheetMetalRule_var->reliefShape(value_var);

Property Value

This is a read/write property whose value is a BendReliefShapes.

Version

Introduced in version November 2022


SheetMetalRule.reliefWidth Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The relief width used in the flat pattern. Use the returned SheetMetalRuleValue object to get and set the current value of the relief width.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.reliefWidth
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->reliefWidth();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.thickness Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The thickness of the part. Use the returned SheetMetalRuleValue object to get and set the current value of the thickness.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.thickness
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->thickness();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.threeBendReliefRadius Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The relief size used when three bends meet in the flat pattern and the relief shape is "round with radius". Use the returned SheetMetalRuleValue object to get and set the current value of the relief size.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.threeBendReliefRadius
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->threeBendReliefRadius();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.threeBendReliefShape Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Gets and sets the relief shape to use when three bends intersect.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.threeBendReliefShape

# Set the value of the property.
sheetMetalRule_var.threeBendReliefShape = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
ThreeBendReliefShapes propertyValue = sheetMetalRule_var->threeBendReliefShape();

// Set the value of the property, where value_var is a ThreeBendReliefShapes.
bool returnValue = sheetMetalRule_var->threeBendReliefShape(value_var);

Property Value

This is a read/write property whose value is a ThreeBendReliefShapes.

Version

Introduced in version November 2022


SheetMetalRule.twoBendReliefPlacement Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Gets and sets the relief placement for a two bend relief shape. When the relief shape is round, both intersection and tangent are valid placements. For square shape, only intersection is valid. For all other shapes, this property will return NoTwoBendReliefPlacement because the placement option is not used.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.twoBendReliefPlacement

# Set the value of the property.
sheetMetalRule_var.twoBendReliefPlacement = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
TwoBendReliefPlacements propertyValue = sheetMetalRule_var->twoBendReliefPlacement();

// Set the value of the property, where value_var is a TwoBendReliefPlacements.
bool returnValue = sheetMetalRule_var->twoBendReliefPlacement(value_var);

Property Value

This is a read/write property whose value is a TwoBendReliefPlacements.

Version

Introduced in version November 2022


SheetMetalRule.twoBendReliefShape Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Gets and sets the relief shape to use when two bends intersect.

When set to square or round relief shape, the value of the twoBendReliefPlacement property will be set to IntersectionTwoBendReliefPlacement. For a round relief shape you can change the twoBendReliefPlacment property to TangentTwoBendReliefPlacement.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.twoBendReliefShape

# Set the value of the property.
sheetMetalRule_var.twoBendReliefShape = propertyValue
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
TwoBendReliefShapes propertyValue = sheetMetalRule_var->twoBendReliefShape();

// Set the value of the property, where value_var is a TwoBendReliefShapes.
bool returnValue = sheetMetalRule_var->twoBendReliefShape(value_var);

Property Value

This is a read/write property whose value is a TwoBendReliefShapes.

Version

Introduced in version November 2022


SheetMetalRule.twoBendReliefSize Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

The relief size used when two bends meet in the flat pattern and the relief shape is round or square. Use the returned SheetMetalRuleValue object to get and set the current value of the relief size.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.twoBendReliefSize
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
Ptr<SheetMetalRuleValue> propertyValue = sheetMetalRule_var->twoBendReliefSize();

Property Value

This is a read only property whose value is a SheetMetalRuleValue.

Version

Introduced in version November 2022


SheetMetalRule.units Property

Parent Object: SheetMetalRule
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRule.h>

Description

Gets the units this rule uses to display values in the dialog. Rules currently only use mm or inch and the units are permanently associated with a rule and cannot be modified.

Syntax

  • Python
  • C++
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.

# Get the value of the property.
propertyValue = sheetMetalRule_var.units
"sheetMetalRule_var" is a variable referencing a SheetMetalRule object.
#include <Fusion/SheetMetal/SheetMetalRule.h>

// Get the value of the property.
string propertyValue = sheetMetalRule_var->units();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2024


SheetMetalRules Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

A collection of sheet metal rules.

Methods

Name | Description
addByCopy | Creates a new sheet metal rule by copying an existing rule. The new rule can then be edited to define the rule characteristics you want.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 sheet metal rule using an index into the collection.
itemByName | Function that returns the specified sheet metal rule using the name of the rule.

Properties

Name | Description
count | The number of sheet metal rules 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.designSheetMetalRules, Design.librarySheetMetalRules, FlatPatternProduct.designSheetMetalRules, FlatPatternProduct.librarySheetMetalRules, WorkingModel.designSheetMetalRules, WorkingModel.librarySheetMetalRules

Version

Introduced in version November 2022


SheetMetalRules.addByCopy Method

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

Creates a new sheet metal rule by copying an existing rule. The new rule can then be edited to define the rule characteristics you want.

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
returnValue = sheetMetalRules_var.addByCopy(existingSheetMetalRule, name)
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

#include <Fusion/SheetMetal/SheetMetalRules.h>

returnValue = sheetMetalRules_var->addByCopy(existingSheetMetalRule, name);

Return Value

Type | Description
SheetMetalRule | Returns the new SheetMetalRule object or will assert in the case where it fails.

Parameters

Name | Type | Description
existingSheetMetalRule | SheetMetalRule | The existing SheetMetalRule object you want to copy. This can be a rule from the library or the design.
name | string | The name to assign to the new sheet metal rule. This name must be unique with respect to other sheet metal rules in the design or library it's created in.

Version

Introduced in version November 2022


SheetMetalRules.classType Method

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SheetMetalRules.classType()
This is a static method.

#include <Fusion/SheetMetal/SheetMetalRules.h>

returnValue = adsk::fusion::SheetMetalRules::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


SheetMetalRules.count Property

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

The number of sheet metal rules in the collection.

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

# Get the value of the property.
propertyValue = sheetMetalRules_var.count
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
#include <Fusion/SheetMetal/SheetMetalRules.h>

// Get the value of the property.
uinteger propertyValue = sheetMetalRules_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2022


SheetMetalRules.isValid Property

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

# Get the value of the property.
propertyValue = sheetMetalRules_var.isValid
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
#include <Fusion/SheetMetal/SheetMetalRules.h>

// Get the value of the property.
boolean propertyValue = sheetMetalRules_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


SheetMetalRules.item Method

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

Function that returns the specified sheet metal rule using an index into the collection.

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
returnValue = sheetMetalRules_var.item(index)
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

#include <Fusion/SheetMetal/SheetMetalRules.h>

returnValue = sheetMetalRules_var->item(index);

Return Value

Type | Description
SheetMetalRule | 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 2022


SheetMetalRules.itemByName Method

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

Function that returns the specified sheet metal rule using the name of the rule.

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
returnValue = sheetMetalRules_var.itemByName(name)
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

#include <Fusion/SheetMetal/SheetMetalRules.h>

returnValue = sheetMetalRules_var->itemByName(name);

Return Value

Type | Description
SheetMetalRule | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the rule within the collection to return. This is the name seen in the Sheet Metal Rules dialog.

Version

Introduced in version November 2022


SheetMetalRules.objectType Property

Parent Object: SheetMetalRules
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRules.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.

# Get the value of the property.
propertyValue = sheetMetalRules_var.objectType
"sheetMetalRules_var" is a variable referencing a SheetMetalRules object.
#include <Fusion/SheetMetal/SheetMetalRules.h>

// Get the value of the property.
string propertyValue = sheetMetalRules_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


SheetMetalRuleValue Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

Used to get and set the current value of a value associated with a sheet metal rule. A value can be gotten or set using a string or a double. A string can contain equations and unit specifiers whereas a double defines the size in centimeters. In the user-interface, the user is always setting the string expression. However, when programming it is typically more convenient to set it using an explicit value. When the value is set using a double, Fusion creates an equivalent expression.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
expression | Gets and sets the expression of the sheet metal rule value. This can be an equation that includes the name "Thickness" and can also include length unit specifiers. For example, a valid expression is "Thickness / 2 + 1 mm". If no units are specified, the unit is implied and uses the units associated with the rule which can be mm or inch. For example an expression of "3" will be 3 inches if the rule units are inches or 3 mm if the rule units are millimeters.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Gets and sets the value of the sheet metal rule value in centimeters. Setting this value will create a new expression that is equivalent to the new value.

Accessed From

SheetMetalRule.bendRadius, SheetMetalRule.gap, SheetMetalRule.reliefDepth, SheetMetalRule.reliefRemnant, SheetMetalRule.reliefWidth, SheetMetalRule.thickness, SheetMetalRule.threeBendReliefRadius, SheetMetalRule.twoBendReliefSize

Version

Introduced in version November 2022


SheetMetalRuleValue.classType Method

Parent Object: SheetMetalRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SheetMetalRuleValue.classType()
This is a static method.

#include <Fusion/SheetMetal/SheetMetalRuleValue.h>

returnValue = adsk::fusion::SheetMetalRuleValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


SheetMetalRuleValue.expression Property

Parent Object: SheetMetalRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

Gets and sets the expression of the sheet metal rule value. This can be an equation that includes the name "Thickness" and can also include length unit specifiers. For example, a valid expression is "Thickness / 2 + 1 mm". If no units are specified, the unit is implied and uses the units associated with the rule which can be mm or inch. For example an expression of "3" will be 3 inches if the rule units are inches or 3 mm if the rule units are millimeters.

Syntax

  • Python
  • C++
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.

# Get the value of the property.
propertyValue = sheetMetalRuleValue_var.expression

# Set the value of the property.
sheetMetalRuleValue_var.expression = propertyValue
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.
#include <Fusion/SheetMetal/SheetMetalRuleValue.h>

// Get the value of the property.
string propertyValue = sheetMetalRuleValue_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = sheetMetalRuleValue_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2022


SheetMetalRuleValue.isValid Property

Parent Object: SheetMetalRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.

# Get the value of the property.
propertyValue = sheetMetalRuleValue_var.isValid
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.
#include <Fusion/SheetMetal/SheetMetalRuleValue.h>

// Get the value of the property.
boolean propertyValue = sheetMetalRuleValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


SheetMetalRuleValue.objectType Property

Parent Object: SheetMetalRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.

# Get the value of the property.
propertyValue = sheetMetalRuleValue_var.objectType
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.
#include <Fusion/SheetMetal/SheetMetalRuleValue.h>

// Get the value of the property.
string propertyValue = sheetMetalRuleValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


SheetMetalRuleValue.value Property

Parent Object: SheetMetalRuleValue
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/SheetMetalRuleValue.h>

Description

Gets and sets the value of the sheet metal rule value in centimeters. Setting this value will create a new expression that is equivalent to the new value.

Syntax

  • Python
  • C++
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.

# Get the value of the property.
propertyValue = sheetMetalRuleValue_var.value

# Set the value of the property.
sheetMetalRuleValue_var.value = propertyValue
"sheetMetalRuleValue_var" is a variable referencing a SheetMetalRuleValue object.
#include <Fusion/SheetMetal/SheetMetalRuleValue.h>

// Get the value of the property.
double propertyValue = sheetMetalRuleValue_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sheetMetalRuleValue_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


ShellFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Object that represents an existing shell feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setThicknesses | Method that sets the inside and outside thicknesses of the shell. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
shellType The shell type used when creating a shell. The default value is SharpOffsetShellType.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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.entityToken Property

Parent Object: ShellFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.entityToken
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
string propertyValue = shellFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ShellFeature.errorOrWarningMessage Property

Parent Object: ShellFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Gets the input faces/bodies.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Gets the inside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Gets the outside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Method that sets the inside and outside thicknesses of the shell.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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, the inside thickness is removed.
outsideThickness | ValueInput | ValueInput object that defines the outside thickness. If set to null, the outside thickness is removed.

Version

Introduced in version November 2014


ShellFeature.shellType Property

Parent Object: ShellFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

The shell type used when creating a shell. The default value is SharpOffsetShellType.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.shellType

# Set the value of the property.
shellFeature_var.shellType = propertyValue
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
ShellTypes propertyValue = shellFeature_var->shellType();

// Set the value of the property, where value_var is a ShellTypes.
bool returnValue = shellFeature_var->shellType(value_var);

Property Value

This is a read/write property whose value is a ShellTypes.

Version

Introduced in version May 2024


ShellFeature.timelineObject Property

Parent Object: ShellFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a shell feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
outsideThickness | Gets and sets the outside thickness.
shellType | The shell type used when creating a shell. The default value is SharpOffsetShellType.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

Gets and sets the inside thickness.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

Gets and sets the outside thickness.

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.

Samples

Name | Description
shellFeatures.add | Demonstrates creating a shell feature.

Version

Introduced in version November 2014


ShellFeatureInput.shellType Property

Parent Object: ShellFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

Description

The shell type used when creating a shell. The default value is SharpOffsetShellType.

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.shellType

# Set the value of the property.
shellFeatureInput_var.shellType = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
ShellTypes propertyValue = shellFeatureInput_var->shellType();

// Set the value of the property, where value_var is a ShellTypes.
bool returnValue = shellFeatureInput_var->shellType(value_var);

Property Value

This is a read/write property whose value is a ShellTypes.

Version

Introduced in version May 2024


ShellFeatureInput.targetBaseFeature Property

Parent Object: ShellFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Collection that provides access to all of the existing shell features in a component and supports the ability to create new shell features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Creates a new shell feature.

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
shellFeatures.add | Demonstrates creating a shell feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatures.classType Method

Parent Object: ShellFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

The number of shell features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

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.

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
shellFeatures.add | Demonstrates creating a shell feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatures.isValid Property

Parent Object: ShellFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Function that returns the specified shell feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

Function that returns the specified shell feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ShellFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SilhouetteSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Represents a silhouette type of curve selection. Allows BRepBody selections for the input geometry. Overrides the GeometrySelection's the value property to include setup bodies if isSetupModelSelected is set to true and the selection has been applied. The results may contain duplicates.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isSetupModelSelected | Flag to include all B-Rep bodies set as the setup models.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loopType | Desired loop type. The default is AllLoops.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sideType | Desired side type. The default is StartOutside.
silhouetteTolerance | Preview The distance the silhouette can differ from the model. This helps in creating a silhouette in situations where one cannot be created because of open contours.Generally, the tolerance value you use should be smaller than or equal to the machining tolerance.
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewSilhouetteSelection

Version

Introduced in version April 2023


SilhouetteSelection.classType Method

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SilhouetteSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/SilhouetteSelection.h>

returnValue = adsk::cam::SilhouetteSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


SilhouetteSelection.error Property

Parent Object: SilhouetteSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.error
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
string propertyValue = silhouetteSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


SilhouetteSelection.hasError Property

Parent Object: SilhouetteSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.hasError
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
boolean propertyValue = silhouetteSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


SilhouetteSelection.hasWarning Property

Parent Object: SilhouetteSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.hasWarning
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
boolean propertyValue = silhouetteSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


SilhouetteSelection.inputGeometry Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.inputGeometry

# Set the value of the property.
silhouetteSelection_var.inputGeometry = propertyValue
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = silhouetteSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = silhouetteSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version April 2023


SilhouetteSelection.isSetupModelSelected Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Flag to include all B-Rep bodies set as the setup models.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.isSetupModelSelected

# Set the value of the property.
silhouetteSelection_var.isSetupModelSelected = propertyValue
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
boolean propertyValue = silhouetteSelection_var->isSetupModelSelected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = silhouetteSelection_var->isSetupModelSelected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2023


SilhouetteSelection.isValid Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.isValid
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
boolean propertyValue = silhouetteSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


SilhouetteSelection.loopType Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Desired loop type. The default is AllLoops.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.loopType

# Set the value of the property.
silhouetteSelection_var.loopType = propertyValue
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
LoopTypes propertyValue = silhouetteSelection_var->loopType();

// Set the value of the property, where value_var is a LoopTypes.
bool returnValue = silhouetteSelection_var->loopType(value_var);

Property Value

This is a read/write property whose value is a LoopTypes.

Version

Introduced in version April 2023


SilhouetteSelection.objectType Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.objectType
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
string propertyValue = silhouetteSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


SilhouetteSelection.sideType Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Desired side type. The default is StartOutside.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.sideType

# Set the value of the property.
silhouetteSelection_var.sideType = propertyValue
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
SideTypes propertyValue = silhouetteSelection_var->sideType();

// Set the value of the property, where value_var is a SideTypes.
bool returnValue = silhouetteSelection_var->sideType(value_var);

Property Value

This is a read/write property whose value is a SideTypes.

Version

Introduced in version April 2023


SilhouetteSelection.silhouetteTolerance Property

Parent Object: SilhouetteSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

The distance the silhouette can differ from the model. This helps in creating a silhouette in situations where one cannot be created because of open contours.Generally, the tolerance value you use should be smaller than or equal to the machining tolerance.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.silhouetteTolerance

# Set the value of the property.
silhouetteSelection_var.silhouetteTolerance = propertyValue
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
double propertyValue = silhouetteSelection_var->silhouetteTolerance();

// Set the value of the property, where value_var is a double.
bool returnValue = silhouetteSelection_var->silhouetteTolerance(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2024


SilhouetteSelection.value Property

Parent Object: SilhouetteSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.value
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = silhouetteSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version April 2023


SilhouetteSelection.warning Property

Parent Object: SilhouetteSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SilhouetteSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.

# Get the value of the property.
propertyValue = silhouetteSelection_var.warning
"silhouetteSelection_var" is a variable referencing a SilhouetteSelection object.
#include <Cam/GeometrySelections/SilhouetteSelection.h>

// Get the value of the property.
string propertyValue = silhouetteSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


SilhouetteSplitFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Object that represents an existing silhouette split feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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.entityToken Property

Parent Object: SilhouetteSplitFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.entityToken
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SilhouetteSplitFeature.errorOrWarningMessage Property

Parent Object: SilhouetteSplitFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Gets the type of silhouette split operation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Gets and sets the solid body to split.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a silhouette split feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

Gets and sets the type of silhouette split operation to perform.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

Description

Gets and sets the solid body to split.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

Creates a new silhouette split feature.

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
silhouetteSplitFeatures.add | Demonstrates the silhouetteSplitFeatures.add method. The Silhouette Split feature is limited in the bodies it will split. The simplest body to get a valid result is to create a sphere and split it.
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


silhouetteSplitFeatures.add

Description

Demonstrates the silhouetteSplitFeatures.add method. The Silhouette Split feature is limited in the bodies it will split. The simplest body to get a valid result is to create a sphere and split it.

Code Samples

  • Python
def demo_silhouetteSplitFeatures_add(rootComp: adsk.fusion.Component):
    body = _ui.selectEntity('Select a body', 'Bodies').entity

    viewDirection = rootComp.zConstructionAxis
    operation = adsk.fusion.SilhouetteSplitOperations.SilhouetteSplitSolidBodyOperation
    silhouetteSplitFeatures = rootComp.features.silhouetteSplitFeatures
    input = silhouetteSplitFeatures.createInput(viewDirection, body, operation)
    silhouetteSplitFeature = silhouetteSplitFeatures.add(input)


SilhouetteSplitFeatures.classType Method

Parent Object: SilhouetteSplitFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

The number of Silhouette Split features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

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.

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
silhouetteSplitFeatures.add | Demonstrates the silhouetteSplitFeatures.add method. The Silhouette Split feature is limited in the bodies it will split. The simplest body to get a valid result is to create a sphere and split it.
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.isValid Property

Parent Object: SilhouetteSplitFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

Function that returns the specified silhouette split feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

Function that returns the specified silhouette split feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SilhouetteSplitFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Represents a sketch within a component.

Methods

Name | Description
addCenterToCenterSlot | Creates the geometry that represents a slot. Geometric constraints are automatically added to the geometry to maintain the slot shape and optionally, dimensions to control the size can be added. The created geometry and constraints are returned.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
createSpunProfile | Creates sketch geometry that represents the spun profile. The spun profile is the silhouette of the entities as if they were spinning around an axis. The created spun profile is based on the information provided by the SpunProfileInput object.
createSpunProfileInput | Creates a new SpunProfileInput object that is used to specify the input needed to create a spun profile.
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 | **RETIRED** 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 | **RETIRED** This method has been replaced by the project2 method, which supports specifying if the result will be linked or not.
project2 | Projects the specified entity or entities 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 | **RETIRED** Saves the contents of the sketch to a specified DXF file.
setCenterlineState | Method that sets the Centerline state for an array of sketch lines.
setConstructionState | Method that sets the Construction state for an array of sketch curves.
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 where the sketch is parametrically defined and is not related to a base or form feature. It also returns null in a direct modeling design.
boundingBox | Returns the 3D bounding box of the sketch
entityToken Returns a token for the Sketch object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same token.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property temporarily turns off sketch computing. It is used to increase the performance as sketch geometry is created and modified. Once the sketch is drawn, this property should be set to false to allow the sketch to recompute. The file does not save this setting and is always false when a file is opened.

There is a side-effect when using this property that can result in the creation of a bad model. This is only a problem when editing an existing sketch used by one or more features. When the sketch is edited with the isComputeDeferred property set to true, the compute of the profiles can sometimes create weird results in the dependent features. There are two easy ways to solve this problem. The first is not to defer the sketch compute. The second is to roll the timeline back to just after the sketch, make whatever changes you want to the sketch with the compute deferred, and then roll the timeline back to its original location. This process mimics the behavior you see in the user interface when you manually edit a sketch where Fusion automatically rolls the timeline back while you're editing the sketch.
isConstructionGeometryShown | Gets and sets whether construction geometry in the sketch is displayed. This provides access to the "Construction Geometries" setting in the "SKETCH PALETTE".
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.
isModelSliced | Gets and sets whether the model is sliced along the sketch plane when this sketch is active. This provides access to the "Slice" setting in the "SKETCH PALETTE".
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.
isProjectedGeometryShown | Gets and sets whether projected geometry in the sketch is displayed. This provides access to the "Projected Geometries" setting in the "SKETCH PALETTE".
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

The position of a parametric sketch cannot be modified since its position is defined by its parametric association to other geometry. As a result this property will fail when called on a parametric sketch. Setting this property is only valid for sketches in a non-parametric design or sketches owned by a base feature.
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, CoincidentToSurfaceConstraint.parentSketch, CollinearConstraint.parentSketch, ConcentricConstraint.parentSketch, EqualConstraint.parentSketch, GeometricConstraint.parentSketch, HorizontalConstraint.parentSketch, HorizontalPointsConstraint.parentSketch, LineOnPlanarSurfaceConstraint.parentSketch, LineParallelToPlanarSurfaceConstraint.parentSketch, MidPointConstraint.parentSketch, OffsetConstraint.parentSketch, ParallelConstraint.parentSketch, PerpendicularConstraint.parentSketch, PerpendicularToSurfaceConstraint.parentSketch, PolygonConstraint.parentSketch, Profile.parentSketch, ProfileCurve.parentSketch, RectangularPatternConstraint.parentSketch, Sketch.createForAssemblyContext, Sketch.nativeObject, SketchAngularDimension.parentSketch, SketchArc.parentSketch, SketchCircle.parentSketch, SketchConcentricCircleDimension.parentSketch, SketchConicCurve.parentSketch, SketchControlPointSpline.parentSketch, SketchCurve.parentSketch, SketchDiameterDimension.parentSketch, SketchDimension.parentSketch, SketchDistanceBetweenLineAndPlanarSurfaceDimension.parentSketch, SketchDistanceBetweenPointAndSurfaceDimension.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, SketchLinearDiameterDimension.parentSketch, SketchLinearDimension.parentSketch, SketchOffsetCurvesDimension.parentSketch, SketchOffsetDimension.parentSketch, SketchPoint.parentSketch, SketchRadialDimension.parentSketch, SketchTangentDistanceDimension.parentSketch, SketchText.parentSketch, SmoothConstraint.parentSketch, SymmetryConstraint.parentSketch, TangentConstraint.parentSketch, VerticalConstraint.parentSketch, VerticalPointsConstraint.parentSketch

Samples

Name | Description
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
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.addCenterToCenterSlot Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Creates the geometry that represents a slot. Geometric constraints are automatically added to the geometry to maintain the slot shape and optionally, dimensions to control the size can be added. The created geometry and constraints are returned.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
# Uses no optional arguments.
returnValue = sketch_var.addCenterToCenterSlot(startPoint, endPoint, width)

# Uses optional arguments.
returnValue = sketch_var.addCenterToCenterSlot(startPoint, endPoint, width, createWidthDimension, length, angle)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

// Uses no optional arguments.
returnValue = sketch_var->addCenterToCenterSlot(startPoint, endPoint, width);

// Uses optional arguments.
returnValue = sketch_var->addCenterToCenterSlot(startPoint, endPoint, width, createWidthDimension, length, angle);

Return Value

Type | Description
Base[] | Returns an array containing the start point arc, the end arc, the two lines that define the slot, the construction line between the two points, and optionally, the construction line the angle is measured from if an angle is specified, and the dimension constraints that were created in the order of width, length, and angle.

Parameters

Name | Type | Description
startPoint | Base | The start point of the slot. It can be a SketchPoint or Point3D object. If a SketchPoint is provided a coincident constraint will be created between the start point of the slot and the provided sketch point.
endPoint | Base | The end point of the slot. It can be a SketchPoint or Point3D object. This point defines the length of the slot. If a SketchPoint is provided a coincident constraint is created between the end point of the slot and the provided sketch point. If the length or angle arguments are provided, the point is not the actual end point but is used to determine the direction of the slot.
width | ValueInput | A ValueInput object that defines the width of the slot. The ValueInput can define either a real value or an expression string. If it is a real value, it defines the width of the slot in centimeters. When using a ValueInput created using a string, it's the same as creating a parameter in the user-interface. You can specify any valid expression, i.e. "5", "5 in", "5 in / 2", "5 + Length" that defines a length.
createWidthDimension | boolean | Specifies if a dimension constraint and its associated parameter is created to control the width of the slot. This is an optional argument whose default value is False.
length | ValueInput | Optional argument that defines the length of the slot using a ValueInput. If this is provided, it overrides the endPoint and explicitly defines the length of the slot. If the length is specified, a dimension constraint and its associated parameter is created to control the length. The ValueInput can define either a real value or an expression string. If it is a real value, it defines the length of the slot in centimeters. When it is an expression string, it's the same as creating a parameter in the user-interface. You can specify any valid expression, i.e. "5", "5 in", "5 in / 2", "5 + Length" that defines a length. This is an optional argument whose default value is null.
angle | ValueInput | Optional argument that defines the angle of the slot using a ValueInput. If this is provided, it overrides the endPoint and explicitly defines the angle of the slot. If the angle is specified, a horizontal construction line, a dimension constraint, and its associated parameter is created to control the angle. The angle is measured from a horizontal line that starts at that start point and goes in the positive X direction. The angle is always less than 180 deg. and depending on the location of the end point, the angle will be clockwise or counterclockwise from the horizontal line. The ValueInput can define either a real value or an expression string. If it is a real value, it defines the angle of the slot in radians. When it is an expression string, it's the same as creating a parameter in the user-interface. You can specify any valid expression, i.e. "45", "45 deg", "180 / 3", "Sweep * 2" that defines an angle. This is an optional argument whose default value is null.

Version

Introduced in version May 2025


Sketch.areConstraintsShown Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Indicates if the constraints of the sketch are displayed when the sketch is active.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Indicates if the dimensions of the sketch are displayed when the sketch is not active (in sketch edit mode)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Indicates if the profiles of the sketch are displayed

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This property returns the base or form feature that this sketch is associated with. It returns null in the case where the sketch is parametrically defined and is not related to a base or form feature. It also returns null in a direct modeling design.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the 3D bounding box of the sketch

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Copies the specified sketch entities, applying the specified transform. Any geometric or dimension constraints associated with the entities will automatically be copied, if possible. For example, if there is a horizontal dimension and the transform defines a rotation then it will not be included in the result. This same behavior can be seen when performing a copy/paste operation in the user interface.

Syntax

  • 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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.createSpunProfile Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Creates sketch geometry that represents the spun profile. The spun profile is the silhouette of the entities as if they were spinning around an axis. The created spun profile is based on the information provided by the SpunProfileInput object.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.createSpunProfile(input)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->createSpunProfile(input);

Return Value

Type | Description
SketchEntity[] | An array of sketch entities that were created as a result of the spun profile.

Parameters

Name | Type | Description
input | SpunProfileInput | The SpunProfileInput object that specifies the input needed to create the spun profile.

Version

Introduced in version November 2024


Sketch.createSpunProfileInput Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Creates a new SpunProfileInput object that is used to specify the input needed to create a spun profile.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.createSpunProfileInput(entities, axis)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->createSpunProfileInput(entities, axis);

Return Value

Type | Description
SpunProfileInput | Returns the newly created SpunProfileInput object or null if the creation failed.

Parameters

Name | Type | Description
entities | Base[] | An array containing the entities (BRepBody or BRepFace) to create a spun profile.
axis | Base | The axis can be a sketch line, construction axis, or linear edge. The axis must not be perpendicular to the sketch plane.

Version

Introduced in version November 2024


Sketch.deleteMe Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Deletes the sketch.

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.entityToken Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns a token for the Sketch object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same token.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.entityToken
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
string propertyValue = sketch_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


Sketch.errorOrWarningMessage Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
GeometricConstraint.addHorizontal | Demonstrates the GeometricConstraint.addHorizontal method.
GeometricConstraint.addHorizontalPoints | Demonstrates the GeometricConstraint.addHorizontalPoints method.
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
GeometricConstraints.addCollinear | Demonstrates the GeometricConstraints.addCollinear method.
GeometricConstraints.addConcentric | Demonstrates the GeometricConstraints.addConcentric method.
GeometricConstraints.addEqual | Demonstrates the GeometricConstraints.addEqual method.
GeometricConstraints.addParallel | Demonstrate the GeometricConstraints.addParallel method.
GeometricConstraints.addPerpendicular | Demonstrates the GeometricConstraints.addPerpendicular method.
GeometricConstraints.addSmooth | Demonstrate the GeometricConstraints.addSmooth method.
GeometricConstraints.addSymmetry | Demonstrates the GeometricConstraints.addSymmetry method.
GeometricConstraints.addTangent | Demonstrates the GeometricConstraints.addTangent method.
GeometricConstraints.addVertical | Demonstrates the GeometricConstraints.addVertical method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.

Version

Introduced in version August 2014


Sketch.healthState Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the current health state of this sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Imports the contents of an SVG file into the active sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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 API Sample | 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This property temporarily turns off sketch computing. It is used to increase the performance as sketch geometry is created and modified. Once the sketch is drawn, this property should be set to false to allow the sketch to recompute. The file does not save this setting and is always false when a file is opened.

There is a side-effect when using this property that can result in the creation of a bad model. This is only a problem when editing an existing sketch used by one or more features. When the sketch is edited with the isComputeDeferred property set to true, the compute of the profiles can sometimes create weird results in the dependent features. There are two easy ways to solve this problem. The first is not to defer the sketch compute. The second is to roll the timeline back to just after the sketch, make whatever changes you want to the sketch with the compute deferred, and then roll the timeline back to its original location. This process mimics the behavior you see in the user interface when you manually edit a sketch where Fusion automatically rolls the timeline back while you're editing the sketch.

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.isConstructionGeometryShown Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Gets and sets whether construction geometry in the sketch is displayed. This provides access to the "Construction Geometries" setting in the "SKETCH PALETTE".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isConstructionGeometryShown

# Set the value of the property.
sketch_var.isConstructionGeometryShown = 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->isConstructionGeometryShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isConstructionGeometryShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


Sketch.isFullyConstrained Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Indicates if this sketch is fully constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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.isModelSliced Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Gets and sets whether the model is sliced along the sketch plane when this sketch is active. This provides access to the "Slice" setting in the "SKETCH PALETTE".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isModelSliced

# Set the value of the property.
sketch_var.isModelSliced = 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->isModelSliced();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isModelSliced(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


Sketch.isParametric Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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.isProjectedGeometryShown Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Gets and sets whether projected geometry in the sketch is displayed. This provides access to the "Projected Geometries" setting in the "SKETCH PALETTE".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isProjectedGeometryShown

# Set the value of the property.
sketch_var.isProjectedGeometryShown = 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->isProjectedGeometryShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isProjectedGeometryShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2024


Sketch.isValid Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

A specified point in model space returns the equivalent point in sketch space. This is sensitive to the assembly context.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Moves the specified sketch entities using the specified transform. Transform respects any constraints that would normally prohibit the move.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Gets and sets the name of this sketch as seen in the browser and timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

To access the full capabilities supported by offset, you should use the createOffsetInput and addOffset2 methods.

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 API Sample | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014
Retired in version September 2024


Sketch.origin Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the origin point of the sketch in model space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the sketch point that was automatically created by projecting the origin construction point into the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the parent Component.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the profiles currently computed for the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This function is retired. See more information in the 'Remarks' section below.

This method has been replaced by the project2 method, which supports specifying if the result will be linked or not.

Remarks

Projects the specified entity or entities onto the x-y plane of the sketch and returns the created sketch entity(s). You can provide either a single entity or an ObjectCollection of multiple entities, which will be projected simultaneously.

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 single entity of the following types: sketch entity, an edge, a face (which will 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. This can also be an ObjectCollection that contains multiple entities and will be projected simultaneously. The entities that can be projected must be the types and have the same restrictions as described above.

Version

Introduced in version August 2014
Retired in version May 2025


Sketch.project2 Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Projects the specified entity or entities onto the X-Y plane of the sketch and returns the created sketch entity(s).

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.project2(entities, isLinked)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->project2(entities, isLinked);

Return Value

Type | Description
SketchEntity[] | Returns an array of the sketch entities that were created as a result of the projection.

Parameters

Name | Type | Description
entities | Base[] | An array containing the entities to project. It can be an array of one for the case where a single entity is being projected. The following types of entities are valid for projection: sketch curves and points, B-Rep bodies (which results in projecting the silhouette of the body), B-Rep edges, B-Rep faces (which results in projecting all of its edges), B-Rep vertices, construction axes, construction points, and construction planes that are perpendicular to the sketch which results in the creation of a line.
isLinked | boolean | A Boolean that indicates if the resulting sketch curves will be parametrically linked to the source geometry that was projected. If true, they will be linked. If false, the resulting curves are independent.

Version

Introduced in version May 2025


Sketch.projectCutEdges Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Intersects the specified body with the sketch plane and creates new curves representing the intersection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
# Uses no optional arguments.
returnValue = sketch_var.projectToSurface(faces, curves, projectType)

# Uses optional arguments.
returnValue = sketch_var.projectToSurface(faces, curves, projectType, directionEntity)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

// Uses no optional arguments.
returnValue = sketch_var->projectToSurface(faces, curves, projectType);

// Uses optional arguments.
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. This is an optional argument whose default value is null.

Samples

Name | Description
Project To Surface API Sample | Projects the specified set of curves onto the specified set of faces using the specified method of projection.

Version

Introduced in version September 2017


Sketch.redefine Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Changes which plane the sketch is based on.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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 API Sample | Sketch related functions

Version

Introduced in version September 2017


Sketch.saveAsDXF Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Saves the contents of the sketch to a specified DXF file.

Remarks

This method has been replaced by using the ExportManager.createDXFSketchExportOptions method, which provides additional capabilities.

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
Retired in version July 2025


Sketch.setCenterlineState Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Method that sets the Centerline state for an array of sketch lines.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.setCenterlineState(sketchLines, centerlineState)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->setCenterlineState(sketchLines, centerlineState);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchLines | SketchLine[] | An array of sketch lines to set the centerline status
centerlineState | SketchLineCenterlineStates | Input enum value that specifies if the centerline state of the input lines should be toggled, set to centerline, or set to normal

Version

Introduced in version March 2024


Sketch.setConstructionState Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Method that sets the Construction state for an array of sketch curves.

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.setConstructionState(sketchCurves, constructionState)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->setConstructionState(sketchCurves, constructionState);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchCurves | SketchCurve[] | An array of sketch curves to set the construction status.
constructionState | SketchCurveConstructionStates | Input enum value that specifies if the construction state of the input curves should be toggled, set to construction, or set to normal.

Version

Introduced in version March 2024


Sketch.sketchCurves Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
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.
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.
SketchArcs.extend | Demonstrates the SketchArc.extend method.
SketchArcs.split | Demonstrates the SketchArc.split method.
SketchArcs.trim | Demonstrates the SketchArc.trim method.
SketchCircles.addByThreePoints | Demonstrates the SketchCircles.addByThreePoints method.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoPoints | Demonstrates the SketchCircles.addByTwoPoints method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.
SketchDimensions.addDiameterDimension | Demonstrates the SketchDimension.addDiameterDimension method.
SketchEllipses.add | Demonstrates the SketchEllipses.add method.
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.
SketchLines.addDistanceChamfer | Demonstrates the SketchLines.addDistanceChamfer method.
SketchLines.addThreePointRectangle | Demonstrates the SketchLines.addThreePointRectangle method.
SketchLines.addTwoPointRectangle | Demonstrates the SketchLines.addTwoPointRectangle method.

Version

Introduced in version August 2014


Sketch.sketchDimensions Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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.

Samples

Name | Description
SketchDimensions.addOffsetDimension | Demonstrates the SketchDimension.addOffsetDimension method.

Version

Introduced in version August 2014


Sketch.sketchPoints Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

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.

Samples

Name | Description
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
SketchPoint.add | Demonstrates the SketchPoint.add method.

Version

Introduced in version August 2014


Sketch.sketchTexts Property

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the sketch text collection associated with this sketch. This provides access to existing text and supports the creation of new text.

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.

Samples

Name | Description
SketchTextInput.setAsAlongPath | Demonstrates the SketchTextInput.setAsAlongPath method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version January 2015


Sketch.sketchToModelSpace Method

Parent Object: Sketch
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

A specified point in sketch space returns the equivalent point in model space. This is sensitive to the assembly context.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the timeline object associated with this sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

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.

The position of a parametric sketch cannot be modified since its position is defined by its parametric association to other geometry. As a result this property will fail when called on a parametric sketch. Setting this property is only valid for sketches in a non-parametric design or sketches owned by a base feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the X direction of the sketch as defined in model space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketch.h>

Description

Returns the Y direction of the sketch as defined in model space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

An angular dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchAngularDimension.createForAssemblyContext, SketchAngularDimension.nativeObject, SketchDimensions.addAngularDimension

Version

Introduced in version August 2014


SketchAngularDimension.assemblyContext Property

Parent Object: SketchAngularDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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.entityToken Property

Parent Object: SketchAngularDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.entityToken
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
string propertyValue = sketchAngularDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchAngularDimension.isDeletable Property

Parent Object: SketchAngularDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

The first line being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

The second line being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchAngularDimension.value Property

Parent Object: SketchAngularDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchAngularDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.value

# Set the value of the property.
sketchAngularDimension_var.value = propertyValue
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
double propertyValue = sketchAngularDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchAngularDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchArc Object

Derived from: SketchCurve Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

An arc in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.addByCenterStartEnd, SketchArcs.addByCenterStartSweep, SketchArcs.addByThreePoints, SketchArcs.addFillet, SketchArcs.item, SketchFittedSpline.activateCurvatureHandle, SketchFittedSpline.getCurvatureHandle

Version

Introduced in version August 2014


SketchArc.assemblyContext Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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.

Samples

Name | Description
SketchArcs.breakCurve | Demonstrates the SketchArc.breakCurve method.

Version

Introduced in version August 2014


SketchArc.centerSketchPoint Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


SketchArc.classType Method

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

Remarks

Sketch arcs always exist in a counterclockwise direction. If you created the sketch arc that would define a clockwise arc, the created sketch arc will be counterclockwise which means the start and end points may be opposite of what you expect.

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.entityToken Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.entityToken
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
string propertyValue = sketchArc_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchArc.extend Method

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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.

Samples

Name | Description
SketchArcs.extend | Demonstrates the SketchArc.extend method.

Version

Introduced in version August 2014


SketchArc.geometricConstraints Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the transient geometry of the arc which provides geometric information about the arc. The returned geometry is always in sketch space.

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


SketchArc.intersections Method

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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 the method was successful. It can be successful regardless of whether intersections were found or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isLinked
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchArc.isReference Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Split a curve at a position specified along the curve

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.

Samples

Name | Description
SketchArcs.split | Demonstrates the SketchArc.split method.

Version

Introduced in version August 2014


SketchArc.startSketchPoint Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

Remarks

Sketch arcs always exist in a counterclockwise direction. If you created the sketch arc that would define a clockwise arc, the created sketch arc will be counterclockwise which means the start and end points may be opposite of what you expect.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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.

Samples

Name | Description
SketchArcs.trim | Demonstrates the SketchArc.trim method.

Version

Introduced in version August 2014


SketchArc.worldGeometry Property

Parent Object: SketchArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

The collection of arcs in a sketch. This provides access to the existing arcs and supports the methods to create new arcs.

Methods

Name | Description
addByCenterStartEnd | Creates a sketch arc that is centered at the specified point and between the two input points.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchArcs

Samples

Name | Description
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.
SketchArcs.breakCurve | Demonstrates the SketchArc.breakCurve method.
SketchArcs.extend | Demonstrates the SketchArc.extend method.
SketchArcs.split | Demonstrates the SketchArc.split method.
Sketch fillet and offset API Sample | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


SketchArcs.addByCenterStartSweep

Description

Demonstrates the SketchArcs.addByCenterStartSweep method.

Code Samples

  • Python
def demo_Arcs_addByCenterStartSweep(sketch: adsk.fusion.Sketch):
    # Define two points and specify the sweep angle
    startPoint = adsk.core.Point3D.create(5, 5, 0)
    centerPoint = adsk.core.Point3D.create(15, 0, 0)
    sweepAngle = -135.0

    # Create an arc centered at the specified point
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByCenterStartSweep(centerPoint, startPoint, sweepAngle)


SketchArcs.addByCenterStartEnd Method

Parent Object: SketchArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Creates a sketch arc that is centered at the specified point and between the two input points.

Remarks

Sketch arcs always exist in a counterclockwise direction. Even though you can provide the start and end points that define an arc that will have a clockwise direction, the result will still be a counterclockwise arc. This means if you query the created sketch arc, the start and end points may be opposite of what you expect.

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.
# Uses no optional arguments.
returnValue = sketchArcs_var.addByCenterStartEnd(centerPoint, startPoint, endPoint)

# Uses optional arguments.
returnValue = sketchArcs_var.addByCenterStartEnd(centerPoint, startPoint, endPoint, normal)
"sketchArcs_var" is a variable referencing a SketchArcs object.

#include <Fusion/Sketch/SketchArcs.h>

// Uses no optional arguments.
returnValue = sketchArcs_var->addByCenterStartEnd(centerPoint, startPoint, endPoint);

// Uses optional arguments.
returnValue = sketchArcs_var->addByCenterStartEnd(centerPoint, startPoint, endPoint, normal);

Return Value

Type | Description
SketchArc | Returns the newly created SketchArc or null in the case of a failure.

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. This can be either an existing SketchPoint or a Point3D object.
endPoint | Base | The end point of the arc. This can be either an existing SketchPoint or a Point3D object. If the end point does not lie on the arc, a new point would be created such that it lies on the arc.
normal | Vector3D | An optional argument that specifies the normal of the plane the arc will be created on. If not supplied, a vector in the positive Z direction will be used, which results in the creation of an arc that is parallel to the X-Y plane of the sketch. However, you can specify a normal vector to orient the arc in any orientation. The normal also helps to control the sweep direction of the arc, where the sweep direction is always counterclockwise from the start to the end point, where counterclockwise is defined using the right-hand rule around the normal vector. This is an optional argument whose default value is null.

Version

Introduced in version January 2024


SketchArcs.addByCenterStartSweep Method

Parent Object: SketchArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Creates a sketch arc that is always parallel to the x-y plane of the sketch and is centered at the specified point.

Remarks

Sketch arcs always exist in a counterclockwise direction. Even though you can specify a negative sweep to define an arc in a clockwise direction, the result will still be a counterclockwise arc. This means if you query the created sketch arc, the start and end points may be opposite of what you expect.

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.

Samples

Name | Description
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.

Version

Introduced in version August 2014


SketchArcs.addByThreePoints Method

Parent Object: SketchArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Creates a sketch arc that passes through the three points.

Remarks

Sketch arcs always exist in a counterclockwise direction. Even though you can provide three that define an arc that will have a clockwise direction, the result will still be a counterclockwise arc. This means if you query the created sketch arc, the start and end points may be opposite of what you expect.

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.

Samples

Name | Description
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.breakCurve | Demonstrates the SketchArc.breakCurve method.
SketchArcs.extend | Demonstrates the SketchArc.extend method.
SketchArcs.split | Demonstrates the SketchArc.split method.
SketchArcs.trim | Demonstrates the SketchArc.trim method.

Version

Introduced in version August 2014


SketchArcs.addByThreePoints

Description

Demonstrates the SketchArcs.addByThreePoints method.

Code Samples

  • Python
def demo_Arcs_addByThreePoints(sketch: adsk.fusion.Sketch):
    # Define three points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    alongPoint = adsk.core.Point3D.create(5, 0, 0)
    endPoint = adsk.core.Point3D.create(8, 7, 0)

    # Create an arc using three points along the arc.
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByThreePoints(startPoint, alongPoint, endPoint)


SketchArcs.addFillet Method

Parent Object: SketchArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

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

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 API Sample | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


SketchArcs.addFillet

Description

Demonstrates the SketchArcs.addFillet method.

Code Samples

  • Python
def demo_Arcs_addFillet(sketch: adsk.fusion.Sketch):
    # Create two connected lines
    lines = sketch.sketchCurves.sketchLines
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    endPoint = adsk.core.Point3D.create(3, 1, 0)
    line1 = lines.addByTwoPoints(startPoint, endPoint)
    line2 = lines.addByTwoPoints(line1.endSketchPoint, adsk.core.Point3D.create(1, 4, 0))

    # Create arc by adding fillet between the two lines
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addFillet(line1, line1.endSketchPoint.geometry, line2, line2.startSketchPoint.geometry, 1)


SketchArcs.classType Method

Parent Object: SketchArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Returns the number of arcs in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

Function that returns the specified sketch arc using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchArcs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

A circle in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the area of the circle in square centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the sketch point at the center of the circle.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Deletes the entity from the sketch.

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.entityToken Property

Parent Object: SketchCircle
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.entityToken
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
string propertyValue = sketchCircle_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchCircle.extend Method

Parent Object: SketchCircle
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the transient geometry of the circle which provides geometric information about the circle. The returned geometry is always in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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 the method was successful. It can be successful regardless of whether intersections were found or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchCircle
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isLinked
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchCircle.isReference Property

Parent Object: SketchCircle
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Gets and sets the radius of the circle. Changing the radius is limited by any constraints that might exist on the circle.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircle.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

The collection of circles in a sketch. This provides access to the existing circles and supports the methods to create new circles.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchCircles

Samples

Name | Description
Create circle by center and radius API Sample | Demonstrates creating a sketch circle by the center and radius.
Create Circle By 3 Tangents API Sample | 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.
SketchCircles.addByCenterRadius | Demonstrates the SketchCircles.addByCenterRadius method.
SketchCircles.addByThreePoints | Demonstrates the SketchCircles.addByThreePoints method.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoPoints | Demonstrates the SketchCircles.addByTwoPoints method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.

Version

Introduced in version August 2014


SketchCircles.addByCenterRadius Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Creates a sketch circle that is always parallel to the x-y plane of the sketch and is centered at the specified point.

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 API Sample | Demonstrates creating a sketch circle by the center and radius.
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
GeometricConstraints.addConcentric | Demonstrates the GeometricConstraints.addConcentric method.
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.
SketchCircles.addByCenterRadius | Demonstrates the SketchCircles.addByCenterRadius method.

Version

Introduced in version August 2014


SketchCircles.addByCenterRadius

Description

Demonstrates the SketchCircles.addByCenterRadius method.

Code Samples

  • Python
def demo_Circles_addByCenterRadius(sketch: adsk.fusion.Sketch):
    # Define a center point and radius
    centerPoint = adsk.core.Point3D.create(0, 0, 0)
    radius = 2

    # Create a circle using the center point and radius
    circles = sketch.sketchCurves.sketchCircles
    circle = circles.addByCenterRadius(centerPoint, radius)


SketchCircles.addByThreePoints Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Creates a sketch circle that passes through the three points. The three points must lie on the x-y plane of the sketch.

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.

Samples

Name | Description
SketchCircles.addByThreePoints | Demonstrates the SketchCircles.addByThreePoints method.

Version

Introduced in version August 2014


SketchCircles.addByThreePoints

Description

Demonstrates the SketchCircles.addByThreePoints method.

Code Samples

  • Python
def demo_Circles_addByThreePoints(sketch: adsk.fusion.Sketch):
    # Define three points
    pointOne = adsk.core.Point3D.create(0, 0, 0)
    pointTwo = adsk.core.Point3D.create(5, 5, 0)
    pointThree = adsk.core.Point3D.create(9, 14, 0)

    # Create a circle based on the points
    circles = sketch.sketchCurves.sketchCircles
    circle = circles.addByThreePoints(pointOne, pointTwo, pointThree)


SketchCircles.addByThreeTangents Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

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.

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 API Sample | Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.

Version

Introduced in version August 2014


SketchCircles.addByThreeTangents

Description

Demonstrates the SketchCircles.addByThreeTangets method.

Code Samples

  • Python
def demo_Circles_addByThreeTangents(sketch: adsk.fusion.Sketch):
    # Create three lines and a point
    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))
    hintPoint = adsk.core.Point3D.create(0, 0, 0)

    # Create a circle based on the lines
    circles = sketch.sketchCurves.sketchCircles
    circle = circles.addByThreeTangents(line1, line2, line3, hintPoint)


SketchCircles.addByTwoPoints Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

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.

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.

Samples

Name | Description
SketchCircles.addByTwoPoints | Demonstrates the SketchCircles.addByTwoPoints method.
SketchDimensions.addConcentricCicleDimension | Demonstrates the SketchDimension.addConcentricCircleDimension method.
SketchDimensions.addDiameterDimension | Demonstrates the SketchDimension.addDiameterDimension method.

Version

Introduced in version August 2014


SketchCircles.addByTwoPoints

Description

Demonstrates the SketchCircles.addByTwoPoints method.

Code Samples

  • Python
def demo_Circles_addByTwoPoints(sketch: adsk.fusion.Sketch):
    # Define two points
    pointOne = adsk.core.Point3D.create(1, 1, 0)
    pointTwo = adsk.core.Point3D.create(8, 8, 0)

    # Create a circle based on the two points
    circles = sketch.sketchCurves.sketchCircles
    circle = circles.addByTwoPoints(pointOne, pointTwo)


SketchCircles.addByTwoTangents Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

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.

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.

Samples

Name | Description
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.

Version

Introduced in version August 2014


SketchCircles.addByTwoTangents

Description

Demonstrates the SketchCircles.addByTwoTangets method.

Code Samples

  • Python
def demo_Circles_addByTwoTangents(sketch: adsk.fusion.Sketch):
    # Create three lines.
    lines = sketch.sketchCurves.sketchLines
    line1 = lines.addByTwoPoints(adsk.core.Point3D.create(-10, 0, 0), adsk.core.Point3D.create(10, 0, 0))
    line2 = lines.addByTwoPoints(adsk.core.Point3D.create(0, -10, 0), adsk.core.Point3D.create(0, 10, 0))

    # Define a hint point to create the circle in the positive quadrant.
    hintPoint = adsk.core.Point3D.create(5, 5, 0)

    # Create a circle that is tangent to the two lines.
    circles = sketch.sketchCurves.sketchCircles
    circle = circles.addByTwoTangents(line1, line2, 5, hintPoint)

    # If you want tangent constraints between the circle and the line, you need to create them.
    geomConstraints = sketch.geometricConstraints
    geomConstraints.addTangent(line1, circle)
    geomConstraints.addTangent(line2, circle)


SketchCircles.classType Method

Parent Object: SketchCircles
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Returns the number of circles in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

Function that returns the specified sketch circle using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCircles.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

A concentric circle dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchConcentricCircleDimension.createForAssemblyContext, SketchConcentricCircleDimension.nativeObject, SketchDimensions.addConcentricCircleDimension

Version

Introduced in version August 2014


SketchConcentricCircleDimension.assemblyContext Property

Parent Object: SketchConcentricCircleDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns the first concentric circle or arc.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns the second concentric circle or arc.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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.entityToken Property

Parent Object: SketchConcentricCircleDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.entityToken
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
string propertyValue = sketchConcentricCircleDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchConcentricCircleDimension.isDeletable Property

Parent Object: SketchConcentricCircleDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchConcentricCircleDimension.value Property

Parent Object: SketchConcentricCircleDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConcentricCircleDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.value

# Set the value of the property.
sketchConcentricCircleDimension_var.value = propertyValue
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
double propertyValue = sketchConcentricCircleDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchConcentricCircleDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchConicCurve Object

Derived from: SketchCurve Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

The SketchConicCurve class represents conic curves in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
rhoValue | Get and sets the rho value for the curve. The value must be greater than zero and less than one.
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.add, SketchConicCurves.item

Version

Introduced in version January 2015


SketchConicCurve.apexSketchPoint Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

The sketch point at the apex of the conic curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

The sketch point at the end of the curve.

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.entityToken Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.entityToken
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
string propertyValue = sketchConicCurve_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchConicCurve.evaluator Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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 the method was successful. It can be successful regardless of whether intersections were found or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isLinked
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchConicCurve.isReference Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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.rhoValue Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Get and sets the rho value for the curve. The value must be greater than zero and less than one.

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.rhoValue

# Set the value of the property.
sketchConicCurve_var.rhoValue = propertyValue
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
double propertyValue = sketchConicCurve_var->rhoValue();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchConicCurve_var->rhoValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


SketchConicCurve.sketchDimensions Property

Parent Object: SketchConicCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

The sketch point at the start of the curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

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.

Methods

Name | Description
add | Creates a new conic 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchConicCurves

Version

Introduced in version January 2015


SketchConicCurves.add Method

Parent Object: SketchConicCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

Creates a new conic curve.

Syntax

  • Python
  • C++
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.
returnValue = sketchConicCurves_var.add(startPoint, endPoint, apexPoint, rhoValue)
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.

#include <Fusion/Sketch/SketchConicCurves.h>

returnValue = sketchConicCurves_var->add(startPoint, endPoint, apexPoint, rhoValue);

Return Value

Type | Description
SketchConicCurve | Returns the new conic curve or null if the creation failed.

Parameters

Name | Type | Description
startPoint | Base | The start point of the conic curve. This can be either an existing SketchPoint or a Point3D object.
endPoint | Base | The end point of the conic curve. This can be either an existing SketchPoint or a Point3D object.
apexPoint | Base | The apex point of the conic curve. This can be either an existing SketchPoint or a Point3D object.
rhoValue | double | Double that specifies the rho value for the conic. This value must be greater than zero and less than one.

Version

Introduced in version May 2022


SketchConicCurves.classType Method

Parent Object: SketchConicCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

Returns the number of conic curves in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

Function that returns the specified conic curve using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchConicCurves.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SketchControlPointSpline Object

Derived from: SketchCurve Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

A control point spline in a sketch.

Methods

Name | Description
addControlPoint | Adds an additional control point to the control point spline. Inserting a new control point does not change the shape of the curve, but the control frame will be re-computed and the control points will be adjusted to maintain the current shape. This method will fail in the case where the control frame is not displayed. You can check for this by using the is isControlFrameDisplayed.
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 (Point3D)
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.
controlFrameLines | Returns the sketch lines that represent the control frame of the spline. The lines are in sequential order starting with the line that connects to the starting control point to the end.
controlPoints Returns the set of sketch points that the control frame of 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.

Deleting one of the sketch points will remove that point from the control frame and the curve will be recomputed.
degree | Gets and sets the degree of the spline.
endSketchPoint | The sketch point at the end of the spline. If the curve is closed the start and end sketch points will be the same.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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. Use the worldGeometry property to get it in the model's design space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isControlFrameDisplayed | Gets and sets if the control frame of the curve is currently displayed. Using this property is useful to be able to determine if the controlPoints and controlFrameLines properties will return useful information or not and if the addControlPoint method will succeed or not.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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. If the curve is closed the start and end sketch points will be the same.
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

SketchControlPointSpline.createForAssemblyContext, SketchControlPointSpline.nativeObject, SketchControlPointSplines.add, SketchControlPointSplines.item

Version

Introduced in version July 2022


SketchControlPointSpline.addControlPoint Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Adds an additional control point to the control point spline. Inserting a new control point does not change the shape of the curve, but the control frame will be re-computed and the control points will be adjusted to maintain the current shape.

This method will fail in the case where the control frame is not displayed. You can check for this by using the is isControlFrameDisplayed.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
returnValue = sketchControlPointSpline_var.addControlPoint(parameter)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

returnValue = sketchControlPointSpline_var->addControlPoint(parameter);

Return Value

Type | Description
boolean | Returns true if adding the control point was successful.

Parameters

Name | Type | Description
parameter | double | The parameter position that defines where to insert the new control point. The parameter value must be within the parametric range of the curve. This can be determined by using the getParameterExtents method of the CurveEvaluator3D returned by the evaluator property.

Version

Introduced in version July 2022


SketchControlPointSpline.assemblyContext Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.assemblyContext
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchControlPointSpline_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2022


SketchControlPointSpline.attributes Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.attributes
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchControlPointSpline_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2022


SketchControlPointSpline.boundingBox Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the bounding box of the entity in sketch space.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.boundingBox
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchControlPointSpline_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version July 2022


SketchControlPointSpline.breakCurve Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
# Uses no optional arguments.
returnValue = sketchControlPointSpline_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchControlPointSpline_var.breakCurve(segmentPoint, createConstraints)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

// Uses no optional arguments.
returnValue = sketchControlPointSpline_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchControlPointSpline_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 July 2022


SketchControlPointSpline.classType Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchControlPointSpline.classType()
This is a static method.

#include <Fusion/Sketch/SketchControlPointSpline.h>

returnValue = adsk::fusion::SketchControlPointSpline::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2022


SketchControlPointSpline.controlFrameLines Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the sketch lines that represent the control frame of the spline. The lines are in sequential order starting with the line that connects to the starting control point to the end.

Remarks

There are cases, like when a curve is offset, where a control point spline is created but the control frame is not displayed and the curve is not editable. You can check for this case by checking the value of the isControlFrameDisplayed property. If it is true, this property will return an empty array of sketch lines since they do not currently exist.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.controlFrameLines
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
std::vector<Ptr<SketchLine>> propertyValue = sketchControlPointSpline_var->controlFrameLines();

Property Value

This is a read only property whose value is an array of type SketchLine.

Version

Introduced in version October 2022


SketchControlPointSpline.controlPoints Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the set of sketch points that the control frame of 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.

Deleting one of the sketch points will remove that point from the control frame and the curve will be recomputed.

Remarks

There are cases, like when a curve is offset, where a control point spline is created but the control frame is not displayed and the curve is not editable. You can check for this case by checking the value of the isControlFrameDisplayed property. If it is true, this property will return an empty array of control points since they do not currently exist.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.controlPoints
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
std::vector<Ptr<SketchPoint>> propertyValue = sketchControlPointSpline_var->controlPoints();

Property Value

This is a read only property whose value is an array of type SketchPoint.

Version

Introduced in version July 2022


SketchControlPointSpline.createForAssemblyContext Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
returnValue = sketchControlPointSpline_var.createForAssemblyContext(occurrence)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

returnValue = sketchControlPointSpline_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchControlPointSpline | 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 2022


SketchControlPointSpline.degree Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Gets and sets the degree of the spline.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.degree

# Set the value of the property.
sketchControlPointSpline_var.degree = propertyValue
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
SplineDegrees propertyValue = sketchControlPointSpline_var->degree();

// Set the value of the property, where value_var is a SplineDegrees.
bool returnValue = sketchControlPointSpline_var->degree(value_var);

Property Value

This is a read/write property whose value is a SplineDegrees.

Version

Introduced in version July 2022


SketchControlPointSpline.deleteMe Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Deletes the entity from the sketch.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
returnValue = sketchControlPointSpline_var.deleteMe()
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

returnValue = sketchControlPointSpline_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version July 2022


SketchControlPointSpline.endSketchPoint Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

The sketch point at the end of the spline. If the curve is closed the start and end sketch points will be the same.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.endSketchPoint
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchControlPointSpline_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version July 2022


SketchControlPointSpline.entityToken Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.entityToken
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
string propertyValue = sketchControlPointSpline_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2022


SketchControlPointSpline.evaluator Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.evaluator
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = sketchControlPointSpline_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version July 2022


SketchControlPointSpline.extend Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
# Uses no optional arguments.
returnValue = sketchControlPointSpline_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchControlPointSpline_var.extend(endPoint, createConstraints)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

// Uses no optional arguments.
returnValue = sketchControlPointSpline_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchControlPointSpline_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 July 2022


SketchControlPointSpline.geometricConstraints Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the sketch constraints that are attached to this curve.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.geometricConstraints
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchControlPointSpline_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version July 2022


SketchControlPointSpline.geometry Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space. Use the worldGeometry property to get it in the model's design space.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.geometry
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchControlPointSpline_var->geometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version July 2022


SketchControlPointSpline.intersections Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

(returnValue, intersectingCurves, intersectionPoints) = sketchControlPointSpline_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchControlPointSpline.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchControlPointSpline_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if the method was successful. It can be successful regardless of whether intersections were found or not.

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 July 2022


SketchControlPointSpline.is2D Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.is2D
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isConstruction Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Gets and sets whether this curve is construction geometry.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isConstruction

# Set the value of the property.
sketchControlPointSpline_var.isConstruction = propertyValue
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchControlPointSpline_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isControlFrameDisplayed Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Gets and sets if the control frame of the curve is currently displayed. Using this property is useful to be able to determine if the controlPoints and controlFrameLines properties will return useful information or not and if the addControlPoint method will succeed or not.

Remarks

There are cases where Fusion creates a control point spline but does not display the control frame. An example is when you create an offset of a spline.

If the value of the property is false, you can set it to true to cause the control frame to be displayed. If the curve is being controlled by any existing constraints, setting this property to true will fail. For example, if the curve is the result of an offset and the offset constraint still exists, you cannot turn on the control frame. However, if you first delete the constrains so the curve is now independent you can set this property to true and display the control frame.

Setting this property to false will always fail. Turning off the display of the control frame is not supported by Fusion.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isControlFrameDisplayed

# Set the value of the property.
sketchControlPointSpline_var.isControlFrameDisplayed = propertyValue
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isControlFrameDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchControlPointSpline_var->isControlFrameDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


SketchControlPointSpline.isDeletable Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isDeletable
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isFixed Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Indicates if this geometry is "fixed".

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isFixed

# Set the value of the property.
sketchControlPointSpline_var.isFixed = propertyValue
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchControlPointSpline_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isFullyConstrained Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Indicates if this sketch entity is fully constrained.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isFullyConstrained
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isLinked Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isLinked
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isReference Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isReference

# Set the value of the property.
sketchControlPointSpline_var.isReference = propertyValue
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchControlPointSpline_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isValid Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isValid
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.isVisible Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.isVisible
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSpline_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSpline.length Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the length of the curve in centimeters.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.length
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
double propertyValue = sketchControlPointSpline_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version July 2022


SketchControlPointSpline.nativeObject Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.nativeObject
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<SketchControlPointSpline> propertyValue = sketchControlPointSpline_var->nativeObject();

Property Value

This is a read only property whose value is a SketchControlPointSpline.

Version

Introduced in version July 2022


SketchControlPointSpline.objectType Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.objectType
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
string propertyValue = sketchControlPointSpline_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2022


SketchControlPointSpline.parentSketch Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the parent sketch.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.parentSketch
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchControlPointSpline_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version July 2022


SketchControlPointSpline.referencedEntity Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.referencedEntity
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchControlPointSpline_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2022


SketchControlPointSpline.sketchDimensions Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Returns the sketch dimensions that are attached to this curve.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.sketchDimensions
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchControlPointSpline_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version July 2022


SketchControlPointSpline.split Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Split a curve at a position specified along the curve

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
# Uses no optional arguments.
returnValue = sketchControlPointSpline_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchControlPointSpline_var.split(splitPoint, createConstraints)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

// Uses no optional arguments.
returnValue = sketchControlPointSpline_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchControlPointSpline_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 July 2022


SketchControlPointSpline.startSketchPoint Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

The sketch point at the start of the spline. If the curve is closed the start and end sketch points will be the same.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.startSketchPoint
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchControlPointSpline_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version July 2022


SketchControlPointSpline.trim Method

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
# Uses no optional arguments.
returnValue = sketchControlPointSpline_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchControlPointSpline_var.trim(segmentPoint, createConstraints)
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

#include <Fusion/Sketch/SketchControlPointSpline.h>

// Uses no optional arguments.
returnValue = sketchControlPointSpline_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchControlPointSpline_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 July 2022


SketchControlPointSpline.worldGeometry Property

Parent Object: SketchControlPointSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSpline.h>

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.

Syntax

  • Python
  • C++
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.

# Get the value of the property.
propertyValue = sketchControlPointSpline_var.worldGeometry
"sketchControlPointSpline_var" is a variable referencing a SketchControlPointSpline object.
#include <Fusion/Sketch/SketchControlPointSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchControlPointSpline_var->worldGeometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version July 2022


SketchControlPointSplines Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

The collection of control point splines in a sketch.

Methods

Name | Description
add | Creates a new control point spline.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 control point spline using an index into the collection.

Properties

Name | Description
count | Returns the number of control point 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchControlPointSplines

Version

Introduced in version July 2022


SketchControlPointSplines.add Method

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

Creates a new control point spline.

Syntax

  • Python
  • C++
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.
returnValue = sketchControlPointSplines_var.add(controlPoints, degree)
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.

#include <Fusion/Sketch/SketchControlPointSplines.h>

returnValue = sketchControlPointSplines_var->add(controlPoints, degree);

Return Value

Type | Description
SketchControlPointSpline | Returns the newly created SketchControlPointSpline object if the creation was successful or null if it failed.

Parameters

Name | Type | Description
controlPoints | Base[] | An array of points that define the control points of the curve's polygon. They can be any combination of existing SketchPoint or Point3D objects.
degree | SplineDegrees | Specifies the degree of the spline. Only degree 3 and degree 5 can be specified while creating the spline.

Version

Introduced in version July 2022


SketchControlPointSplines.classType Method

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchControlPointSplines.classType()
This is a static method.

#include <Fusion/Sketch/SketchControlPointSplines.h>

returnValue = adsk::fusion::SketchControlPointSplines::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2022


SketchControlPointSplines.count Property

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

Returns the number of control point splines in the sketch.

Syntax

  • Python
  • C++
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.

# Get the value of the property.
propertyValue = sketchControlPointSplines_var.count
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.
#include <Fusion/Sketch/SketchControlPointSplines.h>

// Get the value of the property.
uinteger propertyValue = sketchControlPointSplines_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2022


SketchControlPointSplines.isValid Property

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.

# Get the value of the property.
propertyValue = sketchControlPointSplines_var.isValid
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.
#include <Fusion/Sketch/SketchControlPointSplines.h>

// Get the value of the property.
boolean propertyValue = sketchControlPointSplines_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchControlPointSplines.item Method

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

Function that returns the specified sketch control point spline using an index into the collection.

Syntax

  • Python
  • C++
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.
returnValue = sketchControlPointSplines_var.item(index)
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.

#include <Fusion/Sketch/SketchControlPointSplines.h>

returnValue = sketchControlPointSplines_var->item(index);

Return Value

Type | Description
SketchControlPointSpline | 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 2022


SketchControlPointSplines.objectType Property

Parent Object: SketchControlPointSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchControlPointSplines.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.

# Get the value of the property.
propertyValue = sketchControlPointSplines_var.objectType
"sketchControlPointSplines_var" is a variable referencing a SketchControlPointSplines object.
#include <Fusion/Sketch/SketchControlPointSplines.h>

// Get the value of the property.
string propertyValue = sketchControlPointSplines_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2022


SketchCurve Object

Derived from: SketchEntity Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

A single sketch curve. This is the base class for the specific curve types.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, OffsetConstraintInput.curves, PerpendicularToSurfaceConstraint.curve, SharedPointCoincident.curveOne, SharedPointCoincident.curveTwo, SketchConcentricCircleDimension.circleOne, SketchConcentricCircleDimension.circleTwo, SketchCurves.item, SketchDiameterDimension.entity, SketchEllipseMajorRadiusDimension.ellipse, SketchEllipseMinorRadiusDimension.ellipse, SketchRadialDimension.entity, SketchTangentDistanceDimension.circleOrArc, SketchText.explode, SmoothConstraint.curveOne, SmoothConstraint.curveTwo, TangentConstraint.curveOne, TangentConstraint.curveTwo

Derived Classes

SketchArc, SketchCircle, SketchConicCurve, SketchControlPointSpline, SketchEllipse, SketchEllipticalArc, SketchFittedSpline, SketchFixedSpline, SketchLine

Version

Introduced in version August 2014


SketchCurve.assemblyContext Property

Parent Object: SketchCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Deletes the entity from the sketch.

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.entityToken Property

Parent Object: SketchCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.entityToken
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
string propertyValue = sketchCurve_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchCurve.extend Method

Parent Object: SketchCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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 the method was successful. It can be successful regardless of whether intersections were found or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isLinked
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchCurve.isReference Property

Parent Object: SketchCurve
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurve.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 supports the creation of new conic curves.
sketchControlPointSplines | Returns the control point splines collection associated with this sketch. This provides access to the existing control point splines and supports the creation of new control point splines.
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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Returns the number of sketch curves in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Function that returns the specified sketch curve using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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.

Samples

Name | Description
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
SketchArcs.addByCenterStartSweep | Demonstrates the SketchArcs.addByCenterStartSweep method.
SketchArcs.addByThreePoints | Demonstrates the SketchArcs.addByThreePoints method.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.
SketchArcs.breakCurve | Demonstrates the SketchArc.breakCurve method.
SketchArcs.extend | Demonstrates the SketchArc.extend method.
SketchArcs.split | Demonstrates the SketchArc.split method.
SketchArcs.trim | Demonstrates the SketchArc.trim method.

Version

Introduced in version August 2014


SketchCurves.sketchCircles Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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 API Sample | Demonstrates creating a sketch circle by the center and radius.
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
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.
SketchCircles.addByCenterRadius | Demonstrates the SketchCircles.addByCenterRadius method.
SketchCircles.addByThreePoints | Demonstrates the SketchCircles.addByThreePoints method.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoPoints | Demonstrates the SketchCircles.addByTwoPoints method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.

Version

Introduced in version August 2014


SketchCurves.sketchConicCurves Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Returns the conic curves collection associated with this sketch. This provides access to the existing conic curves and supports the creation of new conic curves.

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.sketchControlPointSplines Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

Description

Returns the control point splines collection associated with this sketch. This provides access to the existing control point splines and supports the creation of new control point splines.

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchControlPointSplines
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchControlPointSplines> propertyValue = sketchCurves_var->sketchControlPointSplines();

Property Value

This is a read only property whose value is a SketchControlPointSplines.

Version

Introduced in version July 2022


SketchCurves.sketchEllipses Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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.

Samples

Name | Description
SketchEllipses.add | Demonstrates the SketchEllipses.add method.

Version

Introduced in version August 2014


SketchCurves.sketchEllipticalArcs Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version August 2014


SketchCurves.sketchFixedSplines Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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.

Samples

Name | Description
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Version

Introduced in version August 2014


SketchCurves.sketchLines Property

Parent Object: SketchCurves
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchCurves.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.
SketchLines.addAngleChamfer | Demonstrates the SketchLines.addAngleChamfer method.
SketchLines.addByTwoPoints | Demonstrates the SketchLines.addByTwoPoints method.
SketchLines.addCenterPointRectangle | Demonstrates the SketchLines.addCenterPointRectangle method.
SketchLines.addDistanceChamfer | Demonstrates the SketchLines.addDistanceChamfer method.
SketchLines.addThreePointRectangle | Demonstrates the SketchLines.addThreePointRectangle method.
SketchLines.addTwoPointRectangle | Demonstrates the SketchLines.addTwoPointRectangle method.

Version

Introduced in version August 2014


SketchDiameterDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

An diameter dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDiameterDimension.createForAssemblyContext, SketchDiameterDimension.nativeObject, SketchDimensions.addDiameterDimension

Version

Introduced in version August 2014


SketchDiameterDimension.assemblyContext Property

Parent Object: SketchDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Returns the arc or circle being constrained.

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.entityToken Property

Parent Object: SketchDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.entityToken
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
string propertyValue = sketchDiameterDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchDiameterDimension.isDeletable Property

Parent Object: SketchDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchDiameterDimension.value Property

Parent Object: SketchDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDiameterDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.value

# Set the value of the property.
sketchDiameterDimension_var.value = propertyValue
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
double propertyValue = sketchDiameterDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchDiameterDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchDimension Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

The base class for the all sketch dimensions.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

OffsetConstraint.dimension, SketchDimensionList.item, SketchDimensions.item

Derived Classes

SketchAngularDimension, SketchConcentricCircleDimension, SketchDiameterDimension, SketchDistanceBetweenLineAndPlanarSurfaceDimension, SketchDistanceBetweenPointAndSurfaceDimension, SketchEllipseMajorRadiusDimension, SketchEllipseMinorRadiusDimension, SketchLinearDiameterDimension, SketchLinearDimension, SketchOffsetCurvesDimension, SketchOffsetDimension, SketchRadialDimension, SketchTangentDistanceDimension

Version

Introduced in version August 2014


SketchDimensions.addAngularDimension

Description

Demonstrates the SketchDimension.addAngularDimension method.

Code Samples

  • Python
def demo_Dimension_addAngularDimension(sketch: adsk.fusion.Sketch):
    # Create points for the lines
    startPoint = adsk.core.Point3D.create(6, 0, 0)
    endPoint = adsk.core.Point3D.create(0, 0, 0)

    # Create the lines and text point for parameters
    lines = sketch.sketchCurves.sketchLines
    lineOne = lines.addByTwoPoints(startPoint, endPoint)
    lineTwo = lines.addByTwoPoints(lineOne.endSketchPoint, adsk.core.Point3D.create(5, 4, 0))
    textPoint = adsk.core.Point3D.create(7, 2, 0)

    # Create the angular dimension
    dimensions = sketch.sketchDimensions
    angularDimension = dimensions.addAngularDimension(lineOne, lineTwo, textPoint)


SketchDimensions.addConcentricCicleDimension

Description

Demonstrates the SketchDimension.addConcentricCircleDimension method.

Code Samples

  • Python
def demo_Dimension_addConcentricCircleDimension(sketch: adsk.fusion.Sketch):
    pointOne = adsk.core.Point3D.create(0,0,0)
    pointTwo = adsk.core.Point3D.create(10,10,0)
    pointThree = adsk.core.Point3D.create(-5,-5,0)
    pointFour = adsk.core.Point3D.create(-10,-10,0)

    # Create the circles and text point for parameters
    circleOne = sketch.sketchCurves.sketchCircles.addByTwoPoints(pointOne, pointTwo)
    circleTwo = sketch.sketchCurves.sketchCircles.addByTwoPoints(pointThree, pointFour)
    textPoint = adsk.core.Point3D.create(-2,-2,0)

    # Create the concentric circle
    dim = sketch.sketchDimensions
    concentricCircleDimension = dim.addConcentricCircleDimension(circleOne, circleTwo, textPoint)


SketchDimensions.addDiameterDimension

Description

Demonstrates the SketchDimension.addDiameterDimension method.

Code Samples

  • Python
def demo_Dimension_addDiameterDimension(sketch: adsk.fusion.Sketch):
    pointOne = adsk.core.Point3D.create(0, 0, 0)
    pointTwo = adsk.core.Point3D.create(10, 10, 0)

    # Create the entity and text point for parameters
    entity = sketch.sketchCurves.sketchCircles.addByTwoPoints(pointOne, pointTwo)
    textPoint = adsk.core.Point3D.create(12, 12, 0)

    # Create the circle using diameter between the two points
    dimensions = sketch.sketchDimensions
    circleDimension = dimensions.addDiameterDimension(entity, textPoint)


SketchDimensions.addDistanceDimension

Description

Demonstrates the SketchDimension.addDistanceDimension method.

Code Samples

  • Python
def demo_Dimension_addDistanceDimension(sketch: adsk.fusion.Sketch):
    # Create points, orientation and text point for parameters
    pointOne = sketch.sketchPoints.add(adsk.core.Point3D.create(0, 0, 0))
    pointTwo = sketch.sketchPoints.add(adsk.core.Point3D.create(10, 10, 0))
    orientation = adsk.fusion.DimensionOrientations.AlignedDimensionOrientation
    textPoint = adsk.core.Point3D.create(5, 4, 0)

    # Create the circle based on the dimension
    dim = sketch.sketchDimensions
    distanceDimension = dim.addDistanceDimension(pointOne, pointTwo, orientation, textPoint)


SketchDimensions.AddEllipseMajorRadiusDimension

Description

Demonstrates the SketchDimension.addEllipseMajorRadiusDimension method.

Code Samples

  • Python
def demo_Dimension_addEllipseMajorRadiusDimension(sketch: adsk.fusion.Sketch):
    centerPoint = adsk.core.Point3D.create(0, 0, 0)
    majorAxisPoint = adsk.core.Point3D.create(10, 0, 0)
    throughPoint = adsk.core.Point3D.create(5, 4, 0)

    # Create ellipse and text point for parameters
    ellipse = sketch.sketchCurves.sketchEllipses.add(centerPoint, majorAxisPoint, throughPoint)
    textPoint = adsk.core.Point3D.create(7.5, 7, 0)

    # Create the ellipse
    dim = sketch.sketchDimensions
    majorRadiusDimension = dim.addEllipseMajorRadiusDimension(ellipse, textPoint)


SketchDimensions.AddEllipseMinorRadiusDimension

Description

Demonstrates the SketchDimension.addEllipseMinorRadiusDimension method.

Code Samples

  • Python
def demo_Dimension_addEllipseMinorRadiusDimension(sketch: adsk.fusion.Sketch):
    centerPoint = adsk.core.Point3D.create(0, 0, 0)
    majorAxisPoint = adsk.core.Point3D.create(10, 0, 0)
    throughPoint = adsk.core.Point3D.create(5, 4, 0)

    # Create an ellipse and text point for parameters
    ellipse = sketch.sketchCurves.sketchEllipses.add(centerPoint, majorAxisPoint, throughPoint)
    textPoint = adsk.core.Point3D.create(12, 2, 0)

    # Create the ellipse
    dim = sketch.sketchDimensions
    minorRadiusDimension = dim.addEllipseMinorRadiusDimension(ellipse, textPoint)


SketchDimensions.addOffsetDimension

Description

Demonstrates the SketchDimension.addOffsetDimension method.

Code Samples

  • Python
def demo_Dimension_addOffsetDimension(sketch: adsk.fusion.Sketch):
    # Create the line and second entity for parameters
    line = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                          adsk.core.Point3D.create(10, 0, 0)  )
    entityTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 10, 0),
                                                                adsk.core.Point3D.create(10, 10, 0))

    textPoint = adsk.core.Point3D.create(13, 5, 0)

    # Create the lines
    dim = sketch.sketchDimensions
    offsetDimension = dim.addOffsetDimension(line, entityTwo, textPoint)


SketchDimension.assemblyContext Property

Parent Object: SketchDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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.entityToken Property

Parent Object: SketchDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.entityToken
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
string propertyValue = sketchDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchDimension.isDeletable Property

Parent Object: SketchDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchDimension.value Property

Parent Object: SketchDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.value

# Set the value of the property.
sketchDimension_var.value = propertyValue
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
double propertyValue = sketchDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchDimensionList Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

A list of sketch dimensions.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchArc.sketchDimensions, SketchCircle.sketchDimensions, SketchConicCurve.sketchDimensions, SketchControlPointSpline.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

Returns the number of sketch dimensions in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

Function that returns the specified sketch dimension using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensionList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

A collection of the dimensions in a sketch. This object also supports the methods to add new sketch dimensions.

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.
addDistanceBetweenLineAndPlanarSurfaceDimension | Creates a new linear dimension controlling the distance between a sketch line and the specified planar face or construction plane. The sketch line must lie on a plane that is parallel to the planar surface. The text position is automatically chosen and is positioned so it is midway between the line and surface and the extension lines are a minimum length. You can modify the position by using functionality on the returned SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
addDistanceBetweenPointAndSurfaceDimension | Creates a new linear dimension controlling the distance between a sketch point and the specified surface or point. The text position is automatically chosen and is positioned so it is midway between the point and surface and the extension lines are a minimum length. You can modify the position by using functionality on the returned SketchDistanceBetweenPointAndSurfaceDimension object.
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.
addLinearDiameterDimension | Creates a new linear dimension showing the diameter where the first line acts as the center line and the second entity defines the size. 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.
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.
addTangentDistanceDimension | Creates a new linear dimension from between a line and circle or arc and a second circle or arc where the dimension is to the tangent on the edge of the circle or arc.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Sketch.sketchDimensions

Samples

Name | Description
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
SketchDimensions.addAngularDimension | Demonstrates the SketchDimension.addAngularDimension method.
SketchDimensions.addConcentricCicleDimension | Demonstrates the SketchDimension.addConcentricCircleDimension method.
SketchDimensions.addDiameterDimension | Demonstrates the SketchDimension.addDiameterDimension method.
SketchDimensions.addDistanceDimension | Demonstrates the SketchDimension.addDistanceDimension method.
SketchDimensions.AddEllipseMajorRadiusDimension | Demonstrates the SketchDimension.addEllipseMajorRadiusDimension method.
SketchDimensions.AddEllipseMinorRadiusDimension | Demonstrates the SketchDimension.addEllipseMinorRadiusDimension method.
SketchDimensions.addOffsetDimension | Demonstrates the SketchDimension.addOffsetDimension method.

Version

Introduced in version August 2014


SketchDimensions.addAngularDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

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.

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 the text also defines which quadrant will be dimensioned.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geometry) 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
SketchDimensions.addAngularDimension | Demonstrates the SketchDimension.addAngularDimension method.

Version

Introduced in version August 2014


SketchDimensions.addConcentricCircleDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new dimension constraint between to concentric circles or arcs.

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 geometry) 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
SketchDimensions.addConcentricCicleDimension | Demonstrates the SketchDimension.addConcentricCircleDimension method.

Version

Introduced in version August 2014


SketchDimensions.addDiameterDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new diameter dimension constraint on the arc or circle.

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 geometry) 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
SketchDimensions.addDiameterDimension | Demonstrates the SketchDimension.addDiameterDimension method.

Version

Introduced in version August 2014


SketchDimensions.addDistanceBetweenLineAndPlanarSurfaceDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new linear dimension controlling the distance between a sketch line and the specified planar face or construction plane. The sketch line must lie on a plane that is parallel to the planar surface. The text position is automatically chosen and is positioned so it is midway between the line and surface and the extension lines are a minimum length. You can modify the position by using functionality on the returned SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addDistanceBetweenLineAndPlanarSurfaceDimension(line, planarSurface)

# Uses optional arguments.
returnValue = sketchDimensions_var.addDistanceBetweenLineAndPlanarSurfaceDimension(line, planarSurface, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addDistanceBetweenLineAndPlanarSurfaceDimension(line, planarSurface);

// Uses optional arguments.
returnValue = sketchDimensions_var->addDistanceBetweenLineAndPlanarSurfaceDimension(line, planarSurface, isDriving);

Return Value

Type | Description
SketchDistanceBetweenLineAndPlanarSurfaceDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The SketchLine being constrained by the dimension.
planarSurface | Base | The planar BRepFace or ConstructionPlane that the dimension will anchor to.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geometry) 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 September 2023


SketchDimensions.addDistanceBetweenPointAndSurfaceDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new linear dimension controlling the distance between a sketch point and the specified surface or point. The text position is automatically chosen and is positioned so it is midway between the point and surface and the extension lines are a minimum length. You can modify the position by using functionality on the returned SketchDistanceBetweenPointAndSurfaceDimension object.

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addDistanceBetweenPointAndSurfaceDimension(point, surface)

# Uses optional arguments.
returnValue = sketchDimensions_var.addDistanceBetweenPointAndSurfaceDimension(point, surface, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addDistanceBetweenPointAndSurfaceDimension(point, surface);

// Uses optional arguments.
returnValue = sketchDimensions_var->addDistanceBetweenPointAndSurfaceDimension(point, surface, isDriving);

Return Value

Type | Description
SketchDistanceBetweenPointAndSurfaceDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
point | SketchPoint | The SketchPoint being constrained by the dimension.
surface | Base | The BRepFace or ConstructionPlane to which the dimension will anchor. Planar, cylindrical, spherical and conical faces are supported. If a cylindrical, spherical or conical face is used, the dimension is from the point to the nearest point on the surface.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geometry) 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 September 2023


SketchDimensions.addDistanceDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new linear dimension constraint between the two input entities.

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 geometry) 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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
SketchDimensions.addDistanceDimension | Demonstrates the SketchDimension.addDistanceDimension method.

Version

Introduced in version August 2014


SketchDimensions.addEllipseMajorRadiusDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new dimension constraint on the major radius of an ellipse.

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 geometry) 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
SketchDimensions.AddEllipseMajorRadiusDimension | Demonstrates the SketchDimension.addEllipseMajorRadiusDimension method.

Version

Introduced in version August 2014


SketchDimensions.addEllipseMinorRadiusDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new dimension constraint on the minor radius of an ellipse.

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 geometry) 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
SketchDimensions.AddEllipseMinorRadiusDimension | Demonstrates the SketchDimension.addEllipseMinorRadiusDimension method.

Version

Introduced in version August 2014


SketchDimensions.addLinearDiameterDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new linear dimension showing the diameter where the first line acts as the center line and the second entity defines the size. 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.

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addLinearDiameterDimension(centerLine, entityTwo, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addLinearDiameterDimension(centerLine, entityTwo, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addLinearDiameterDimension(centerLine, entityTwo, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addLinearDiameterDimension(centerLine, entityTwo, textPoint, isDriving);

Return Value

Type | Description
SketchLinearDiameterDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
centerLine | SketchLine | The SketchLine to dimension to which acts as the center line.
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 geometry) 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 September 2022


SketchDimensions.addOffsetDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

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.

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 geometry) 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
SketchDimensions.addOffsetDimension | Demonstrates the SketchDimension.addOffsetDimension method.

Version

Introduced in version August 2014


SketchDimensions.addRadialDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new radial dimension constraint on the arc or circle.

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 geometry) 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.addTangentDistanceDimension Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Creates a new linear dimension from between a line and circle or arc and a second circle or arc where the dimension is to the tangent on the edge of the circle or arc.

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addTangentDistanceDimension(entityOne, isCloseToEnityTwo, entityTwo, isCloseToEnityOne, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addTangentDistanceDimension(entityOne, isCloseToEnityTwo, entityTwo, isCloseToEnityOne, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addTangentDistanceDimension(entityOne, isCloseToEnityTwo, entityTwo, isCloseToEnityOne, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addTangentDistanceDimension(entityOne, isCloseToEnityTwo, entityTwo, isCloseToEnityOne, textPoint, isDriving);

Return Value

Type | Description
SketchTangentDistanceDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
entityOne | SketchEntity | The first entity to dimension to. This can be a SketchPoint, SketchLine, SketchCircle or SketchArc. If a circle or arc is provided then the tangentSideOne argument must be specified.
isCloseToEnityTwo | boolean | If entityOne is a circle or arc this specifies which side of the circle or arc the dimension will be tangent to. If true, it will be on the side that is closer to entityTwo. If a SketchLine or SketchPoint was input for the entityOne argument this argument is ignored and any value can be used.
entityTwo | SketchCurve | A SketchCircle or SketchArc entity that you will dimension to.
isCloseToEnityOne | boolean | Specifies which side of the circle or arc input as the entityTwo argument the dimension will be tangent to. If true, it will be on the side that is closer to entityOne.
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 geometry) 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 July 2022


SketchDimensions.classType Method

Parent Object: SketchDimensions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Returns the number of sketch dimensions in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

Function that returns the specified sketch dimension using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDimensions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SketchDistanceBetweenLineAndPlanarSurfaceDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

A linear dimension in a sketch between a sketch line and a planar surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 sketch 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
planarSurface | The planar surface the dimension is anchored to. This can be a planar BRepFace or a ConstructionPlane.
textPosition | Gets and sets position of the dimension text.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addDistanceBetweenLineAndPlanarSurfaceDimension, SketchDistanceBetweenLineAndPlanarSurfaceDimension.createForAssemblyContext, SketchDistanceBetweenLineAndPlanarSurfaceDimension.nativeObject

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.assemblyContext Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.assemblyContext
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.attributes Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.attributes
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.classType Method

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDistanceBetweenLineAndPlanarSurfaceDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

returnValue = adsk::fusion::SketchDistanceBetweenLineAndPlanarSurfaceDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.createForAssemblyContext Method

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.createForAssemblyContext(occurrence)
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchDistanceBetweenLineAndPlanarSurfaceDimension | 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 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.deleteMe Method

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.deleteMe()
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.entityToken Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.entityToken
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
string propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.isDeletable Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Indicates if this dimension is deletable.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.isDeletable
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.isDriving Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.isDriving

# Set the value of the property.
sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.isDriving = propertyValue
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.isValid Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.isValid
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.line Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

The sketch line being constrained.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.line
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.nativeObject Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.nativeObject
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<SketchDistanceBetweenLineAndPlanarSurfaceDimension> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchDistanceBetweenLineAndPlanarSurfaceDimension.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.objectType Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.objectType
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
string propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.parameter Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.parameter
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.parentSketch Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.parentSketch
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.planarSurface Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

The planar surface the dimension is anchored to. This can be a planar BRepFace or a ConstructionPlane.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.planarSurface
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->planarSurface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.textPosition Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Gets and sets position of the dimension text.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.textPosition

# Set the value of the property.
sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.textPosition = propertyValue
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2023


SketchDistanceBetweenLineAndPlanarSurfaceDimension.value Property

Parent Object: SketchDistanceBetweenLineAndPlanarSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.value

# Set the value of the property.
sketchDistanceBetweenLineAndPlanarSurfaceDimension_var.value = propertyValue
"sketchDistanceBetweenLineAndPlanarSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenLineAndPlanarSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenLineAndPlanarSurfaceDimension.h>

// Get the value of the property.
double propertyValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchDistanceBetweenLineAndPlanarSurfaceDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

A linear dimension in a sketch between a sketch point and a surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
point | The sketch point being constrained.
surface | The BRepFace or ConstructionPlane to which the dimension is anchored. Planar, cylindrical, spherical and conical faces are supported.
textPosition | Gets and sets position of the dimension text.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addDistanceBetweenPointAndSurfaceDimension, SketchDistanceBetweenPointAndSurfaceDimension.createForAssemblyContext, SketchDistanceBetweenPointAndSurfaceDimension.nativeObject

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.assemblyContext Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.assemblyContext
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.attributes Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.attributes
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.classType Method

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDistanceBetweenPointAndSurfaceDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

returnValue = adsk::fusion::SketchDistanceBetweenPointAndSurfaceDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.createForAssemblyContext Method

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var.createForAssemblyContext(occurrence)
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchDistanceBetweenPointAndSurfaceDimension | 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 2023


SketchDistanceBetweenPointAndSurfaceDimension.deleteMe Method

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var.deleteMe()
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.entityToken Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.entityToken
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
string propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.isDeletable Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Indicates if this dimension is deletable.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.isDeletable
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.isDriving Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.isDriving

# Set the value of the property.
sketchDistanceBetweenPointAndSurfaceDimension_var.isDriving = propertyValue
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.isValid Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.isValid
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.nativeObject Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.nativeObject
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<SketchDistanceBetweenPointAndSurfaceDimension> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchDistanceBetweenPointAndSurfaceDimension.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.objectType Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.objectType
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
string propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.parameter Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.parameter
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.parentSketch Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.parentSketch
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.point Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

The sketch point being constrained.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.point
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->point();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.surface Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

The BRepFace or ConstructionPlane to which the dimension is anchored. Planar, cylindrical, spherical and conical faces are supported.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.surface
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->surface();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.textPosition Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Gets and sets position of the dimension text.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.textPosition

# Set the value of the property.
sketchDistanceBetweenPointAndSurfaceDimension_var.textPosition = propertyValue
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2023


SketchDistanceBetweenPointAndSurfaceDimension.value Property

Parent Object: SketchDistanceBetweenPointAndSurfaceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.

# Get the value of the property.
propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var.value

# Set the value of the property.
sketchDistanceBetweenPointAndSurfaceDimension_var.value = propertyValue
"sketchDistanceBetweenPointAndSurfaceDimension_var" is a variable referencing a SketchDistanceBetweenPointAndSurfaceDimension object.
#include <Fusion/Sketch/SketchDistanceBetweenPointAndSurfaceDimension.h>

// Get the value of the property.
double propertyValue = sketchDistanceBetweenPointAndSurfaceDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchDistanceBetweenPointAndSurfaceDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2023


SketchEllipse Object

Derived from: SketchCurve Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

An ellipse in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Samples

Name | Description
SketchEllipses.add | Demonstrates the SketchEllipses.add method.

Version

Introduced in version August 2014


SketchEllipse.assemblyContext Property

Parent Object: SketchEllipse
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Deletes the entity from the sketch.

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.entityToken Property

Parent Object: SketchEllipse
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.entityToken
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
string propertyValue = sketchEllipse_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchEllipse.extend Method

Parent Object: SketchEllipse
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the transient geometry of the ellipse which provides geometric information about the ellipse. The returned geometry is always in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchEllipse
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isLinked
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchEllipse.isReference Property

Parent Object: SketchEllipse
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipse.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

An ellipse major radius dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addEllipseMajorRadiusDimension, SketchEllipseMajorRadiusDimension.createForAssemblyContext, SketchEllipseMajorRadiusDimension.nativeObject

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.assemblyContext Property

Parent Object: SketchEllipseMajorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Returns the ellipse or elliptical arc being constrained.

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.entityToken Property

Parent Object: SketchEllipseMajorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.entityToken
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
string propertyValue = sketchEllipseMajorRadiusDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchEllipseMajorRadiusDimension.isDeletable Property

Parent Object: SketchEllipseMajorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchEllipseMajorRadiusDimension.value Property

Parent Object: SketchEllipseMajorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.value

# Set the value of the property.
sketchEllipseMajorRadiusDimension_var.value = propertyValue
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
double propertyValue = sketchEllipseMajorRadiusDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipseMajorRadiusDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchEllipseMinorRadiusDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

An ellipse minor radius dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addEllipseMinorRadiusDimension, SketchEllipseMinorRadiusDimension.createForAssemblyContext, SketchEllipseMinorRadiusDimension.nativeObject

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.assemblyContext Property

Parent Object: SketchEllipseMinorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Returns the ellipse or elliptical arc being constrained.

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.entityToken Property

Parent Object: SketchEllipseMinorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.entityToken
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
string propertyValue = sketchEllipseMinorRadiusDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchEllipseMinorRadiusDimension.isDeletable Property

Parent Object: SketchEllipseMinorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchEllipseMinorRadiusDimension.value Property

Parent Object: SketchEllipseMinorRadiusDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.value

# Set the value of the property.
sketchEllipseMinorRadiusDimension_var.value = propertyValue
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
double propertyValue = sketchEllipseMinorRadiusDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipseMinorRadiusDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchEllipses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

The collection of ellipses in a sketch. This provides access to the existing ellipses and supports the methods to create new ellipses.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchEllipses

Version

Introduced in version August 2014


SketchEllipses.add Method

Parent Object: SketchEllipses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

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.

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.

Samples

Name | Description
SketchDimensions.AddEllipseMajorRadiusDimension | Demonstrates the SketchDimension.addEllipseMajorRadiusDimension method.
SketchDimensions.AddEllipseMinorRadiusDimension | Demonstrates the SketchDimension.addEllipseMinorRadiusDimension method.
SketchEllipses.add | Demonstrates the SketchEllipses.add method.

Version

Introduced in version August 2014


SketchEllipses.add

Description

Demonstrates the SketchEllipses.add method.

Code Samples

  • Python
def demo_Ellipses_add(sketch: adsk.fusion.Sketch):
    # Define three points
    centerPoint = adsk.core.Point3D.create(0,0,0)
    majorAxisPoint = adsk.core.Point3D.create(10,0,0)
    throughPoint = adsk.core.Point3D.create(5,4,0)

    # Create an ellipse based on the points
    sketchEllipse = sketch.sketchCurves.sketchEllipses
    ellipse = sketchEllipse.add(centerPoint, majorAxisPoint, throughPoint)


SketchEllipses.classType Method

Parent Object: SketchEllipses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

Returns the number of ellipses in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

Function that returns the specified sketch ellipse using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

An elliptical arc in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.addByAngle, SketchEllipticalArcs.addByEndPoints, SketchEllipticalArcs.item

Version

Introduced in version August 2014


SketchEllipticalArc.assemblyContext Property

Parent Object: SketchEllipticalArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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.entityToken Property

Parent Object: SketchEllipticalArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.entityToken
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
string propertyValue = sketchEllipticalArc_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchEllipticalArc.extend Method

Parent Object: SketchEllipticalArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchEllipticalArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isLinked
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchEllipticalArc.isReference Property

Parent Object: SketchEllipticalArc
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArc.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

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.

Methods

Name | Description
addByAngle | Creates an elliptical sketch arc where the sweep of the arc is defined by the start and sweep angles.
addByEndPoints | Creates an elliptical sketch arc where the sweep of the arc is defined by 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchEllipticalArcs

Version

Introduced in version August 2014


SketchEllipticalArcs.addByAngle Method

Parent Object: SketchEllipticalArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Creates an elliptical sketch arc where the sweep of the arc is defined by the start and sweep angles.

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
returnValue = sketchEllipticalArcs_var.addByAngle(centerPoint, majorAxis, minorAxis, startAngle, sweepAngle)
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

#include <Fusion/Sketch/SketchEllipticalArcs.h>

returnValue = sketchEllipticalArcs_var->addByAngle(centerPoint, majorAxis, minorAxis, startAngle, sweepAngle);

Return Value

Type | Description
SketchEllipticalArc | Returns the newly created SketchEllipticalArc or null if the creation failed.

Parameters

Name | Type | Description
centerPoint | Base | The center point of the ellipse. This can be either an existing SketchPoint or a Point3D object.
majorAxis | Vector3D | The direction of the major axis. The magnitude of this vector defines the major radius.
minorAxis | Vector3D | The direction of the minor axis. The magnitude of this vector defines the minor radius. This vector should be perpendicular to the major axis.
startAngle | double | The start angle of the elliptical arc in radians, where 0 is along the major axis.
sweepAngle | double | The sweep angle of the elliptical arc in radians, where a positive value is counterclockwise.

Version

Introduced in version May 2022


SketchEllipticalArcs.addByEndPoints Method

Parent Object: SketchEllipticalArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Creates an elliptical sketch arc where the sweep of the arc is defined by two points.

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
returnValue = sketchEllipticalArcs_var.addByEndPoints(centerPoint, majorAxis, minorAxis, startPoint, endPoint)
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

#include <Fusion/Sketch/SketchEllipticalArcs.h>

returnValue = sketchEllipticalArcs_var->addByEndPoints(centerPoint, majorAxis, minorAxis, startPoint, endPoint);

Return Value

Type | Description
SketchEllipticalArc | Returns the newly created SketchEllipticalArc or null if the creation failed.

Parameters

Name | Type | Description
centerPoint | Base | The center point of the ellipse. This can be either an existing SketchPoint or a Point3D object.
majorAxis | Vector3D | The direction of the major axis. The magnitude of this vector defines the major radius.
minorAxis | Vector3D | The direction of the minor axis. The magnitude of this vector defines the minor radius. This vector should be perpendicular to the major axis.
startPoint | Base | The start point of the elliptical arc. This can be either an existing SketchPoint or a Point3D object. The point should lie on the defined ellipse.
endPoint | Base | The end point of the elliptical arc. This can be either an existing SketchPoint or a Point3D object. The point should lie on the defined ellipse and the elliptical arc is defined by a counterclockwise sweep from the start point to the end point.

Version

Introduced in version May 2022


SketchEllipticalArcs.classType Method

Parent Object: SketchEllipticalArcs
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Returns the number of elliptical arcs in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

Function that returns the specified sketch elliptical arc using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEllipticalArcs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

This object represents all geometry in a sketch, including all the various curves, points, and text.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CircularPatternConstraint.createdEntities, CircularPatternConstraint.entities, CircularPatternConstraintInput.entities, CoincidentConstraint.entity, ProfileCurve.sketchEntity, RectangularPatternConstraint.createdEntities, RectangularPatternConstraint.entities, RectangularPatternConstraintInput.entities, Sketch.createSpunProfile, Sketch.intersectWithSketchPlane, Sketch.project2, Sketch.projectToSurface, SketchEntityList.item, SketchLinearDiameterDimension.entityTwo, SketchLinearDimension.entityOne, SketchLinearDimension.entityTwo, SketchOffsetDimension.entityTwo, SketchTangentDistanceDimension.entityOne, SymmetryConstraint.entityOne, SymmetryConstraint.entityTwo

Derived Classes

SketchCurve, SketchPoint, SketchText

Version

Introduced in version August 2014


SketchEntity.assemblyContext Property

Parent Object: SketchEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Deletes the entity from the sketch.

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.entityToken Property

Parent Object: SketchEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.entityToken
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
string propertyValue = sketchEntity_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchEntity.geometricConstraints Property

Parent Object: SketchEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isLinked
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchEntity.isReference Property

Parent Object: SketchEntity
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntity.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

A list of sketch entities.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchPoint.connectedEntities

Version

Introduced in version June 2015


SketchEntityList.classType Method

Parent Object: SketchEntityList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

Returns the number of sketch entities in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

Function that returns the specified sketch entity using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchEntityList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Provides access to the sketches within a design and provides methods to create new sketches.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.sketches, FlatPatternComponent.sketches

Samples

Name | Description
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Creates a new sketch on the specified planar entity.

Syntax

  • 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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
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.
Sketches.add | Demonstrates the Sketches.add method.

Version

Introduced in version August 2014


Sketches.add

Description

Demonstrates the Sketches.add method.

Code Samples

  • Python
def demo_Sketches_add(rootComp: adsk.fusion.Design.rootComponent):
    # Get the X-Y base construction plane.
    xYPlane = rootComp.xYConstructionPlane

    # Create a sketch on the indicated plane.
    sketches = rootComp.sketches
    sketch = sketches.add(xYPlane)


Sketches.addToBaseOrFormFeature Method

Parent Object: Sketches
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

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.

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.
Sketches.addToBaseOrFormFeature | Demonstrates the Sketches.addToBaseOrFormFeature method.

Version

Introduced in version May 2016


Sketches.addWithoutEdges Method

Parent Object: Sketches
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Creates a new sketch on the specified planar entity. 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Returns the number of sketches in a component

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.

Samples

Name | Description
Delete Empty Components | Deletes empty components from the active design.

Version

Introduced in version August 2014


Sketches.isValid Property

Parent Object: Sketches
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Function that returns the specified sketch using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

Returns the sketch with the specified name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/Sketches.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

A fitted spline in a sketch.

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.
addFitPoint | Creates a new fit point at the specified parameter value.
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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Samples

Name | Description
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version August 2014


SketchFittedSpline.activateCurvatureHandle Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.

Samples

Name | Description
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version April 2019


SketchFittedSpline.activateTangentHandle Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.addFitPoint Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Creates a new fit point at the specified parameter value.

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.addFitPoint(parameter)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->addFitPoint(parameter);

Return Value

Type | Description
SketchPoint | Returns the newly created SketchPoint that acts as the fit point. Fails in the case where an invalid parameter is specified.

Parameters

Name | Type | Description
parameter | double | The parameter value at the position along the curve where you want to add the new fit point. The CurveEvaluator3D object provides utilities that support going from a 3D coordinate to a parameter value on the curve.

Version

Introduced in version September 2022


SketchFittedSpline.assemblyContext Property

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.entityToken Property

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.entityToken
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
string propertyValue = sketchFittedSpline_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchFittedSpline.extend Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.

Samples

Name | Description
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version August 2014


SketchFittedSpline.geometricConstraints Property

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.

Samples

Name | Description
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version April 2019


SketchFittedSpline.getTangentHandle Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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.

Samples

Name | Description
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version April 2019


SketchFittedSpline.intersections Method

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isLinked
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchFittedSpline.isReference Property

Parent Object: SketchFittedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

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.

Methods

Name | Description
add | Creates a new fitted spline through the specified points.
addByNurbsCurve | **RETIRED** 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchFittedSplines

Samples

Name | Description
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version August 2014


SketchFittedSplines.add Method

Parent Object: SketchFittedSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

Creates a new fitted spline through the specified points.

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
GeometricConstraints.addSmooth | Demonstrate the GeometricConstraints.addSmooth method.
SketchFittedSplines.add | Demonstrates the SketchFittedSplines.add method.
Sketch spline through points creation and relative functions API Sample | Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

Version

Introduced in version August 2014


SketchFittedSplines.add

Description

Demonstrates the SketchFittedSplines.add method.

Code Samples

  • Python
def demo_FittedSplines_add(sketch: adsk.fusion.Sketch):
    # 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
    splines = sketch.sketchCurves.sketchFittedSplines
    spline = splines.add(points)


SketchFittedSplines.addByNurbsCurve Method

Parent Object: SketchFittedSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This method has been retired and replaced by the addByNurbsCurve method on the SketchFixedSplines collection. Using this method creates a curve that can have unreliable behavior if it is edited in any way. The new method will create a stable curve and also supports the ability to modify it by providing a new NURBS curve definition.

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
Retired in version September 2022


SketchFittedSplines.classType Method

Parent Object: SketchFittedSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

Returns the number of fitted splines in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

Function that returns the specified sketch fitted spline using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFittedSplines.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

The SketchFixedSpline class represents splines in a sketch that are not editable. 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.

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 (Point3D)
replaceGeometry | Replaces the underlying NURBS curve that defines the shape of the fixed curve. This can only be used if the isNative property of the SketchFixedSpline returns false.
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.addByNurbsCurve, SketchFixedSplines.item

Version

Introduced in version August 2014


SketchFixedSpline.assemblyContext Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

The sketch point at the end of the spline.

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.entityToken Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.entityToken
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
string propertyValue = sketchFixedSpline_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchFixedSpline.evaluator Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isLinked
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchFixedSpline.isReference Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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.replaceGeometry Method

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Replaces the underlying NURBS curve that defines the shape of the fixed curve. This can only be used if the isNative property of the SketchFixedSpline returns false.

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
returnValue = sketchFixedSpline_var.replaceGeometry(nurbsCurve)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

returnValue = sketchFixedSpline_var->replaceGeometry(nurbsCurve);

Return Value

Type | Description
boolean | Returns true if the replacement was successful.

Parameters

Name | Type | Description
nurbsCurve | NurbsCurve3D | A NurbsCurve3D object that defines a valid NURBS curve and will be used to replace the existing geometry definition.

Version

Introduced in version December 2020


SketchFixedSpline.sketchDimensions Property

Parent Object: SketchFixedSpline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

The sketch point at the start of the spline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSpline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

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.

Methods

Name | Description
addByNurbsCurve | Creates a new fixed spline using the input NurbsCurve3D to define the shape. The resulting curve is not editable by the user but can be updated via the API using the replaceGeometry method on the SketchFixedSpline 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().
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchFixedSplines

Samples

Name | Description
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Version

Introduced in version August 2014


SketchFixedSplines.addByNurbsCurve Method

Parent Object: SketchFixedSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

Creates a new fixed spline using the input NurbsCurve3D to define the shape. The resulting curve is not editable by the user but can be updated via the API using the replaceGeometry method on the SketchFixedSpline object.

Syntax

  • Python
  • C++
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.
returnValue = sketchFixedSplines_var.addByNurbsCurve(nurbsCurve)
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.

#include <Fusion/Sketch/SketchFixedSplines.h>

returnValue = sketchFixedSplines_var->addByNurbsCurve(nurbsCurve);

Return Value

Type | Description
SketchFixedSpline | Returns the newly created SketchFixedSpline 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.

Samples

Name | Description
SketchFixedSplines.addByNurbsCurve | Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Version

Introduced in version December 2020


SketchFixedSplines.addByNurbsCurve

Description

Demonstrates the SketchFixedSplines.addByNurbsCurve method.

Code Samples

  • Python
def demo_FixedSplines_addByNurbsCurve(sketch: adsk.fusion.Sketch):
    # Define three points and create an arc along those points
    pointOne = adsk.core.Point3D.create(0,0,0)
    pointTwo = adsk.core.Point3D.create(6,9,0)
    pointThree = adsk.core.Point3D.create(15,12,0)
    arc3D = adsk.core.Arc3D.createByThreePoints(pointOne, pointTwo, pointThree)
    nurbsCurve = arc3D.asNurbsCurve

    # Create the spline using the 3D curve
    splines = sketch.sketchCurves.sketchFixedSplines
    fixedSpline = splines.addByNurbsCurve(nurbsCurve)


SketchFixedSplines.classType Method

Parent Object: SketchFixedSplines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

Returns the number of fitted splines in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

Function that returns the specified sketch fixed spline using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchFixedSplines.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

A line in a sketch.

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 (Point3D)
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isCenterLine | Gets and sets whether this line is defined as a centerline.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, LineOnPlanarSurfaceConstraint.line, LineParallelToPlanarSurfaceConstraint.line, MultiLineTextDefinition.rectangleLines, ParallelConstraint.lineOne, ParallelConstraint.lineTwo, PerpendicularConstraint.lineOne, PerpendicularConstraint.lineTwo, PolygonConstraint.lines, RectangularPatternConstraint.directionOneEntity, RectangularPatternConstraint.directionTwoEntity, RectangularPatternConstraintInput.directionOneEntity, RectangularPatternConstraintInput.directionTwoEntity, SketchAngularDimension.lineOne, SketchAngularDimension.lineTwo, SketchControlPointSpline.controlFrameLines, SketchDistanceBetweenLineAndPlanarSurfaceDimension.line, SketchEllipse.majorAxisLine, SketchEllipse.minorAxisLine, SketchFittedSpline.activateTangentHandle, SketchFittedSpline.getTangentHandle, SketchLine.createForAssemblyContext, SketchLine.nativeObject, SketchLinearDiameterDimension.line, SketchLineList.item, SketchLines.addAngleChamfer, SketchLines.addByTwoPoints, SketchLines.addDistanceChamfer, SketchLines.item, SketchOffsetDimension.line, SymmetryConstraint.symmetryLine, VerticalConstraint.line

Version

Introduced in version August 2014


SketchLine.assemblyContext Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Deletes the entity from the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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.

Samples

Name | Description
SketchDimensions.addAngularDimension | Demonstrates the SketchDimension.addAngularDimension method.

Version

Introduced in version August 2014


SketchLine.entityToken Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.entityToken
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
string propertyValue = sketchLine_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchLine.extend Method

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Extend a curve by specifying a point that determines the end of the curve to extend

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the transient geometry of the line which provides geometry information about the line. The returned geometry is always in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Get the curves that intersect this curve along with the intersection points (Point3D)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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.isCenterLine Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Gets and sets whether this line is defined as a centerline.

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isCenterLine

# Set the value of the property.
sketchLine_var.isCenterLine = 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->isCenterLine();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLine_var->isCenterLine(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2021


SketchLine.isConstruction Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Gets and sets whether this curve is construction geometry.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isLinked
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchLine.isReference Property

Parent Object: SketchLine
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the length of the curve in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Split a curve at a position specified along the curve

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLine.h>

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.

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


SketchLinearDiameterDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

A linear diameter dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addLinearDiameterDimension, SketchLinearDiameterDimension.createForAssemblyContext, SketchLinearDiameterDimension.nativeObject

Version

Introduced in version September 2022


SketchLinearDiameterDimension.assemblyContext Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

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.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.assemblyContext
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchLinearDiameterDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.attributes Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.attributes
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchLinearDiameterDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.classType Method

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchLinearDiameterDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

returnValue = adsk::fusion::SketchLinearDiameterDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.createForAssemblyContext Method

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

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.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
returnValue = sketchLinearDiameterDimension_var.createForAssemblyContext(occurrence)
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

returnValue = sketchLinearDiameterDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchLinearDiameterDimension | 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 2022


SketchLinearDiameterDimension.deleteMe Method

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
returnValue = sketchLinearDiameterDimension_var.deleteMe()
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

returnValue = sketchLinearDiameterDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.entityToken Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.entityToken
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
string propertyValue = sketchLinearDiameterDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.entityTwo Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

The second entity being constrained. (a parallel SketchLine or a SketchPoint)

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.entityTwo
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = sketchLinearDiameterDimension_var->entityTwo();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.isDeletable Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Indicates if this dimension is deletable.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.isDeletable
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDiameterDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.isDriving Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.isDriving

# Set the value of the property.
sketchLinearDiameterDimension_var.isDriving = propertyValue
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDiameterDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLinearDiameterDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.isValid Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.isValid
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDiameterDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.line Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

The first line being constrained.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.line
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchLinearDiameterDimension_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.nativeObject Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

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.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.nativeObject
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<SketchLinearDiameterDimension> propertyValue = sketchLinearDiameterDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchLinearDiameterDimension.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.objectType Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.objectType
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
string propertyValue = sketchLinearDiameterDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.parameter Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.parameter
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchLinearDiameterDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.parentSketch Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.parentSketch
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchLinearDiameterDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.textPosition Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Gets and sets position of the dimension text.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.textPosition

# Set the value of the property.
sketchLinearDiameterDimension_var.textPosition = propertyValue
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchLinearDiameterDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchLinearDiameterDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2022


SketchLinearDiameterDimension.value Property

Parent Object: SketchLinearDiameterDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDiameterDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.

# Get the value of the property.
propertyValue = sketchLinearDiameterDimension_var.value

# Set the value of the property.
sketchLinearDiameterDimension_var.value = propertyValue
"sketchLinearDiameterDimension_var" is a variable referencing a SketchLinearDiameterDimension object.
#include <Fusion/Sketch/SketchLinearDiameterDimension.h>

// Get the value of the property.
double propertyValue = sketchLinearDiameterDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchLinearDiameterDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2022


SketchLinearDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

A linear dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addDistanceDimension, SketchLinearDimension.createForAssemblyContext, SketchLinearDimension.nativeObject

Version

Introduced in version August 2014


SketchLinearDimension.assemblyContext Property

Parent Object: SketchLinearDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

The first entity being constrained.

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.entityToken Property

Parent Object: SketchLinearDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.entityToken
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
string propertyValue = sketchLinearDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchLinearDimension.entityTwo Property

Parent Object: SketchLinearDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

The second entity being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

The orientation of this dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchLinearDimension.value Property

Parent Object: SketchLinearDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.value

# Set the value of the property.
sketchLinearDimension_var.value = propertyValue
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
double propertyValue = sketchLinearDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchLinearDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchLineList Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

A list of sketch lines.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchLines.addCenterPointRectangle, SketchLines.addEdgePolygon, SketchLines.addScribedPolygon, SketchLines.addThreePointRectangle, SketchLines.addTwoPointRectangle, SketchText.boundaryLines

Version

Introduced in version August 2014


SketchLineList.classType Method

Parent Object: SketchLineList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

Returns the number of sketch lines in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

Function that returns the specified sketch line using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLineList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

The collection of lines in a sketch. This provides access to the existing lines and supports the methods to create new lines.

Methods

Name | Description
addAngleChamfer | Creates a chamfer between two sketch lines. In the case where the two input lines cross each other creating an "X" shape, this results in four quadrants where the chamfer can be placed. The point arguments are used to define which of the four quadrants the chamfer should be created in. The two points define which side of the two lines should be kept and the other end will be trimmed by the chamfer. The easiest way to use this is to use the end points of the lines on the side you want to keep. In the case where the lines don't intersect or connect at the end points, there is only one valid quadrant for the chamfer so the points are ignored.
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.
addDistanceChamfer | Creates a chamfer between two sketch lines. In the case where the two input lines cross each other creating an "X" shape, this results in four quadrants where the chamfer can be placed. The point arguments are used to define which of the four quadrants the chamfer should be created in. The two points define which side of the two lines should be kept and the other end will be trimmed by the chamfer. The easiest way to use this is to use the end points of the lines on the side you want to keep. In the case where the lines don't intersect or connect at the end points, there is only one valid quadrant for the chamfer so the points are ignored.
addEdgePolygon | Creates a polygon where two points specify an edge of the polygon. By specifying an edge, the size and position of the polygon is also defined.
addScribedPolygon | Creates either an inscribed or circumscribed n-sided polygon.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchCurves.sketchLines

Samples

Name | Description
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.
SketchLines.addAngleChamfer | Demonstrates the SketchLines.addAngleChamfer method.
SketchLines.addByTwoPoints | Demonstrates the SketchLines.addByTwoPoints method.
SketchLines.addCenterPointRectangle | Demonstrates the SketchLines.addCenterPointRectangle method.
SketchLines.addDistanceChamfer | Demonstrates the SketchLines.addDistanceChamfer method.
SketchLines.addThreePointRectangle | Demonstrates the SketchLines.addThreePointRectangle method.
SketchLines.addTwoPointRectangle | Demonstrates the SketchLines.addTwoPointRectangle method.

Version

Introduced in version August 2014


SketchLines.addAngleChamfer Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Creates a chamfer between two sketch lines. In the case where the two input lines cross each other creating an "X" shape, this results in four quadrants where the chamfer can be placed. The point arguments are used to define which of the four quadrants the chamfer should be created in. The two points define which side of the two lines should be kept and the other end will be trimmed by the chamfer. The easiest way to use this is to use the end points of the lines on the side you want to keep. In the case where the lines don't intersect or connect at the end points, there is only one valid quadrant for the chamfer so the points are ignored.

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addAngleChamfer(firstLine, firstLinePoint, secondLine, secondLinePoint, distance, angle)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addAngleChamfer(firstLine, firstLinePoint, secondLine, secondLinePoint, distance, angle);

Return Value

Type | Description
SketchLine | Returns the newly created SketchLine object that represents the chamfer or null if the creation failed.

Parameters

Name | Type | Description
firstLine | SketchLine | The first line you want to chamfer.
firstLinePoint | Point3D | A point on the first line that is on the side of the intersection with the second line that you want to keep.
secondLine | SketchLine | The second line you want to chamfer.
secondLinePoint | Point3D | A point on the second line that is on the side of the intersection with the first line that you want to keep.
distance | double | Defines the distance of the start point of the chamfer from the intersection point of the two lines along the first line. The distance is defined in centimeters.
angle | double | Defines the angle of the chamfer as measured from the first line. The angle is defined in radians.

Samples

Name | Description
Sketch Chamfer API Sample | Demonstrates creating a new sketch point.
SketchLines.addAngleChamfer | Demonstrates the SketchLines.addAngleChamfer method.

Version

Introduced in version March 2021


SketchLines.addAngleChamfer

Description

Demonstrates the SketchLines.addAngleChamfer method.

Code Samples

  • Python
def demo_Lines_addAngleChamfer(sketch: adsk.fusion.Sketch):
    # Create lines for the angle chamfer parameters
    lineOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                             adsk.core.Point3D.create(10, 0, 0))
    lineTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(5 ,4, 0),
                                                             adsk.core.Point3D.create(19, 13, 0))
    firstLinePoint = adsk.core.Point3D.create(3, 0, 0)
    secondLinePoint = adsk.core.Point3D.create(5, 4, 0)
    distance = 2.0
    angle = 0.610865

    # Create the chamfer between the two lines
    chamfer = sketch.sketchCurves.sketchLines
    angleChamfer = chamfer.addAngleChamfer(lineOne, firstLinePoint, lineTwo, secondLinePoint, distance, angle)


SketchLines.addByTwoPoints Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.
SketchArcs.addFillet | Demonstrates the SketchArcs.addFillet method.
SketchCircles.addByThreeTangents | Demonstrates the SketchCircles.addByThreeTangets method.
SketchCircles.addByTwoTangents | Demonstrates the SketchCircles.addByTwoTangets method.
SketchLines.addAngleChamfer | Demonstrates the SketchLines.addAngleChamfer method.
SketchLines.addByTwoPoints | Demonstrates the SketchLines.addByTwoPoints method.
SketchLines.addDistanceChamfer | Demonstrates the SketchLines.addDistanceChamfer method.

Version

Introduced in version August 2014


SketchLines.addByTwoPoints

Description

Demonstrates the SketchLines.addByTwoPoints method.

Code Samples

  • Python
def demo_Lines_addByTwoPoints(sketch: adsk.fusion.Sketch):
    # Define two points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    endPoint = adsk.core.Point3D.create(10, 0, 0)

    # Create the line using the two points
    lines = sketch.sketchCurves.sketchLines
    line = lines.addByTwoPoints(startPoint, endPoint)


SketchLines.addCenterPointRectangle Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
SketchLines.addCenterPointRectangle | Demonstrates the SketchLines.addCenterPointRectangle method.

Version

Introduced in version August 2014


SketchLines.addCenterPointRectangle

Description

Demonstrates the SketchLines.addCenterPointRectangle method.

Code Samples

  • Python
def demo_Lines_addCenterPointRectangle(sketch: adsk.fusion.Sketch):
    # Define two points
    centerPoint = adsk.core.Point3D.create(5, 5, 0)
    cornerPoint = adsk.core.Point3D.create(25, 25, 0)

    # Create the rectangle using the points
    rectangles = sketch.sketchCurves.sketchLines
    rectangle = rectangles.addCenterPointRectangle(centerPoint, cornerPoint)


SketchLines.addDistanceChamfer Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Creates a chamfer between two sketch lines. In the case where the two input lines cross each other creating an "X" shape, this results in four quadrants where the chamfer can be placed. The point arguments are used to define which of the four quadrants the chamfer should be created in. The two points define which side of the two lines should be kept and the other end will be trimmed by the chamfer. The easiest way to use this is to use the end points of the lines on the side you want to keep. In the case where the lines don't intersect or connect at the end points, there is only one valid quadrant for the chamfer so the points are ignored.

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addDistanceChamfer(firstLine, firstLinePoint, secondLine, secondLinePoint, distanceOne, distanceTwo)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addDistanceChamfer(firstLine, firstLinePoint, secondLine, secondLinePoint, distanceOne, distanceTwo);

Return Value

Type | Description
SketchLine | Returns the newly created SketchLine object that represents the chamfer or null if the creation failed.

Parameters

Name | Type | Description
firstLine | SketchLine | The first line you want to chamfer.
firstLinePoint | Point3D | A point on the first line that is on the side of the intersection with the second line that you want to keep.
secondLine | SketchLine | The second line you want to chamfer.
secondLinePoint | Point3D | A point on the second line that is on the side of the intersection with the first line that you want to keep.
distanceOne | double | Defines the distance of the start point of the chamfer line from the intersection point of the two lines along the first line. The distance is defined in centimeters.
distanceTwo | double | Defines the distance of the start point of the chamfer line from the intersection point of the two lines along the second line. The distance is defined in centimeters.

Samples

Name | Description
Sketch Chamfer API Sample | Demonstrates creating a new sketch point.
SketchLines.addDistanceChamfer | Demonstrates the SketchLines.addDistanceChamfer method.

Version

Introduced in version March 2021


SketchLines.addDistanceChamfer

Description

Demonstrates the SketchLines.addDistanceChamfer method.

Code Samples

  • Python
def demo_Lines_addDistanceChamfer(sketch: adsk.fusion.Sketch):
    # Create lines that will be chamfered
    lineOne = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0),
                                                             adsk.core.Point3D.create(10, 0, 0))
    lineTwo = sketch.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(5, 4, 0),
                                                             adsk.core.Point3D.create(19, 13, 0))

    # Define the input parameters.
    firstLinePoint = adsk.core.Point3D.create(3, 0, 0)
    secondLinePoint = adsk.core.Point3D.create(5, 4, 0)
    distanceOne = 2.0
    distanceTwo = 5.0

    # Create the chamfer between the two lines
    chamfer = sketch.sketchCurves.sketchLines
    distanceChamfer = chamfer.addDistanceChamfer(lineOne, firstLinePoint, lineTwo, secondLinePoint, distanceOne, distanceTwo)


SketchLines.addEdgePolygon Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Creates a polygon where two points specify an edge of the polygon. By specifying an edge, the size and position of the polygon is also defined.

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addEdgePolygon(pointOne, pointTwo, isRight, edgeCount)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addEdgePolygon(pointOne, pointTwo, isRight, edgeCount);

Return Value

Type | Description
SketchLineList | Returns a list of the sketch lines that were created to represent the polygon or null in the case of bad input.

Parameters

Name | Type | Description
pointOne | Base | The first point of the edge.
pointTwo | Base | The second point of the edge.
isRight | boolean | After defining points one and two, a polygon can be created on either side of the line defined by the two points. This argument specifies which side of the line the polygon will be created on. If this is true, the polygon will be created to the right of the line from the perspective of looking from point one to point two. If false, it will be to the left of the line.
edgeCount | integer | The number of edges in the resulting polygon.

Version

Introduced in version January 2024


SketchLines.addScribedPolygon Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Creates either an inscribed or circumscribed n-sided polygon.

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addScribedPolygon(centerPoint, edgeCount, angle, radius, isInscribed)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addScribedPolygon(centerPoint, edgeCount, angle, radius, isInscribed);

Return Value

Type | Description
SketchLineList | Returns a list of the sketch lines that were created to represent the polygon or null in the case of bad input.

Parameters

Name | Type | Description
centerPoint | Base | Either an existing SketchPoint or a Point3D object that defines the center point of the polygon. If a SketchPoint object is provided the point will continue to control the center of the polygon.
edgeCount | integer | The number of edges in the resulting polygon.
angle | double | Controls the rotation of the polygon around the center point. For a circumscribed polygon, this defines where the center of one of the edges will be positioned. For an inscribed polygon, this defines where one of the corners of the polygon will be positioned.
radius | double | The radius of the circle in centimeters that the polygon goes to, either outside (circumscribed) or inside (inscribed) the circle.
isInscribed | boolean | Specifies if a circumscribed or inscribed polygon should be created.

Version

Introduced in version January 2024


SketchLines.addThreePointRectangle Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
SketchLines.addThreePointRectangle | Demonstrates the SketchLines.addThreePointRectangle method.

Version

Introduced in version August 2014


SketchLines.addThreePointRectangle

Description

Demonstrates the SketchLines.addThreePointRectangle method.

Code Samples

  • Python
def demo_Lines_addThreePointRectangle(sketch: adsk.fusion.Sketch):
    # Define three points
    pointOne = adsk.core.Point3D.create(0, 0, 0)
    pointTwo = adsk.core.Point3D.create(5, 15, 0)
    pointThree = adsk.core.Point3D.create(-5, -6, 0)

    # Create the rectangle using the points
    rectangles = sketch.sketchCurves.sketchLines
    rectangle = rectangles.addThreePointRectangle(pointOne, pointTwo, pointThree)


SketchLines.addTwoPointRectangle Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

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.

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
API Sample that demonstrates creating sketch lines in various ways. | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Sketch Chamfer API Sample | Demonstrates creating a new sketch point.
SketchLines.addTwoPointRectangle | Demonstrates the SketchLines.addTwoPointRectangle method.

Version

Introduced in version August 2014


SketchLines.addTwoPointRectangle

Description

Demonstrates the SketchLines.addTwoPointRectangle method.

Code Samples

  • Python
def demo_Lines_addTwoPointRectangle(sketch: adsk.fusion.Sketch):
    # Define two points
    pointOne = adsk.core.Point3D.create(0, 0, 0)
    pointTwo = adsk.core.Point3D.create(5, 15, 0)

    # Create the rectangle using the points
    rectangles = sketch.sketchCurves.sketchLines
    rectangle = rectangles.addTwoPointRectangle(pointOne, pointTwo)


SketchLines.classType Method

Parent Object: SketchLines
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Returns the number of lines in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

Function that returns the specified sketch line using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLines.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

A SketchOffsetCurvesDimension object is created automatically whenever curves are offset.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchOffsetCurvesDimension.createForAssemblyContext, SketchOffsetCurvesDimension.nativeObject

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.assemblyContext Property

Parent Object: SketchOffsetCurvesDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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.entityToken Property

Parent Object: SketchOffsetCurvesDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.entityToken
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
string propertyValue = sketchOffsetCurvesDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchOffsetCurvesDimension.isDeletable Property

Parent Object: SketchOffsetCurvesDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchOffsetCurvesDimension.value Property

Parent Object: SketchOffsetCurvesDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetCurvesDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.value

# Set the value of the property.
sketchOffsetCurvesDimension_var.value = propertyValue
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
double propertyValue = sketchOffsetCurvesDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchOffsetCurvesDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchOffsetDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

An offset dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addOffsetDimension, SketchOffsetDimension.createForAssemblyContext, SketchOffsetDimension.nativeObject

Version

Introduced in version August 2014


SketchOffsetDimension.assemblyContext Property

Parent Object: SketchOffsetDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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.entityToken Property

Parent Object: SketchOffsetDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.entityToken
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
string propertyValue = sketchOffsetDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchOffsetDimension.entityTwo Property

Parent Object: SketchOffsetDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

The second entity being constrained. (a parallel SketchLine or a SketchPoint)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

The first line being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchOffsetDimension.value Property

Parent Object: SketchOffsetDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchOffsetDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.value

# Set the value of the property.
sketchOffsetDimension_var.value = propertyValue
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
double propertyValue = sketchOffsetDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchOffsetDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchPoint Object

Derived from: SketchEntity Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

A point within a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
detach | This method disconnects the specified curve from the sketch point. The specified curve must use this point as one of its endpoints, and at least one other sketch curve must also use the point as its endpoint. Detaching the curve creates a new sketch point, which becomes the curve's end point. All other curves using the original sketch point will remain unaffected.
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.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

CircularPatternConstraint.centerPoint, CircularPatternConstraintInput.centerPoint, CoincidentConstraint.point, CoincidentToSurfaceConstraint.point, HorizontalPointsConstraint.pointOne, HorizontalPointsConstraint.pointTwo, MidPointConstraint.point, PolygonConstraint.centerPoint, PolygonConstraint.points, SharedPointCoincident.point, Sketch.originPoint, SketchArc.centerSketchPoint, SketchArc.endSketchPoint, SketchArc.startSketchPoint, SketchCircle.centerSketchPoint, SketchConicCurve.apexSketchPoint, SketchConicCurve.endSketchPoint, SketchConicCurve.startSketchPoint, SketchControlPointSpline.controlPoints, SketchControlPointSpline.endSketchPoint, SketchControlPointSpline.startSketchPoint, SketchDistanceBetweenPointAndSurfaceDimension.point, SketchEllipse.centerSketchPoint, SketchEllipticalArc.centerSketchPoint, SketchEllipticalArc.endSketchPoint, SketchEllipticalArc.startSketchPoint, SketchFittedSpline.addFitPoint, SketchFittedSpline.endSketchPoint, SketchFittedSpline.startSketchPoint, SketchFixedSpline.endSketchPoint, SketchFixedSpline.startSketchPoint, SketchLine.endSketchPoint, SketchLine.startSketchPoint, SketchPoint.createForAssemblyContext, SketchPoint.detach, 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.add

Description

Demonstrates the SketchPoint.add method.

Code Samples

  • Python
def  demo_SketchPoint_add(sketch: adsk.fusion.Sketch):
    somePoint = adsk.core.Point3D.create(5, 4, 0)
    sketchPoints = sketch.sketchPoints
    point = sketchPoints.add(somePoint)


SketchPoint.assemblyContext Property

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Deletes the entity from the sketch.

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.detach Method

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

This method disconnects the specified curve from the sketch point. The specified curve must use this point as one of its endpoints, and at least one other sketch curve must also use the point as its endpoint. Detaching the curve creates a new sketch point, which becomes the curve's end point. All other curves using the original sketch point will remain unaffected.

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.
returnValue = sketchPoint_var.detach(curve)
"sketchPoint_var" is a variable referencing a SketchPoint object.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = sketchPoint_var->detach(curve);

Return Value

Type | Description
SketchPoint | If successful, the newly created sketch point that the curve was moved to is returned. Null is returned in the case of failure. Typical failure cases are if the specified curve is the only curve connected to the point or if the curve is not connected to the point.

Parameters

Name | Type | Description
curve | SketchCurve | The sketch curve to detach from the sketch point. One of its end points must be the sketch point.

Version

Introduced in version March 2025


SketchPoint.entityToken Property

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.entityToken
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
string propertyValue = sketchPoint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchPoint.geometricConstraints Property

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns a Point3D object which provides the position of the sketch point. The returned geometry is always in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Indicates if this sketch entity is fully constrained.

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.isLinked Property

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isLinked
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchPoint.isReference Property

Parent Object: SketchPoint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned by a sketch point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sketchPoint | Returns the sketch point that defines the center of the hole.

Version

Introduced in version January 2015


SketchPointHolePositionDefinition.classType Method

Parent Object: SketchPointHolePositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointHolePositionDefinition.h>

Description

Returns the sketch point that defines the center of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

A list of sketch points.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

SketchFittedSpline.fitPoints

Version

Introduced in version August 2014


SketchPointList.classType Method

Parent Object: SketchPointList
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

Returns the number of sketch points in the list.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

Function that returns the specified sketch point using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPointList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

A collection of sketch points.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Sketch.sketchPoints

Samples

Name | Description
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
SketchPoint.add | Demonstrates the SketchPoint.add method.
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoints.add Method

Parent Object: SketchPoints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

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.

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
GeometricConstraint.addMidPont | Demonstrate the GeometricConstraint.addMidPont method.
GeometricConstraints.addCoincident | Demonstrates the GeometricConstraints.addCoincident method.
SketchPoint.add | Demonstrates the SketchPoint.add method.
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoints.classType Method

Parent Object: SketchPoints
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

Returns the number of sketch points in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

Function that returns the specified sketch using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchPoints.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SketchPointsBossPositionDefinition Object

Derived from: BossPositionDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

Description

Provides positioning information for a boss feature that is positioned by a sketch point(s).

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sketchPoints | Returns the sketch points that defines the position of the boss feature.

Version

Introduced in version October 2022


SketchPointsBossPositionDefinition.classType Method

Parent Object: SketchPointsBossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPointsBossPositionDefinition.classType()
This is a static method.

#include <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

returnValue = adsk::fusion::SketchPointsBossPositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


SketchPointsBossPositionDefinition.isValid Property

Parent Object: SketchPointsBossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsBossPositionDefinition_var.isValid
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.
#include <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

// Get the value of the property.
boolean propertyValue = sketchPointsBossPositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


SketchPointsBossPositionDefinition.objectType Property

Parent Object: SketchPointsBossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsBossPositionDefinition_var.objectType
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.
#include <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

// Get the value of the property.
string propertyValue = sketchPointsBossPositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


SketchPointsBossPositionDefinition.sketchPoints Property

Parent Object: SketchPointsBossPositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

Description

Returns the sketch points that defines the position of the boss feature.

Syntax

  • Python
  • C++
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsBossPositionDefinition_var.sketchPoints
"sketchPointsBossPositionDefinition_var" is a variable referencing a SketchPointsBossPositionDefinition object.
#include <Fusion/Plastic/SketchPointsBossPositionDefinition.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = sketchPointsBossPositionDefinition_var->sketchPoints();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version October 2022


SketchPointsHolePositionDefinition Object

Derived from: HolePositionDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointsHolePositionDefinition.h>

Description

Provides positioning information for a hole that is positioned by a sketch point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sketchPoints | Returns the sketch point that defines the center of the hole.

Version

Introduced in version March 2016


SketchPointsHolePositionDefinition.classType Method

Parent Object: SketchPointsHolePositionDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointsHolePositionDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointsHolePositionDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointsHolePositionDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SketchPointsHolePositionDefinition.h>

Description

Returns the sketch point that defines the center of the hole.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

An radial dimension in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addRadialDimension, SketchRadialDimension.createForAssemblyContext, SketchRadialDimension.nativeObject

Version

Introduced in version August 2014


SketchRadialDimension.assemblyContext Property

Parent Object: SketchRadialDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

The arc or circle being constrained.

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.entityToken Property

Parent Object: SketchRadialDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.entityToken
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
string propertyValue = sketchRadialDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchRadialDimension.isDeletable Property

Parent Object: SketchRadialDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Indicates if this dimension is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Gets and sets position of the dimension text.

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


SketchRadialDimension.value Property

Parent Object: SketchRadialDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchRadialDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.value

# Set the value of the property.
sketchRadialDimension_var.value = propertyValue
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
double propertyValue = sketchRadialDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchRadialDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchSelection Object

Derived from: CurveSelection Object
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Represents a sketch curve selection. It allows entire sketches for the input geometry. The result of the value property call may contain duplicates.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
error | Preview Gets the last warning string encountered after the selection was applied to a parent.
hasError | Preview Gets if errors were encountered when applying the selection to a a parent.
hasWarning | Preview Gets if warnings were encountered when applying the selection to a parent.
inputGeometry | Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loopType | Property to get and set the desired loop type. The default is AllLoops.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
sideType | Property to get and set the desired side type. The default is StartOutside.
value | Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.
warning | Preview Gets the last warning string encountered after the selection was applied to a parent.

Accessed From

CurveSelections.createNewSketchSelection

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


SketchSelection.classType Method

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.SketchSelection.classType()
This is a static method.

#include <Cam/GeometrySelections/SketchSelection.h>

returnValue = adsk::cam::SketchSelection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2023


SketchSelection.error Property

Parent Object: SketchSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.error
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
string propertyValue = sketchSelection_var->error();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


SketchSelection.hasError Property

Parent Object: SketchSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Gets if errors were encountered when applying the selection to a a parent.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.hasError
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
boolean propertyValue = sketchSelection_var->hasError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


SketchSelection.hasWarning Property

Parent Object: SketchSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Gets if warnings were encountered when applying the selection to a parent.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.hasWarning
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
boolean propertyValue = sketchSelection_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


SketchSelection.inputGeometry Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Get or set the value of the input geometry. If the value originates from a component instead of an occurrence, or an occurrence outside of the CAM environment, then the subpath is checked against the CAM model tree. For some child classes, this may be the same as the value property, but might also consist of fewer elements. Valid elements depend on the capabilities of the derived class. An exception is thrown if the matching fails or the given entity does not match the expected type.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.inputGeometry

# Set the value of the property.
sketchSelection_var.inputGeometry = propertyValue
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = sketchSelection_var->inputGeometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = sketchSelection_var->inputGeometry(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


SketchSelection.isValid Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.isValid
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
boolean propertyValue = sketchSelection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2023


SketchSelection.loopType Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Property to get and set the desired loop type. The default is AllLoops.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.loopType

# Set the value of the property.
sketchSelection_var.loopType = propertyValue
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
LoopTypes propertyValue = sketchSelection_var->loopType();

// Set the value of the property, where value_var is a LoopTypes.
bool returnValue = sketchSelection_var->loopType(value_var);

Property Value

This is a read/write property whose value is a LoopTypes.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


SketchSelection.objectType Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.objectType
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
string propertyValue = sketchSelection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


SketchSelection.sideType Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Property to get and set the desired side type. The default is StartOutside.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.sideType

# Set the value of the property.
sketchSelection_var.sideType = propertyValue
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
SideTypes propertyValue = sketchSelection_var->sideType();

// Set the value of the property, where value_var is a SideTypes.
bool returnValue = sketchSelection_var->sideType(value_var);

Property Value

This is a read/write property whose value is a SideTypes.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Version

Introduced in version July 2023


SketchSelection.value Property

Parent Object: SketchSelection
Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Returns the resulting value of the selection. In general, this returns the input selection, but child classes can override the return value if needed. Refer to the child classes comments for further details. The collection may contain duplicates. For OperationInputs, the return value may not be the same as for Operations, as additional geometry selected by child classes is not evaluated for OperationInputs.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.value
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = sketchSelection_var->value();

Property Value

This is a read only property whose value is an array of type Base.

Version

Introduced in version July 2023


SketchSelection.warning Property

Parent Object: SketchSelection

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/GeometrySelections/SketchSelection.h>

Description

Gets the last warning string encountered after the selection was applied to a parent.

Syntax

  • Python
  • C++
"sketchSelection_var" is a variable referencing a SketchSelection object.

# Get the value of the property.
propertyValue = sketchSelection_var.warning
"sketchSelection_var" is a variable referencing a SketchSelection object.
#include <Cam/GeometrySelections/SketchSelection.h>

// Get the value of the property.
string propertyValue = sketchSelection_var->warning();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2023


SketchTangentDistanceDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

A distance dimension measuring to the tangent on one or two circles or arcs.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
circleOrArc | The second entity being constrained which is always a SketchCircle or SketchArc.
entityOne | The first entity being constrained. This can be a SketchCircle, SketchArc, SketchLine, or SketchPoint.
entityToken Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 over constrain the sketch. Fusion does not allow over-constrained 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
value Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addTangentDistanceDimension, SketchTangentDistanceDimension.createForAssemblyContext, SketchTangentDistanceDimension.nativeObject

Version

Introduced in version July 2022


SketchTangentDistanceDimension.assemblyContext Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.assemblyContext
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchTangentDistanceDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.attributes Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Returns the collection of attributes associated with this sketch dimension.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.attributes
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchTangentDistanceDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.circleOrArc Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

The second entity being constrained which is always a SketchCircle or SketchArc.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.circleOrArc
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchTangentDistanceDimension_var->circleOrArc();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.classType Method

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchTangentDistanceDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

returnValue = adsk::fusion::SketchTangentDistanceDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.createForAssemblyContext Method

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
returnValue = sketchTangentDistanceDimension_var.createForAssemblyContext(occurrence)
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

returnValue = sketchTangentDistanceDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchTangentDistanceDimension | 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 2022


SketchTangentDistanceDimension.deleteMe Method

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
returnValue = sketchTangentDistanceDimension_var.deleteMe()
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

returnValue = sketchTangentDistanceDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.entityOne Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

The first entity being constrained. This can be a SketchCircle, SketchArc, SketchLine, or SketchPoint.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.entityOne
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = sketchTangentDistanceDimension_var->entityOne();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.entityToken Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Returns a token for the SketchDimension object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch dimension.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.entityToken
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
string propertyValue = sketchTangentDistanceDimension_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.isDeletable Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Indicates if this dimension is deletable.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.isDeletable
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchTangentDistanceDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.isDriving Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

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 over constrain the sketch. Fusion does not allow over-constrained sketches.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.isDriving

# Set the value of the property.
sketchTangentDistanceDimension_var.isDriving = propertyValue
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchTangentDistanceDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchTangentDistanceDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.isValid Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.isValid
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
boolean propertyValue = sketchTangentDistanceDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.nativeObject Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

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.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.nativeObject
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<SketchTangentDistanceDimension> propertyValue = sketchTangentDistanceDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchTangentDistanceDimension.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.objectType Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.objectType
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
string propertyValue = sketchTangentDistanceDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.parameter Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Returns the associated parameter or null if there is no associated parameter.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.parameter
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchTangentDistanceDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.parentSketch Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Returns the parent sketch object.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.parentSketch
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchTangentDistanceDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.textPosition Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Gets and sets position of the dimension text.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.textPosition

# Set the value of the property.
sketchTangentDistanceDimension_var.textPosition = propertyValue
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchTangentDistanceDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchTangentDistanceDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version July 2022


SketchTangentDistanceDimension.value Property

Parent Object: SketchTangentDistanceDimension
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTangentDistanceDimension.h>

Description

Gets and sets the current value of the sketch dimension.

In a parametric modeling design and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a direct modeling design the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Syntax

  • Python
  • C++
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.

# Get the value of the property.
propertyValue = sketchTangentDistanceDimension_var.value

# Set the value of the property.
sketchTangentDistanceDimension_var.value = propertyValue
"sketchTangentDistanceDimension_var" is a variable referencing a SketchTangentDistanceDimension object.
#include <Fusion/Sketch/SketchTangentDistanceDimension.h>

// Get the value of the property.
double propertyValue = sketchTangentDistanceDimension_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchTangentDistanceDimension_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2022


SketchText Object

Derived from: SketchEntity Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Text in a sketch.

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().
createForAssemblyContext | Creates a proxy object for the SketchText object that represents the SketchText object in the context of an assembly. The context is defined by the input occurrence.
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.
redefineAsAlongPath | Sets this SketchTextInput to define text that follows along a specified path.
redefineAsFitOnPath | Sets this SketchTextInput to define text that fits along a specified path. Fitting on a path will space the characters so the text fits along the entire length of the path entity.

Properties

Name | Description
angle | **RETIRED** 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 | **RETIRED** 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.
definition | Gets the definition that is currently used to specify how the sketch text is defined.
entityToken Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
isHorizontalFlip | Gets and sets if the text is flipped horizontally.
isLinked | Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.
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.
isVerticalFlip | Gets and sets if the text is flipped vertically.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketch | Returns the parent sketch.
position | **RETIRED** 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

AlongPathTextDefinition.parentSketchText, FitOnPathTextDefintion.parentSketchText, MultiLineTextDefinition.parentSketchText, SketchText.createForAssemblyContext, SketchText.nativeObject, SketchTextDefinition.parentSketchText, SketchTexts.add, SketchTexts.item

Samples

Name | Description
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version March 2015


SketchText.angle Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.

Remarks

This was retired when Fusion added support for sketch along a curve and multi-line text, which neither supports getting and setting an angle. For multi-line text you can get the rectangle sketch lines that define the boundary of the text and manipulate those to move and rotate the text.

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
Retired in version January 2021


SketchText.asCurves Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This was retired when Fusion added support for sketch along a curve, which doesn't have the boundary lines. This functionality is replaced by the MultiLineTextDefinition.rectangleLines property.

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
Retired in version January 2021


SketchText.boundingBox Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns the bounding box of the entity in sketch space.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.createForAssemblyContext Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Creates a proxy object for the SketchText object that represents the SketchText object in the context of an assembly. The context is defined by the input occurrence.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.createForAssemblyContext(occurrence)
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchText | 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 2022


SketchText.definition Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets the definition that is currently used to specify how the sketch text is defined.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.definition
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<SketchTextDefinition> propertyValue = sketchText_var->definition();

Property Value

This is a read only property whose value is a SketchTextDefinition.

Version

Introduced in version December 2020


SketchText.deleteMe Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Deletes the entity from the sketch.

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.entityToken Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns a token for the SketchEntity object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same sketch entity.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.entityToken
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
string propertyValue = sketchText_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SketchText.explode Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Explodes the SketchText into a set of curves. The original SketchText is deleted as a result of calling this.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets and sets the name of the font to use.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns the sketch constraints that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets and sets the height of the text in centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Indicates if this curve lies entirely on the sketch x-y plane.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Indicates if this geometry is "fixed".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Indicates if this sketch entity is fully constrained.

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.isHorizontalFlip Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets and sets if the text is flipped horizontally.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isHorizontalFlip

# Set the value of the property.
sketchText_var.isHorizontalFlip = 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->isHorizontalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchText_var->isHorizontalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


SketchText.isLinked Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Indicates if this sketch entity was created by a projection, inclusion, or driven by an API script. If this returns true, then the entity is presented to the user as not editable and with a 'break link' command available.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isLinked
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isLinked();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchText.isReference Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVerticalFlip Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets and sets if the text is flipped vertically.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isVerticalFlip

# Set the value of the property.
sketchText_var.isVerticalFlip = 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->isVerticalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchText_var->isVerticalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


SketchText.isVisible Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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.nativeObject Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.nativeObject
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<SketchText> propertyValue = sketchText_var->nativeObject();

Property Value

This is a read only property whose value is a SketchText.

Version

Introduced in version May 2022


SketchText.objectType Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns the parent sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This property has been retired as a result of Fusion adding support for text along a curve. To move text, you can use the Sketch.move method.

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
Retired in version January 2021


SketchText.redefineAsAlongPath Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Sets this SketchTextInput to define text that follows along a specified path.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.redefineAsAlongPath(path, isAbovePath, horizontalAlignment, characterSpacing)
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->redefineAsAlongPath(path, isAbovePath, horizontalAlignment, characterSpacing);

Return Value

Type | Description
boolean | Returns true if the setting the definition was successful.

Parameters

Name | Type | Description
path | Base | The entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.
isAbovePath | boolean | Indicates if the text should be positioned above or below the path entity.
horizontalAlignment | HorizontalAlignments | Specifies the horizontal alignment of the text with respect to the path curve.
characterSpacing | double | The spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.

Version

Introduced in version December 2020


SketchText.redefineAsFitOnPath Method

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Sets this SketchTextInput to define text that fits along a specified path. Fitting on a path will space the characters so the text fits along the entire length of the path entity.

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.redefineAsFitOnPath(path, isAbovePath)
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->redefineAsFitOnPath(path, isAbovePath);

Return Value

Type | Description
boolean | Returns true if the setting the definition was successful.

Parameters

Name | Type | Description
path | Base | The entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.
isAbovePath | boolean | Indicates if the text should be positioned above or below the path entity.

Version

Introduced in version December 2020


SketchText.referencedEntity Property

Parent Object: SketchText
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Returns the sketch dimensions that are attached to this curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

Description

Gets and sets the text. This is a simple string and ignores any formatting defined within the text.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchText.h>

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.

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


SketchTextDefinition Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextDefinition.h>

Description

The base class for the classes that define how text can be defined.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentSketchText | Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.

Accessed From

SketchText.definition, SketchTextInput.definition

Derived Classes

AlongPathTextDefinition, FitOnPathTextDefintion, MultiLineTextDefinition

Version

Introduced in version December 2020


SketchTextDefinition.classType Method

Parent Object: SketchTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchTextDefinition.classType()
This is a static method.

#include <Fusion/Sketch/SketchTextDefinition.h>

returnValue = adsk::fusion::SketchTextDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


SketchTextDefinition.isValid Property

Parent Object: SketchTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.

# Get the value of the property.
propertyValue = sketchTextDefinition_var.isValid
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.
#include <Fusion/Sketch/SketchTextDefinition.h>

// Get the value of the property.
boolean propertyValue = sketchTextDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


SketchTextDefinition.objectType Property

Parent Object: SketchTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.

# Get the value of the property.
propertyValue = sketchTextDefinition_var.objectType
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.
#include <Fusion/Sketch/SketchTextDefinition.h>

// Get the value of the property.
string propertyValue = sketchTextDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


SketchTextDefinition.parentSketchText Property

Parent Object: SketchTextDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextDefinition.h>

Description

Returns the SketchText object this definition is associated with. This property will return null in the case the definition object was obtained from a SketchTextInput object because the SketchText object does not yet exist.

Syntax

  • Python
  • C++
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.

# Get the value of the property.
propertyValue = sketchTextDefinition_var.parentSketchText
"sketchTextDefinition_var" is a variable referencing a SketchTextDefinition object.
#include <Fusion/Sketch/SketchTextDefinition.h>

// Get the value of the property.
Ptr<SketchText> propertyValue = sketchTextDefinition_var->parentSketchText();

Property Value

This is a read only property whose value is a SketchText.

Version

Introduced in version July 2022


SketchTextInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAsAlongPath | Sets this SketchTextInput to define text that follows along a specified path.
setAsFitOnPath | Sets this SketchTextInput to define text that fits along a specified path. Fitting on a path will space the characters so the text fits along the entire length of the path entity.
setAsMultiLine | Defines the first corner point of the rectangle that will contain the text.

Properties

Name | Description
angle | **RETIRED** Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.
definition | Returns the SketchTextDefinition object associated with this input. When the SketchTextInput is first created this property will return null. Once one of the "set" methods have been called, this will return the SketchTextDefinition of the appropriate type and can be used to make any additional changes to the text.
fontName | Gets and sets the name of the font to use.
height | Gets and sets the height of the text in centimeters.
isHorizontalFlip | Gets and sets if the text is flipped horizontally.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVerticalFlip | Gets and sets if the text is flipped vertically.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
position | **RETIRED** 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 italic.

Accessed From

SketchTexts.createInput, SketchTexts.createInput2

Samples

Name | Description
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version March 2015


SketchTextInput.angle Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.

Remarks

This property was retired when Fusion added support for sketch along a curve, where defining a rotation angle doesn't make sense. When creating multi-line text you can use the Sketch.move command to rotate and/or move the four lines defining the bounding rectangle of the text.

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
Retired in version January 2021


SketchTextInput.classType Method

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.definition Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Returns the SketchTextDefinition object associated with this input. When the SketchTextInput is first created this property will return null. Once one of the "set" methods have been called, this will return the SketchTextDefinition of the appropriate type and can be used to make any additional changes to the text.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.definition
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
Ptr<SketchTextDefinition> propertyValue = sketchTextInput_var->definition();

Property Value

This is a read only property whose value is a SketchTextDefinition.

Version

Introduced in version December 2020


SketchTextInput.fontName Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Gets and sets the name of the font to use.

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.

Samples

Name | Description
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version March 2015


SketchTextInput.height Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Gets and sets the height of the text in centimeters.

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.isHorizontalFlip Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Gets and sets if the text is flipped horizontally.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.isHorizontalFlip

# Set the value of the property.
sketchTextInput_var.isHorizontalFlip = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
boolean propertyValue = sketchTextInput_var->isHorizontalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchTextInput_var->isHorizontalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020


SketchTextInput.isValid Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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.isVerticalFlip Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Gets and sets if the text is flipped vertically.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.isVerticalFlip

# Set the value of the property.
sketchTextInput_var.isVerticalFlip = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
boolean propertyValue = sketchTextInput_var->isVerticalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchTextInput_var->isVerticalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020


SketchTextInput.objectType Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This method has been retired. The closest equivalent is when creating multi-line text. The setAsMultiLine has a cornerPoint argument that lets you define the position of the text. For text along a curve, the curve defines its positions.

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
Retired in version January 2023


SketchTextInput.setAsAlongPath Method

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Sets this SketchTextInput to define text that follows along a specified path.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
returnValue = sketchTextInput_var.setAsAlongPath(path, isAbovePath, horizontalAlignment, characterSpacing)
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

#include <Fusion/Sketch/SketchTextInput.h>

returnValue = sketchTextInput_var->setAsAlongPath(path, isAbovePath, horizontalAlignment, characterSpacing);

Return Value

Type | Description
boolean | Returns true if the setting the definition was successful.

Parameters

Name | Type | Description
path | Base | The entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.
isAbovePath | boolean | Indicates if the text should be positioned above or below the path entity.
horizontalAlignment | HorizontalAlignments | Specifies the horizontal alignment of the text with respect to the path curve.
characterSpacing | double | The percentage change in default spacing between characters.

Samples

Name | Description
SketchTextInput.setAsAlongPath | Demonstrates the SketchTextInput.setAsAlongPath method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020


SketchTextInput.setAsAlongPath

Description

Demonstrates the SketchTextInput.setAsAlongPath method.

Code Samples

  • Python
def demo_SketchTextInput_setAsAlongPath(sketch: adsk.fusion.Sketch):
    texts = sketch.sketchTexts
    input = texts.createInput2('Autodesk', 0.5)

    path = sketch.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(-10, 0, 0),
                                                          adsk.core.Point3D.create(-5, 3, 0),
                                                          adsk.core.Point3D.create(0, 0, 0))

    horizontalAlignment = adsk.core.HorizontalAlignments.CenterHorizontalAlignment
    characterSpacing = 0
    isAbovePath = False

    input.setAsAlongPath(path, isAbovePath, horizontalAlignment, characterSpacing)
    texts.add(input)


SketchTextInput.setAsFitOnPath Method

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Sets this SketchTextInput to define text that fits along a specified path. Fitting on a path will space the characters so the text fits along the entire length of the path entity.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
returnValue = sketchTextInput_var.setAsFitOnPath(path, isAbovePath)
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

#include <Fusion/Sketch/SketchTextInput.h>

returnValue = sketchTextInput_var->setAsFitOnPath(path, isAbovePath);

Return Value

Type | Description
boolean | Returns true if the setting the definition was successful.

Parameters

Name | Type | Description
path | Base | The entity that defines the path for the text. This can be a SketchCurve or BRepEdge object.
isAbovePath | boolean | Indicates if the text should be positioned above or below the path entity.

Samples

Name | Description
SketchTextInput.setAsFitOnPath | Demoonstrates the SketchTextInput.setAsFitOnPath method.

Version

Introduced in version December 2020


SketchTextInput.setAsFitOnPath

Description

Demoonstrates the SketchTextInput.setAsFitOnPath method.

Code Samples

  • Python
def demo_SketchTextInput_setAsFitOnPath(sketch: adsk.fusion.Sketch):
    texts = sketch.sketchTexts
    input = texts.createInput2('Autodesk', 0.5)
    path = sketch.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(-10, 0, 0),
                                                          adsk.core.Point3D.create(-5, 3, 0),
                                                          adsk.core.Point3D.create(0, 0, 0))
    isAbovePath = False

    input.setAsFitOnPath(path, isAbovePath)
    texts.add(input)


SketchTextInput.setAsMultiLine Method

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Defines the first corner point of the rectangle that will contain the text.

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
returnValue = sketchTextInput_var.setAsMultiLine(cornerPoint, diagonalPoint, horizontalAlignment, verticalAlignment, characterSpacing)
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

#include <Fusion/Sketch/SketchTextInput.h>

returnValue = sketchTextInput_var->setAsMultiLine(cornerPoint, diagonalPoint, horizontalAlignment, verticalAlignment, characterSpacing);

Return Value

Type | Description
boolean | Returns true if the setting the definition was successful.

Parameters

Name | Type | Description
cornerPoint | Base | Specifies the location of one of the corner points of the rectangle that will contain the text. This can be a Point3D object, with a Z component of zero, to define any arbitrary location on the X-Y plane of the sketch or it can be an existing SketchPoint that lies on the sketch X-Y plane.
diagonalPoint | Base | Specifies the location of the diagonal point of the rectangle that will contain the text. This point cannot be aligned vertically or horizontally to the corner point but be a diagonal point to define a rectangle. This can be a Point3D object, with a Z component of zero, to define any arbitrary location on the X-Y plane of the sketch or it can be an existing SketchPoint that lies on the sketch X-Y plane and the sketch point will become the opposing corner point.
horizontalAlignment | HorizontalAlignments | Specifies the horizontal alignment of the text with respect to the text rectangle.
verticalAlignment | VerticalAlignments | Specifies the vertical alignment of the text with respect to the text rectangle.
characterSpacing | double | The spacing between the characters. This is an additional spacing to apply that is defined as a percentage of the default spacing. A spacing of 0 indicates no additional spacing. A spacing of 50 indicates to use the default plus 50% of the default.

Samples

Name | Description
SketchTextInput.setAsMultiLine | Demonstrates the SketchTextInput.setAsMultiLine method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020


SketchTextInput.setAsMultiLine

Description

Demonstrates the SketchTextInput.setAsMultiLine method.

Code Samples

  • Python
def demo_SketchTextInput_setAsMultiline(sketch: adsk.fusion.Sketch):
    texts = sketch.sketchTexts
    input = texts.createInput2('This is a long line of text that is broken automatically.\n\nAnd this is a defined line break.', 0.5)

    cornerPoint = adsk.core.Point3D.create(0, 0, 0)
    diagonalPoint = adsk.core.Point3D.create(10, 5, 0)
    horizontalAlignment = adsk.core.HorizontalAlignments.LeftHorizontalAlignment
    verticalAlignment = adsk.core.VerticalAlignments.TopVerticalAlignment
    characterSpacing = 0

    input.setAsMultiLine(cornerPoint,
                         diagonalPoint,
                         horizontalAlignment,
                         verticalAlignment,
                         characterSpacing)
    texts.add(input)


SketchTextInput.text Property

Parent Object: SketchTextInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

Description

Gets and sets the text.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTextInput.h>

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 italic.

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.

Version

Introduced in version March 2015


SketchTexts Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

The collection of text blocks in a sketch. This provides access to the existing text blocks and supports creating new text blocks.

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 | **RETIRED** 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.
createInput2 | Creates a SketchTextInput object that is used to define the additional input to create text. The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. You must call setAsFitOnPath, setAsAlongPath, or setAsMultiLine methods to define one of the three types of text and can use other and define any setAs 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Sketch.sketchTexts

Samples

Name | Description
SketchTextInput.setAsAlongPath | Demonstrates the SketchTextInput.setAsAlongPath method.
SketchTextInput.setAsFitOnPath | Demoonstrates the SketchTextInput.setAsFitOnPath method.
SketchTextInput.setAsMultiLine | Demonstrates the SketchTextInput.setAsMultiLine method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version March 2015


SketchTexts.add Method

Parent Object: SketchTexts
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Creates a sketch text.

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
SketchTextInput.setAsAlongPath | Demonstrates the SketchTextInput.setAsAlongPath method.
SketchTextInput.setAsFitOnPath | Demoonstrates the SketchTextInput.setAsFitOnPath method.
SketchTextInput.setAsMultiLine | Demonstrates the SketchTextInput.setAsMultiLine method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version March 2015


SketchTexts.classType Method

Parent Object: SketchTexts
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Returns the number of texts in the sketch.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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.

Remarks

This method has been retired and is replaced by the createInput2 method, which supports defining multi-line text and text along a curve.

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.

Version

Introduced in version March 2015
Retired in version January 2021


SketchTexts.createInput2 Method

Parent Object: SketchTexts
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Creates a SketchTextInput object that is used to define the additional input to create text. The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. You must call setAsFitOnPath, setAsAlongPath, or setAsMultiLine methods to define one of the three types of text and can use other and define any setAs Once the properties of the SketchTextInput object have been defined, use the add method to create the sketch text.

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.
returnValue = sketchTexts_var.createInput2(formattedText, height)
"sketchTexts_var" is a variable referencing a SketchTexts object.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = sketchTexts_var->createInput2(formattedText, height);

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.

Samples

Name | Description
SketchTextInput.setAsAlongPath | Demonstrates the SketchTextInput.setAsAlongPath method.
SketchTextInput.setAsFitOnPath | Demoonstrates the SketchTextInput.setAsFitOnPath method.
SketchTextInput.setAsMultiLine | Demonstrates the SketchTextInput.setAsMultiLine method.
Sketch Text API Sample | Demonstrates creating sketch text by creating both mult-line text and text along a curve.

Version

Introduced in version December 2020


SketchTexts.isValid Property

Parent Object: SketchTexts
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

Function that returns the specified sketch text using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchTexts.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Provides a command input to get the value of a slider from the user.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: SliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
returnValue = sliderCommandInput_var.deleteMe()
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

#include <Core/UserInterface/SliderCommandInput.h>

returnValue = sliderCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


SliderCommandInput.expressionOne Property

Parent Object: SliderCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the texts of the slider if text has been defined.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets if the command input has two sliders.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Sets the text of the slider. Both the left and the right text should be set.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SliderCommandInput.h>

Description

Gets and sets the unit type that is used when evaluating the user's input.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

Represents the set of information specific to a slider joint.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

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.

To set this property, you need to position the timeline marker to immediately before this joint. This can be accomplished using the following code: thisJoint.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

Returns an enum value indicating the type of joint this joint represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/SliderJointMotion.h>

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

A smooth constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Returns the first curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Returns the second curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: SmoothConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.entityToken
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
string propertyValue = smoothConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SmoothConstraint.isDeletable Property

Parent Object: SmoothConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SmoothConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

Description

Defines that an SMT export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/SMTExportOptions.h>

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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

Description

Defines that an SMT import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ImportManager.createSMTImportOptions

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


SMTImportOptions.classType Method

Parent Object: SMTImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/SMTImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Object that represents a Snapshot in the timeline

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Deletes this snapshot.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Gets and sets the name of the snapshot as seen in the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshot.h>

Description

Returns the timeline object associated with this snapshot.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Provides access to the Snapshots within a design and provides methods to create new Snapshots.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.snapshots, FlatPatternProduct.snapshots, WorkingModel.snapshots

Version

Introduced in version August 2014


Snapshots.add Method

Parent Object: Snapshots
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Creates a new snapshot. Creating a snapshot is only valid when the HasPendingTransforms property returns true.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

The number of items in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Indicates if there are any changes that have been made than can be snapshot.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

Function that returns the specified snapshot in the collection using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Snapshots.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Creates and returns an independent copy of this Sphere object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Creates a transient sphere object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Gets all of the data defining the sphere.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Gets and sets the origin point (center) of the sphere.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Gets and sets the radius of the sphere.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Sets all of the data defining the sphere.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Sphere.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Object that represents an existing sphere feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

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.

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.entityToken Property

Parent Object: SphereFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.entityToken
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
string propertyValue = sphereFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SphereFeature.errorOrWarningMessage Property

Parent Object: SphereFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

Collection that provides access to all of the existing torus features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.sphereFeatures

Version

Introduced in version September 2015


SphereFeatures.classType Method

Parent Object: SphereFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

The number of sphere features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

Function that returns the specified sphere feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

Function that returns the specified sphere feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SphereFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Object that represents an existing split body feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
splitBodies Gets and sets the input solid or open bodies that are split.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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.entityToken Property

Parent Object: SplitBodyFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.entityToken
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
string propertyValue = splitBodyFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SplitBodyFeature.errorOrWarningMessage Property

Parent Object: SplitBodyFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Gets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Sets the splitting tool used for the feature.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Gets and sets the input solid or open bodies that are split.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a split body feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

Description

Gets and sets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

Creates a new split body feature.

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
splitBodyFeatures.add | Demonstrates the splitBodyFeatures.add method.
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


splitBodyFeatures.add

Description

Demonstrates the splitBodyFeatures.add method.

Code Samples

  • Python
def demo_splitBodyFeatures_add(rootComp: adsk.fusion.Component):
    body = _ui.selectEntity('Select a body', 'Bodies').entity
    splittingTool = _ui.selectEntity('Select a face to split the body.', 'Bodies').entity
    isExtended = True

    splitBodyFeatures = rootComp.features.splitBodyFeatures
    input = splitBodyFeatures.createInput(body, splittingTool, isExtended)
    splitBodyFeature = splitBodyFeatures.add(input)


SplitBodyFeatures.classType Method

Parent Object: SplitBodyFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

The number of split body features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

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.

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 multiple 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
splitBodyFeatures.add | Demonstrates the splitBodyFeatures.add method.
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeatures.isValid Property

Parent Object: SplitBodyFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

Function that returns the specified split body feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

Function that returns the specified split body feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitBodyFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SplitButtonControl.additionalDefinitions Property

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets or sets the command definitions used to define the buttons associated with the split button.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SplitButtonControl.classType Method

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets the command definition that is used as the default command on the main portion of the split button.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


SplitButtonControl.deleteMe Method

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Deletes the ToolbarControl

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

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.

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.

Version

Introduced in version August 2014


SplitButtonControl.index Property

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets if this button behaves where the last executed command becomes the command on the main portion of the split button.

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.

Version

Introduced in version August 2014


SplitButtonControl.isValid Property

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets or sets if this control is currently visible.

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.

Version

Introduced in version August 2014


SplitButtonControl.objectType Property

Parent Object: SplitButtonControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/SplitButtonControl.h>

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Object that represents an existing split face feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
setAsClosestPointSplitType | Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
facesToSplit Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
splittingTool Gets 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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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.entityToken Property

Parent Object: SplitFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.entityToken
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
string propertyValue = splitFaceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SplitFaceFeature.errorOrWarningMessage Property

Parent Object: SplitFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Sets the split type to project the splitting tool along the direction defined by the specified entity.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

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.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Gets 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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the type of split type currently defined. To change the split type, use one of the set methods.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a split face feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Gets and sets whether or not the splittingTool is to be automatically extended (if possible) so as to completely intersect the facesToSplit.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Sets the split type to project the splitting tool along the direction defined by the specified entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

Description

Returns the type of split type currently defined.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

Creates a new split face feature.

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
splitFaceFeatures.add | Demonstrates the splitFaceFeatures.add method by spliting a face with another intersecting face.
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


splitFaceFeatures.add

Description

Demonstrates the splitFaceFeatures.add method by spliting a face with another intersecting face.

Code Samples

  • Python
def demo_splitFaceFeatures_add(rootComp: adsk.fusion.Component):
    selection = _ui.selectEntity('Select a face', 'Faces').entity
    faces = adsk.core.ObjectCollection.create()
    faces.add(selection)
    splittingTool = _ui.selectEntity('Select a face', 'Faces').entity
    isExtended = True

    splitFaceFeatures = rootComp.features.splitFaceFeatures
    input = splitFaceFeatures.createInput(faces, splittingTool, isExtended)
    splitFaceFeature = splitFaceFeatures.add(input)


SplitFaceFeatures.classType Method

Parent Object: SplitFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

The number of split face features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

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.

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
splitFaceFeatures.add | Demonstrates the splitFaceFeatures.add method by spliting a face with another intersecting face.
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeatures.isValid Property

Parent Object: SplitFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

Function that returns the specified split face feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

Function that returns the specified split face feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SplitFaceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


SpunProfileInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

The input object that defines the required input to create a spun profile when using the Sketch.createSpunProfile method. Created using the Sketch.createSpunProfileInput method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 entity used to define the axis of revolution. The axis can be a sketch line, construction axis, or linear edge. The axis must not be perpendicular to the sketch plane.
entities | Gets and sets the entities (BRepBody or BRepFace) used to define the shape of the spun profile.
flipResult | Gets and sets whether the profile will be created on the opposite side of the axis.
isAxisProjected | Specifies if the axis will be projected to the sketch plane before making the spun profile. Otherwise, the spun profile will be generated around the axis in space. Defaults to true.
isCenterlineAdded | Gets and sets whether a resulting spun profile that would be open, will be closed along the axis of rotation. This closes the sketch so it is ready for further design operations, like revolving the sketch for example. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tolerance | Gets and sets the linear tolerance in cm used for creating the spun profile. Defaults to 0.001cm.

Accessed From

Sketch.createSpunProfileInput

Version

Introduced in version November 2024


SpunProfileInput.axis Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

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. The axis must not be perpendicular to the sketch plane.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.axis

# Set the value of the property.
spunProfileInput_var.axis = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = spunProfileInput_var->axis();

// Set the value of the property, where value_var is a Base.
bool returnValue = spunProfileInput_var->axis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2024


SpunProfileInput.classType Method

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SpunProfileInput.classType()
This is a static method.

#include <Fusion/Sketch/SpunProfileInput.h>

returnValue = adsk::fusion::SpunProfileInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2024


SpunProfileInput.entities Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Gets and sets the entities (BRepBody or BRepFace) used to define the shape of the spun profile.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.entities

# Set the value of the property.
spunProfileInput_var.entities = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = spunProfileInput_var->entities();

// Set the value of the property, where value_var is a Base.
bool returnValue = spunProfileInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version November 2024


SpunProfileInput.flipResult Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Gets and sets whether the profile will be created on the opposite side of the axis.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.flipResult

# Set the value of the property.
spunProfileInput_var.flipResult = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
boolean propertyValue = spunProfileInput_var->flipResult();

// Set the value of the property, where value_var is a boolean.
bool returnValue = spunProfileInput_var->flipResult(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2024


SpunProfileInput.isAxisProjected Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Specifies if the axis will be projected to the sketch plane before making the spun profile. Otherwise, the spun profile will be generated around the axis in space. Defaults to true.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.isAxisProjected

# Set the value of the property.
spunProfileInput_var.isAxisProjected = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
boolean propertyValue = spunProfileInput_var->isAxisProjected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = spunProfileInput_var->isAxisProjected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2024


SpunProfileInput.isCenterlineAdded Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Gets and sets whether a resulting spun profile that would be open, will be closed along the axis of rotation. This closes the sketch so it is ready for further design operations, like revolving the sketch for example. Defaults to true.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.isCenterlineAdded

# Set the value of the property.
spunProfileInput_var.isCenterlineAdded = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
boolean propertyValue = spunProfileInput_var->isCenterlineAdded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = spunProfileInput_var->isCenterlineAdded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


SpunProfileInput.isValid Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.isValid
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
boolean propertyValue = spunProfileInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2024


SpunProfileInput.objectType Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.objectType
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
string propertyValue = spunProfileInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2024


SpunProfileInput.tolerance Property

Parent Object: SpunProfileInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SpunProfileInput.h>

Description

Gets and sets the linear tolerance in cm used for creating the spun profile. Defaults to 0.001cm.

Syntax

  • Python
  • C++
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.

# Get the value of the property.
propertyValue = spunProfileInput_var.tolerance

# Set the value of the property.
spunProfileInput_var.tolerance = propertyValue
"spunProfileInput_var" is a variable referencing a SpunProfileInput object.
#include <Fusion/Sketch/SpunProfileInput.h>

// Get the value of the property.
double propertyValue = spunProfileInput_var->tolerance();

// Set the value of the property, where value_var is a double.
bool returnValue = spunProfileInput_var->tolerance(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2024


Status Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

Used to communicate the current status of an object or operation. This provides the status and any error messages that might accompany an error or warning.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
isError | If true, An error occurred that has prevented the operation from successfully completing. This takes into account all of the child status messages.
isOK | If true, the operation was successful without any warnings or errors. This takes into account all of the child status messages.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isWarning | If true, the operation has succeeded but with an unusual result. This takes into account all of the child status messages.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
statusMessages | the status messages associated with this status. These messages are displayed to the user in the alert dialog. Each status message can have children status messages that will be displayed as a tree structure in the alert dialog.

Accessed From

CustomFeatureEventArgs.computeStatus, DataEventArgs.status

Version

Introduced in version July 2021


Status.classType Method

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Status.classType()
This is a static method.

#include <Core/Application/Status.h>

returnValue = adsk::core::Status::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2021


Status.isError Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

If true, An error occurred that has prevented the operation from successfully completing. This takes into account all of the child status messages.

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.isError
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
boolean propertyValue = status_var->isError();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


Status.isOK Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

If true, the operation was successful without any warnings or errors. This takes into account all of the child status messages.

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.isOK
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
boolean propertyValue = status_var->isOK();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


Status.isValid Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.isValid
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
boolean propertyValue = status_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


Status.isWarning Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

If true, the operation has succeeded but with an unusual result. This takes into account all of the child status messages.

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.isWarning
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
boolean propertyValue = status_var->isWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


Status.objectType Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.objectType
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
string propertyValue = status_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


Status.statusMessages Property

Parent Object: Status
Defined in namespace "adsk::core" and the header file is <Core/Application/Status.h>

Description

the status messages associated with this status. These messages are displayed to the user in the alert dialog. Each status message can have children status messages that will be displayed as a tree structure in the alert dialog.

Syntax

  • Python
  • C++
"status_var" is a variable referencing a Status object.

# Get the value of the property.
propertyValue = status_var.statusMessages
"status_var" is a variable referencing a Status object.
#include <Core/Application/Status.h>

// Get the value of the property.
Ptr<StatusMessages> propertyValue = status_var->statusMessages();

Property Value

This is a read only property whose value is a StatusMessages.

Version

Introduced in version July 2021


StatusMessage Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Defines the message associated with a Status object.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
childStatusMessages | Returns the collection of status codes that are children of this status message.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
message | The user visible message being used. Setting this message for custom feature errors or warnings is currently ignored.
messageId | Gets and sets the ID of the message being used. This is a predefined ID within the Fusion message string table.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
statusMessageType | Returns the type of message this StatusMessage represents.

Accessed From

StatusMessages.addError, StatusMessages.addWarning, StatusMessages.item

Version

Introduced in version July 2021


StatusMessage.childStatusMessages Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Returns the collection of status codes that are children of this status message.

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.childStatusMessages
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
Ptr<StatusMessages> propertyValue = statusMessage_var->childStatusMessages();

Property Value

This is a read only property whose value is a StatusMessages.

Version

Introduced in version July 2021


StatusMessage.classType Method

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.StatusMessage.classType()
This is a static method.

#include <Core/Application/StatusMessage.h>

returnValue = adsk::core::StatusMessage::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2021


StatusMessage.isValid Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.isValid
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
boolean propertyValue = statusMessage_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


StatusMessage.message Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

The user visible message being used. Setting this message for custom feature errors or warnings is currently ignored.

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.message

# Set the value of the property.
statusMessage_var.message = propertyValue
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
string propertyValue = statusMessage_var->message();

// Set the value of the property, where value_var is a string.
bool returnValue = statusMessage_var->message(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


StatusMessage.messageId Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Gets and sets the ID of the message being used. This is a predefined ID within the Fusion message string table.

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.messageId

# Set the value of the property.
statusMessage_var.messageId = propertyValue
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
string propertyValue = statusMessage_var->messageId();

// Set the value of the property, where value_var is a string.
bool returnValue = statusMessage_var->messageId(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2021


StatusMessage.objectType Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.objectType
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
string propertyValue = statusMessage_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


StatusMessage.statusMessageType Property

Parent Object: StatusMessage
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessage.h>

Description

Returns the type of message this StatusMessage represents.

Syntax

  • Python
  • C++
"statusMessage_var" is a variable referencing a StatusMessage object.

# Get the value of the property.
propertyValue = statusMessage_var.statusMessageType
"statusMessage_var" is a variable referencing a StatusMessage object.
#include <Core/Application/StatusMessage.h>

// Get the value of the property.
StatusMessageTypes propertyValue = statusMessage_var->statusMessageType();

Property Value

This is a read only property whose value is a StatusMessageTypes.

Version

Introduced in version July 2021


StatusMessages Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

A collection of status messages associated with a Status object. The primary purpose of the messages is to describe the reason for a warning or failure and display the messages in the alert dialog.

Methods

Name | Description
addError | Adds a new error status message to the list of warning and error messages.
addWarning | Adds a new warning status message to the list of warning and error messages.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 status message using an index into the collection.

Properties

Name | Description
count | Returns the number of status messages 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Status.statusMessages, StatusMessage.childStatusMessages

Version

Introduced in version July 2021


StatusMessages.addError Method

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Adds a new error status message to the list of warning and error messages.

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.
# Uses no optional arguments.
returnValue = statusMessages_var.addError()

# Uses optional arguments.
returnValue = statusMessages_var.addError(messageId, message)
"statusMessages_var" is a variable referencing a StatusMessages object.

#include <Core/Application/StatusMessages.h>

// Uses no optional arguments.
returnValue = statusMessages_var->addError();

// Uses optional arguments.
returnValue = statusMessages_var->addError(messageId, message);

Return Value

Type | Description
StatusMessage | Returns true if the error message was successfully added.

Parameters

Name Type Description
messageId string The ID of a predefined message or if an empty string is provided, the default error message will be used. The displayed message is localized based on the current default language in Fusion. Below is a list of some valid message ID's and the corresponding English message.

"API_COMPUTE_ERROR" - "Cannot compute this feature."
"API_COMPUTE_WARNING" - "This feature computed with warnings."
"CFLANGE_INVALID_GEOM" - "Invalid input sketch curve."
"DRAFT_MISSING_FACE_REFERENCES" - "Missing face references"
"DRAFT_MISSING_REFERENCE_PLANE" - "Missing reference plane"
"FEATURE_ENTITY_TYPE_INVALID" - "Entity type is invalid"
"FEATURE_FAILED_TO_CREATE" - "Failed to create feature"
"FEATURE_MISSING_INPUTS" - "Missing inputs"
"FEATURE_REFERENCE_LOST" - "Reference is lost"
"Feature_Compute_Error" - "Compute Failed"
"Feature_Input_Compute_Error" - "Reference Failures"
"InvalidWPntInput" - "Invalid input"
"NO_TARGET_BODY" - "No target body!"
"ORIGIN_SELECTION_MISSING" - "Origin geometry is missing."
"DRPOINT_COMPUTE_FAILED" - "Failed to evaluate the point due to the invalid input"

This is an optional argument whose default value is "".
message string This is not currently supported for custom feature compute errors and will be ignored.

This is an optional argument whose default value is "".

Version

Introduced in version July 2021


StatusMessages.addWarning Method

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Adds a new warning status message to the list of warning and error messages.

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.
# Uses no optional arguments.
returnValue = statusMessages_var.addWarning()

# Uses optional arguments.
returnValue = statusMessages_var.addWarning(messageId, message)
"statusMessages_var" is a variable referencing a StatusMessages object.

#include <Core/Application/StatusMessages.h>

// Uses no optional arguments.
returnValue = statusMessages_var->addWarning();

// Uses optional arguments.
returnValue = statusMessages_var->addWarning(messageId, message);

Return Value

Type | Description
StatusMessage | Returns true if the warning message was successfully added.

Parameters

Name Type Description
messageId string The ID of a predefined message or if an empty string is provided, the default error message will be used. The displayed message is localized based on the current default language in Fusion. Below is a list of some valid message ID's and the corresponding English message.

"API_COMPUTE_ERROR" - "Cannot compute this feature."
"API_COMPUTE_WARNING" - "This feature computed with warnings."
"CFLANGE_INVALID_GEOM" - "Invalid input sketch curve."
"DRAFT_MISSING_FACE_REFERENCES" - "Missing face references"
"DRAFT_MISSING_REFERENCE_PLANE" - "Missing reference plane"
"FEATURE_ENTITY_TYPE_INVALID" - "Entity type is invalid"
"FEATURE_FAILED_TO_CREATE" - "Failed to create feature"
"FEATURE_MISSING_INPUTS" - "Missing inputs"
"FEATURE_REFERENCE_LOST" - "Reference is lost"
"Feature_Compute_Error" - "Compute Failed"
"Feature_Input_Compute_Error" - "Reference Failures"
"InvalidWPntInput" - "Invalid input"
"NO_TARGET_BODY" - "No target body!"
"ORIGIN_SELECTION_MISSING" - "Origin geometry is missing."
"DRPOINT_COMPUTE_FAILED" - "Failed to evaluate the point due to the invalid input"

This is an optional argument whose default value is "".
message string This is not currently supported for custom feature compute errors and will be ignored.

This is an optional argument whose default value is "".

Version

Introduced in version July 2021


StatusMessages.classType Method

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.StatusMessages.classType()
This is a static method.

#include <Core/Application/StatusMessages.h>

returnValue = adsk::core::StatusMessages::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2021


StatusMessages.count Property

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Returns the number of status messages in this collection.

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.

# Get the value of the property.
propertyValue = statusMessages_var.count
"statusMessages_var" is a variable referencing a StatusMessages object.
#include <Core/Application/StatusMessages.h>

// Get the value of the property.
uinteger propertyValue = statusMessages_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2021


StatusMessages.isValid Property

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.

# Get the value of the property.
propertyValue = statusMessages_var.isValid
"statusMessages_var" is a variable referencing a StatusMessages object.
#include <Core/Application/StatusMessages.h>

// Get the value of the property.
boolean propertyValue = statusMessages_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2021


StatusMessages.item Method

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

Returns the specified status message using an index into the collection.

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.
returnValue = statusMessages_var.item(index)
"statusMessages_var" is a variable referencing a StatusMessages object.

#include <Core/Application/StatusMessages.h>

returnValue = statusMessages_var->item(index);

Return Value

Type | Description
StatusMessage | Returns the specified StatusMessage or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the status message within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version July 2021


StatusMessages.objectType Property

Parent Object: StatusMessages
Defined in namespace "adsk::core" and the header file is <Core/Application/StatusMessages.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"statusMessages_var" is a variable referencing a StatusMessages object.

# Get the value of the property.
propertyValue = statusMessages_var.objectType
"statusMessages_var" is a variable referencing a StatusMessages object.
#include <Core/Application/StatusMessages.h>

// Get the value of the property.
string propertyValue = statusMessages_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2021


STEPExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

Defines that a STEP export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
wantTempIds | Indicates if the STEP file should include the Fusion temporary IDs for faces and edges. Outside services can use these IDs with the findByTempId method of the BRepBody, which will return the given entity. The default is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


STEPExportOptions.wantTempIds Property

Parent Object: STEPExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STEPExportOptions.h>

Description

Indicates if the STEP file should include the Fusion temporary IDs for faces and edges. Outside services can use these IDs with the findByTempId method of the BRepBody, which will return the given entity. The default is false.

Syntax

  • Python
  • C++
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.

# Get the value of the property.
propertyValue = sTEPExportOptions_var.wantTempIds

# Set the value of the property.
sTEPExportOptions_var.wantTempIds = propertyValue
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.
#include <Fusion/Fusion/STEPExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTEPExportOptions_var->wantTempIds();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sTEPExportOptions_var->wantTempIds(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


STEPImportOptions Object

Derived from: ImportOptions Object
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

Description

Defines that a STEP import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ImportManager.createSTEPImportOptions

Samples

Name | Description
Import Manager API Sample | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


STEPImportOptions.classType Method

Parent Object: STEPImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/STEPImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Object that represents an existing stitch feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the feature operation to perform. This property value is ignored if the stitched result does not form a solid body.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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.entityToken Property

Parent Object: StitchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.entityToken
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
string propertyValue = stitchFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


StitchFeature.errorOrWarningMessage Property

Parent Object: StitchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Gets and sets the feature operation to perform. This property value is ignored if the stitched result does not form a solid body.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

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 use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeature.h>

Description

Returns the parameter controlling the tolerance. You can edit the tolerance by editing the value of the parameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a stitch feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

Gets and sets the surfaces to stitch together.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the stitching tolerance. It must define a length.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Collection that provides access to all of the existing Stitch features in a component and supports the ability to create new Stitch features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Creates a new stitch feature.

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
stitchFeatures.add | Demonstrates the stitchFeatures.add method.
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


stitchFeatures.add

Description

Demonstrates the stitchFeatures.add method.

Code Samples

  • Python
def demo_stitchFeatures_add(rootComp: adsk.fusion.Component):
    # Have the two bodies selected and add them to an ObjectCollection.
    body1: adsk.fusion.BRepBodies = _ui.selectEntity('Select a surface body.', 'Bodies').entity
    body2: adsk.fusion.BRepBodies = _ui.selectEntity('Select a connecting surface body.', 'Bodies').entity
    bodies = adsk.core.ObjectCollection.create()
    bodies.add(body1)
    bodies.add(body2)

    stitchFeatures = rootComp.features.stitchFeatures
    tolerance = adsk.core.ValueInput.createByReal(.01)
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    input = stitchFeatures.createInput(bodies, tolerance, operation)
    stitchFeature = stitchFeatures.add(input)


StitchFeatures.classType Method

Parent Object: StitchFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

The number of Stitch features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

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.

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 FeatureOperations.NewBodyFeatureOperation.

Samples

Name | Description
stitchFeatures.add | Demonstrates the stitchFeatures.add method.
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeatures.isValid Property

Parent Object: StitchFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Function that returns the specified stitch feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

Function that returns the specified stitch feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/StitchFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Defines that a STL export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
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 centimeter. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.
unitType | Gets and sets the units to use for the created STL file. When the STLExportOptions object is created, this property is initialized with the default units specified for the Design.

Accessed From

ExportManager.createSTLExportOptions

Samples

Name | Description
Export to other formats API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


STLExportOptions.aspectRatio Property

Parent Object: STLExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Indicates if the STL file is to be an ASCII or binary STL format. The default is true.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


STLExportOptions.isOneFilePerBody Property

Parent Object: STLExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Gets and sets the maximum length of any mesh edge. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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 API Sample | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Version

Introduced in version January 2015


STLExportOptions.normalDeviation Property

Parent Object: STLExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimeter. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

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


STLExportOptions.unitType Property

Parent Object: STLExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/STLExportOptions.h>

Description

Gets and sets the units to use for the created STL file. When the STLExportOptions object is created, this property is initialized with the default units specified for the Design.

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.unitType

# Set the value of the property.
sTLExportOptions_var.unitType = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
DistanceUnits propertyValue = sTLExportOptions_var->unitType();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = sTLExportOptions_var->unitType(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version May 2025


StockMaterial Object

StockMaterial Object Preview

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Represents a StockMaterial.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromJson | Creates a StockMaterial object from given JSON string.
toJson | Generates and returns a JSON string that contains a description of this StockMaterial.

Properties

Name | Description
category | Gets and sets the category of the stock material.
designators | Gets a list of designators of the stock material.
hardness | Get and sets the hardness of the stock materials. NOTE: the hardness can be NaN if not set. and user can set the hardness to NaN.
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 stock material.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DocumentStockMaterialLibrary.item, Setup.stockMaterial, StockMaterial.createFromJson, StockMaterialLibrary.childStockMaterials, StockMaterialLibrary.stockMaterialAtURL

Version

Introduced in version September 2024


StockMaterial.category Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Gets and sets the category of the stock material.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.category

# Set the value of the property.
stockMaterial_var.category = propertyValue
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
string propertyValue = stockMaterial_var->category();

// Set the value of the property, where value_var is a string.
bool returnValue = stockMaterial_var->category(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


StockMaterial.classType Method

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.StockMaterial.classType()
This is a static method.

#include <Cam/StockMaterials/StockMaterial.h>

returnValue = adsk::cam::StockMaterial::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


StockMaterial.createFromJson Method

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Creates a StockMaterial object from given JSON string.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.StockMaterial.createFromJson(json)
This is a static method.

#include <Cam/StockMaterials/StockMaterial.h>

returnValue = adsk::cam::StockMaterial::createFromJson(json);

Return Value

Type | Description
StockMaterial | Returns the newly created StockMaterial.

Parameters

Name | Type | Description
json | string | The JSON should fully define the StockMaterial and contain all StockMaterial parameters. If the JSON contains more than one StockMaterial, only the first StockMaterial is loaded.

Version

Introduced in version September 2024


StockMaterial.designators Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Gets a list of designators of the stock material.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.designators

# Set the value of the property.
stockMaterial_var.designators = propertyValue
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
std::vector<string> propertyValue = stockMaterial_var->designators();

// Set the value of the property, where value_var is a string.
bool returnValue = stockMaterial_var->designators(value_var);

Property Value

This is a read/write property whose value is an array of type string.

Version

Introduced in version September 2024


StockMaterial.hardness Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Get and sets the hardness of the stock materials. NOTE: the hardness can be NaN if not set. and user can set the hardness to NaN.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.hardness

# Set the value of the property.
stockMaterial_var.hardness = propertyValue
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
double propertyValue = stockMaterial_var->hardness();

// Set the value of the property, where value_var is a double.
bool returnValue = stockMaterial_var->hardness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2024


StockMaterial.isValid Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.isValid
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
boolean propertyValue = stockMaterial_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


StockMaterial.name Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Gets and sets the name of the stock material.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.name

# Set the value of the property.
stockMaterial_var.name = propertyValue
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
string propertyValue = stockMaterial_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = stockMaterial_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2024


StockMaterial.objectType Property

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.

# Get the value of the property.
propertyValue = stockMaterial_var.objectType
"stockMaterial_var" is a variable referencing a StockMaterial object.
#include <Cam/StockMaterials/StockMaterial.h>

// Get the value of the property.
string propertyValue = stockMaterial_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


StockMaterial.toJson Method

Parent Object: StockMaterial

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterial.h>

Description

Generates and returns a JSON string that contains a description of this StockMaterial.

Syntax

  • Python
  • C++
"stockMaterial_var" is a variable referencing a StockMaterial object.
returnValue = stockMaterial_var.toJson()
"stockMaterial_var" is a variable referencing a StockMaterial object.

#include <Cam/StockMaterials/StockMaterial.h>

returnValue = stockMaterial_var->toJson();

Return Value

Type | Description
string | Returns a JSON string that contains a description of this StockMaterial.

Version

Introduced in version September 2024


StockMaterialLibrary Object

StockMaterialLibrary Object Preview

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The StockMaterialLibraries object provides utilities to access, import and update stock material by URL.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
childStockMaterials | Get all stockMaterials by the given parent folder URL. Returns null, if the URL does not exist.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importStockMaterial | Import a given stockMaterial at a specific location. The stockMaterial will be stored in the library. Throws an error, if the given URL is read-only.
stockMaterialAtURL | Get a specific stockMaterial by the given URL. Returns null, if the URL does not exist.
updateStockMaterial | Update a stockMaterial in the library. The library overrides the URL by given stockMaterial. Throws an error if the URL does not already point to an existing stockMaterial.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.stockMaterialLibrary

Version

Introduced in version September 2024


StockMaterialLibrary.assetTypeName Property

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

# Get the value of the property.
propertyValue = stockMaterialLibrary_var.assetTypeName
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
#include <Cam/StockMaterials/StockMaterialLibrary.h>

// Get the value of the property.
string propertyValue = stockMaterialLibrary_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


StockMaterialLibrary.childAssetURLs Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.childAssetURLs(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version September 2024


StockMaterialLibrary.childFolderURLs Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.childFolderURLs(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Version

Introduced in version September 2024


StockMaterialLibrary.childStockMaterials Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get all stockMaterials by the given parent folder URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.childStockMaterials(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->childStockMaterials(url);

Return Value

Type | Description
StockMaterial[] | Returns the stockMaterials for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL of the folder to get stockMaterials from.

Version

Introduced in version September 2024


StockMaterialLibrary.classType Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.StockMaterialLibrary.classType()
This is a static method.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = adsk::cam::StockMaterialLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2024


StockMaterialLibrary.createFolder Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.createFolder(parentUrl, folderName)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version September 2024


StockMaterialLibrary.deleteAsset Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.deleteAsset(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version September 2024


StockMaterialLibrary.deleteFolder Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.deleteFolder(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version September 2024


StockMaterialLibrary.displayName Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.displayName(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version September 2024


StockMaterialLibrary.importStockMaterial Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Import a given stockMaterial at a specific location. The stockMaterial will be stored in the library. Throws an error, if the given URL is read-only.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.importStockMaterial(stockMaterial, destinationUrl, stockMaterialName)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->importStockMaterial(stockMaterial, destinationUrl, stockMaterialName);

Return Value

Type | Description
URL | Returns the URL of the newly imported stockMaterial, or null if the import failed.

Parameters

Name | Type | Description
stockMaterial | StockMaterial | The stockMaterial that should be imported.
destinationUrl | URL | The URL to the folder where to save the stockMaterial.
stockMaterialName | string | The name of the stockMaterial that should be created due to the import. The name can be extended if the asset already exists at given location to ensure a unique name.

Version

Introduced in version September 2024


StockMaterialLibrary.isValid Property

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

# Get the value of the property.
propertyValue = stockMaterialLibrary_var.isValid
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
#include <Cam/StockMaterials/StockMaterialLibrary.h>

// Get the value of the property.
boolean propertyValue = stockMaterialLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2024


StockMaterialLibrary.objectType Property

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

# Get the value of the property.
propertyValue = stockMaterialLibrary_var.objectType
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
#include <Cam/StockMaterials/StockMaterialLibrary.h>

// Get the value of the property.
string propertyValue = stockMaterialLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2024


StockMaterialLibrary.stockMaterialAtURL Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get a specific stockMaterial by the given URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.stockMaterialAtURL(url)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->stockMaterialAtURL(url);

Return Value

Type | Description
StockMaterial | Returns the stockMaterial for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the stockMaterial to be loaded.

Version

Introduced in version September 2024


StockMaterialLibrary.updateStockMaterial Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Update a stockMaterial in the library. The library overrides the URL by given stockMaterial. Throws an error if the URL does not already point to an existing stockMaterial.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.updateStockMaterial(url, stockMaterial)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->updateStockMaterial(url, stockMaterial);

Return Value

Type | Description
boolean | Returns true if asset was updated successfully, false otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the existing asset in the library that should be updated.
stockMaterial | StockMaterial | The stockMaterial that should be persisted.

Version

Introduced in version September 2024


StockMaterialLibrary.urlByLocation Method

Parent Object: StockMaterialLibrary

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/StockMaterials/StockMaterialLibrary.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.
returnValue = stockMaterialLibrary_var.urlByLocation(location)
"stockMaterialLibrary_var" is a variable referencing a StockMaterialLibrary object.

#include <Cam/StockMaterials/StockMaterialLibrary.h>

returnValue = stockMaterialLibrary_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Version

Introduced in version September 2024


StringGraphNodeProperty Object

StringGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a string.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


StringGraphNodeProperty.classType Method

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.StringGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/StringGraphNodeProperty.h>

returnValue = adsk::volume::StringGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


StringGraphNodeProperty.description Property

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.

# Get the value of the property.
propertyValue = stringGraphNodeProperty_var.description
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.
#include <Volume/Volumetric/StringGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = stringGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


StringGraphNodeProperty.isValid Property

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.

# Get the value of the property.
propertyValue = stringGraphNodeProperty_var.isValid
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.
#include <Volume/Volumetric/StringGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = stringGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


StringGraphNodeProperty.name Property

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.

# Get the value of the property.
propertyValue = stringGraphNodeProperty_var.name
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.
#include <Volume/Volumetric/StringGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = stringGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


StringGraphNodeProperty.objectType Property

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.

# Get the value of the property.
propertyValue = stringGraphNodeProperty_var.objectType
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.
#include <Volume/Volumetric/StringGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = stringGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


StringGraphNodeProperty.value Property

Parent Object: StringGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/StringGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.

# Get the value of the property.
propertyValue = stringGraphNodeProperty_var.value

# Set the value of the property.
stringGraphNodeProperty_var.value = propertyValue
"stringGraphNodeProperty_var" is a variable referencing a StringGraphNodeProperty object.
#include <Volume/Volumetric/StringGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = stringGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = stringGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2025


StringParameterValue Object

Derived from: ParameterValue Object
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

A parameter value that is a string.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parameter object that the value is associated with.
value | Get or set the value of the parameter.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version September 2021


StringParameterValue.classType Method

Parent Object: StringParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.StringParameterValue.classType()
This is a static method.

#include <Cam/Operations/StringParameterValue.h>

returnValue = adsk::cam::StringParameterValue::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2021


StringParameterValue.isValid Property

Parent Object: StringParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"stringParameterValue_var" is a variable referencing a StringParameterValue object.

# Get the value of the property.
propertyValue = stringParameterValue_var.isValid
"stringParameterValue_var" is a variable referencing a StringParameterValue object.
#include <Cam/Operations/StringParameterValue.h>

// Get the value of the property.
boolean propertyValue = stringParameterValue_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2021


StringParameterValue.objectType Property

Parent Object: StringParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"stringParameterValue_var" is a variable referencing a StringParameterValue object.

# Get the value of the property.
propertyValue = stringParameterValue_var.objectType
"stringParameterValue_var" is a variable referencing a StringParameterValue object.
#include <Cam/Operations/StringParameterValue.h>

// Get the value of the property.
string propertyValue = stringParameterValue_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2021


StringParameterValue.parent Property

Parent Object: StringParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

Get the parameter object that the value is associated with.

Syntax

  • Python
  • C++
"stringParameterValue_var" is a variable referencing a StringParameterValue object.

# Get the value of the property.
propertyValue = stringParameterValue_var.parent
"stringParameterValue_var" is a variable referencing a StringParameterValue object.
#include <Cam/Operations/StringParameterValue.h>

// Get the value of the property.
Ptr<Base> propertyValue = stringParameterValue_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2021


StringParameterValue.value Property

Parent Object: StringParameterValue
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/StringParameterValue.h>

Description

Get or set the value of the parameter.

Syntax

  • Python
  • C++
"stringParameterValue_var" is a variable referencing a StringParameterValue object.

# Get the value of the property.
propertyValue = stringParameterValue_var.value

# Set the value of the property.
stringParameterValue_var.value = propertyValue
"stringParameterValue_var" is a variable referencing a StringParameterValue object.
#include <Cam/Operations/StringParameterValue.h>

// Get the value of the property.
string propertyValue = stringParameterValue_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = stringParameterValue_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version September 2021


StringProperty Object

Derived from: Property Object
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

A string value property.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.
value | Gets and sets the property value.

Samples

Name | Description
Library Item API Sample | Demonstrates how to examine library items using the API. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Version

Introduced in version August 2014


StringProperty.classType Method

Parent Object: StringProperty
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.StringProperty.classType()
This is a static method.

#include <Core/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Returns the unique ID of this property.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Indicates if this property is read-only. If True any attempted edits will fail.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

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

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Returns the parent of this property.For properties associated with an appearance this will return the parent Appearance. For properties associated with a material, this will return the parent Material. For other types of properties, this will return the PropertyGroup it is in.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/Application/StringProperty.h>

Description

Gets and sets the property value.

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/Application/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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Provides a command input to get a string value from the user.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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 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 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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: StringValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
returnValue = stringValueCommandInput_var.deleteMe()
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

#include <Core/UserInterface/StringValueCommandInput.h>

returnValue = stringValueCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


StringValueCommandInput.id Property

Parent Object: StringValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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 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 will change the color of the text to red to indicate to the user there is a problem.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/StringValueCommandInput.h>

Description

Gets or sets the value of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Describes a two-dimensional topological, manifold in three-dimensional space. It is used as the underlying geometry for a BRepFace.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
surfaceType | Returns the surface type.

Accessed From

BRepFace.geometry, BRepFaceDefinition.surfaceGeometry

Derived Classes

Cone, Cylinder, EllipticalCone, EllipticalCylinder, NurbsSurface, Plane, Sphere, Torus

Version

Introduced in version August 2014


Surface.classType Method

Parent Object: Surface
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Surface.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
deletedFaces Gets and sets the set of faces that are deleted by this feature.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Gets and sets the set of faces that are deleted by this feature.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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.entityToken Property

Parent Object: SurfaceDeleteFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.entityToken
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = surfaceDeleteFaceFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SurfaceDeleteFaceFeature.errorOrWarningMessage Property

Parent Object: SurfaceDeleteFaceFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

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.

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.
surfaceDeleteFeatures.add | Demonstrates the surfaceDeleteFeatures.add method.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.classType Method

Parent Object: SurfaceDeleteFaceFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

The number of SurfaceDeleteFaceFeature objects in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

Function that returns the specified SurfaceDeleteFaceFeature object using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

Function that returns the specified SurfaceDeleteFaceFeature object using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SurfaceDeleteFaceFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Surface evaluator that is obtained from a transient surface and allows you to perform various evaluations on the surface.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. Getting an iso curve is limited to a SurfaceEvaluator that is obtained from a BRepFace. It will fail when the SurfaceEvaluator is obtained from a geometry object (Plane, Sphere, Torus, Cylinder, Cone, EllipticalCone, EllipticalCylinder, or NurbsSurface).
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 within the surface. When the SurfaceEvaluator is obtained from a BRepFace object, this will respect the boundaries of the face and return true when point is on the visible portion of the surface. When obtained from surface geometry it returns true if the point is within the parametric range of 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 | Returns if the surface is closed (forms a loop) in the U direction
isClosedInV | Returns 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the curvature values at a parameter positions on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the curvature values at a number of parameter positions on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the first derivative of the surface at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the first derivatives of the surface at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

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.

Getting an iso curve is limited to a SurfaceEvaluator that is obtained from a BRepFace. It will fail when the SurfaceEvaluator is obtained from a geometry object (Plane, Sphere, Torus, Cylinder, Cone, EllipticalCone, EllipticalCylinder, or NurbsSurface).

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Creates the 3D equivalent curve in model space, of a 2D curve defined in the parametric space of the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Gets the surface normal at a parameter position on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Gets the surface normal at a point on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Gets the surface normal at a number of parameter positions on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Gets the surface normal at a number of positions on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Gets details about anomalies in parameter space of the surface. This includes information about periodic intervals, singularities, or unbounded parameter ranges.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the point on the surface that correspond to evaluating a parameter position on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the points on the surface that correspond to evaluating a set of parameter positions on the surface.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the second derivative of the surface at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the second derivatives of the surface at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the third derivative of the surface at the specified parameter position.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Get the third derivatives of the surface at the specified parameter positions.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Returns if the surface is closed (forms a loop) in the U direction

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Returns if the surface is closed (forms a loop) in the V direction

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Determines if the specified parameter position lies within the surface. When the SurfaceEvaluator is obtained from a BRepFace object, this will respect the boundaries of the face and return true when point is on the visible portion of the surface. When obtained from surface geometry it returns true if the point is within the parametric range of surface.

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 surface.

Parameters

Name | Type | Description
parameter | Point2D | The parameter position to test.

Version

Introduced in version August 2014


SurfaceEvaluator.isValid Property

Parent Object: SurfaceEvaluator
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/SurfaceEvaluator.h>

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.

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


SVGImportOptions Object

Derived from: ImportOptions Object
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Defines that an SVG import is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
isControlPointFrameDisplayed | Gets and sets if any spline curves in the SVG should be drawn with their control point frames. This property defaults to false in a newly created SVGImportOptions object.
isHorizontalFlip | Gets and sets if the SVG is flipped along the sketch X axis. This property defaults to false in a newly created SVGImportOptions object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVerticalFlip | Gets and sets if the SVG is flipped along the sketch Y axis. This property defaults to false in a newly created SVGImportOptions object.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
transform Gets and sets the transformation matrix that defines the position, orientation, scale, and mirroring of the imported SVG data relative to the sketch coordinate system. This property defaults to an identity matrix in a newly created SVGImportOptions object.

You can define mirroring (the equivalent of horizontal or vertical flip) in the matrix. Doing this gives you more explicit control over the results. You can also use the isHorizontalFlip and isVerticalFlop properties to define the flip. These result in flipping the geometry along the center of the geometry's bounding box.

Accessed From

ImportManager.createSVGImportOptions

Version

Introduced in version October 2022


SVGImportOptions.classType Method

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SVGImportOptions.classType()
This is a static method.

#include <Core/Application/SVGImportOptions.h>

returnValue = adsk::core::SVGImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version October 2022


SVGImportOptions.filename Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Gets and sets the filename or URL of the file to be imported.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.filename

# Set the value of the property.
sVGImportOptions_var.filename = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
string propertyValue = sVGImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sVGImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version October 2022


SVGImportOptions.isControlPointFrameDisplayed Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Gets and sets if any spline curves in the SVG should be drawn with their control point frames. This property defaults to false in a newly created SVGImportOptions object.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.isControlPointFrameDisplayed

# Set the value of the property.
sVGImportOptions_var.isControlPointFrameDisplayed = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
boolean propertyValue = sVGImportOptions_var->isControlPointFrameDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sVGImportOptions_var->isControlPointFrameDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


SVGImportOptions.isHorizontalFlip Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Gets and sets if the SVG is flipped along the sketch X axis. This property defaults to false in a newly created SVGImportOptions object.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.isHorizontalFlip

# Set the value of the property.
sVGImportOptions_var.isHorizontalFlip = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
boolean propertyValue = sVGImportOptions_var->isHorizontalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sVGImportOptions_var->isHorizontalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


SVGImportOptions.isValid Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.isValid
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
boolean propertyValue = sVGImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2022


SVGImportOptions.isVerticalFlip Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Gets and sets if the SVG is flipped along the sketch Y axis. This property defaults to false in a newly created SVGImportOptions object.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.isVerticalFlip

# Set the value of the property.
sVGImportOptions_var.isVerticalFlip = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
boolean propertyValue = sVGImportOptions_var->isVerticalFlip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sVGImportOptions_var->isVerticalFlip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


SVGImportOptions.isViewFit Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

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.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.isViewFit

# Set the value of the property.
sVGImportOptions_var.isViewFit = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
boolean propertyValue = sVGImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sVGImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version October 2022


SVGImportOptions.objectType Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.objectType
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
string propertyValue = sVGImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2022


SVGImportOptions.transform Property

Parent Object: SVGImportOptions
Defined in namespace "adsk::core" and the header file is <Core/Application/SVGImportOptions.h>

Description

Gets and sets the transformation matrix that defines the position, orientation, scale, and mirroring of the imported SVG data relative to the sketch coordinate system. This property defaults to an identity matrix in a newly created SVGImportOptions object.

You can define mirroring (the equivalent of horizontal or vertical flip) in the matrix. Doing this gives you more explicit control over the results. You can also use the isHorizontalFlip and isVerticalFlop properties to define the flip. These result in flipping the geometry along the center of the geometry's bounding box.

Syntax

  • Python
  • C++
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.

# Get the value of the property.
propertyValue = sVGImportOptions_var.transform

# Set the value of the property.
sVGImportOptions_var.transform = propertyValue
"sVGImportOptions_var" is a variable referencing a SVGImportOptions object.
#include <Core/Application/SVGImportOptions.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sVGImportOptions_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = sVGImportOptions_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version October 2022


SweepFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Object that represents an existing sweep feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
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 or surface. 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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
extent | Gets and sets the sweep extent type. It defaults to PerpendicularToPathExtentType. When sweeping a solid setting the twist angle requires the solid twist axis to be set. This property is ignored when a guide rail has not been specified.
faces Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
guideRail Gets and sets the guide rail to create the sweep. This can be set to null to have a path only sweep.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
guideSurfaces Gets and sets the guide surfaces to create the sweep. This can be set to an empty array to remove the guide surfaces and have a single path sweep feature. The isChainSelection property controls whether tangentially connected faces to the guide surfaces are also made guide surfaces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
healthState | Returns the current health state of the feature.
isChainSelection | Get and sets whether faces that are tangentially connected to the guide surfaces are also made guide surfaces.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 if sweeping a solid or a guide rail or surface has been specified.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
path Gets and sets the path to create the sweep. This property returns nothing in the case where the feature is non-parametric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
sideFaces | Property that returns a object that provides access to all of the faces created around the perimeter of the feature.
solidAlignedAxis | Gets and sets the axis to align the solid being swept with. The axis is used when sweeping a solid, and the solid orientation is set to AlignedSolidOrientationType. It can be a sketch line, linear edge, or construction axis.
solidBody Gets and sets the BRepBody object to sweep. It must be a solid body. Setting this property results in the type being a single path sweep, and if the profile, guide path, or surface are set, they are set to null.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
solidOrientation Gets and sets the sweep solid orientation. It defaults to PerpendicularSolidOrientationType. Setting the solid orientation to AlignedSolidOrientationType requires the solid aligned axis to be set. This property is ignored if sweeping a profile.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
solidTwistAxis | Gets and sets the twist axis of the solid being swept. The axis is used when sweeping a solid, and the twist angle is set. It can be a sketch line, linear edge, construction axis, or a face that defines an axis (cylinder, cone, torus, etc.).
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. This property is ignored if sweeping a solid or a guide rail or surface has been specified.
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. When sweeping a solid setting the twist angle requires the solid twist axis to be set. This property is ignored if a guide rail or surface has been specified.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets the distance for the first side. This property returns nothing in the case where the feature is non-parametric.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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 or surface. 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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.entityToken Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.entityToken
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
string propertyValue = sweepFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SweepFeature.errorOrWarningMessage Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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.extent Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the sweep extent type. It defaults to PerpendicularToPathExtentType. When sweeping a solid setting the twist angle requires the solid twist axis to be set. This property is ignored when a guide rail has not been specified.

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.extent

# Set the value of the property.
sweepFeature_var.extent = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
SweepExtentTypes propertyValue = sweepFeature_var->extent();

// Set the value of the property, where value_var is a SweepExtentTypes.
bool returnValue = sweepFeature_var->extent(value_var);

Property Value

This is a read/write property whose value is a SweepExtentTypes.

Version

Introduced in version December 2020


SweepFeature.faces Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the guide rail to create the sweep. This can be set to null to have a path only sweep.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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.guideSurfaces Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the guide surfaces to create the sweep. This can be set to an empty array to remove the guide surfaces and have a single path sweep feature. The isChainSelection property controls whether tangentially connected faces to the guide surfaces are also made guide surfaces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.guideSurfaces

# Set the value of the property.
sweepFeature_var.guideSurfaces = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = sweepFeature_var->guideSurfaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = sweepFeature_var->guideSurfaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version January 2024


SweepFeature.healthState Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the current health state of the feature.

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.isChainSelection Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Get and sets whether faces that are tangentially connected to the guide surfaces are also made guide surfaces.

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isChainSelection

# Set the value of the property.
sweepFeature_var.isChainSelection = 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->isChainSelection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeature_var->isChainSelection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


SweepFeature.isDirectionFlipped Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Indicates if this feature was initially created as a solid or a surface.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the type of operation performed by the sweep.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType. This property is ignored if sweeping a solid or a guide rail or surface has been specified.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the path to create the sweep. This property returns nothing in the case where the feature is non-parametric.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Property that returns a object that provides access to all of the faces created around the perimeter of the feature.

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.solidAlignedAxis Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the axis to align the solid being swept with. The axis is used when sweeping a solid, and the solid orientation is set to AlignedSolidOrientationType. It can be a sketch line, linear edge, or construction axis.

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.solidAlignedAxis

# Set the value of the property.
sweepFeature_var.solidAlignedAxis = 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->solidAlignedAxis();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeature_var->solidAlignedAxis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2024


SweepFeature.solidBody Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the BRepBody object to sweep. It must be a solid body. Setting this property results in the type being a single path sweep, and if the profile, guide path, or surface are set, they are set to null.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.solidBody

# Set the value of the property.
sweepFeature_var.solidBody = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = sweepFeature_var->solidBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = sweepFeature_var->solidBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version May 2024


SweepFeature.solidOrientation Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the sweep solid orientation. It defaults to PerpendicularSolidOrientationType. Setting the solid orientation to AlignedSolidOrientationType requires the solid aligned axis to be set. This property is ignored if sweeping a profile.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.solidOrientation

# Set the value of the property.
sweepFeature_var.solidOrientation = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
SweepSolidOrientationTypes propertyValue = sweepFeature_var->solidOrientation();

// Set the value of the property, where value_var is a SweepSolidOrientationTypes.
bool returnValue = sweepFeature_var->solidOrientation(value_var);

Property Value

This is a read/write property whose value is a SweepSolidOrientationTypes.

Version

Introduced in version May 2024


SweepFeature.solidTwistAxis Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Gets and sets the twist axis of the solid being swept. The axis is used when sweeping a solid, and the twist angle is set. It can be a sketch line, linear edge, construction axis, or a face that defines an axis (cylinder, cone, torus, etc.).

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.solidTwistAxis

# Set the value of the property.
sweepFeature_var.solidTwistAxis = 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->solidTwistAxis();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeature_var->solidTwistAxis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2024


SweepFeature.startFaces Property

Parent Object: SweepFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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. This property is ignored if sweeping a solid or a guide rail or surface has been specified.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeature.h>

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. When sweeping a solid setting the twist angle requires the solid twist axis to be set. This property is ignored if a guide rail or surface has been specified.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a sweep feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
extent | Gets and sets the sweep extent type. It defaults to PerpendicularToPathExtentType. This property is ignored when a guide rail has not been specified.
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.
guideSurfaces | Gets and sets the guide surfaces to create the sweep. This can be set to an empty array to remove the guide surfaces and have a single path sweep feature. By default connected faces that are tangent to any of the guide faces are set as guide faces. Use the isChainSelection property to disable the use of tangent faces.
isChainSelection | Get and sets whether faces that are tangentially connected to the guide surfaces are also made guide surfaces.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 sweeping a solid or a guide rail or surface 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.
solidAlignedAxis | Gets and sets the axis to align the solid being swept with. The axis is used when sweeping a solid, and the solid orientation is set to AlignedSolidOrientationType. It can be a sketch line, linear edge, or construction axis.
solidBody | Gets and sets the BRepBody object to sweep. It must be a solid body. Setting this property results in the type being a single path sweep, and if the profile, guide path, or surface are set, they are set to null.
solidOrientation | Gets and sets the solid sweep orientation. It defaults to PerpendicularSolidOrientationType. Setting the solid orientation to AlignedSolidOrientationType requires the solid aligned axis to be set. This property is ignored if sweeping a profile.
solidTwistAxis | Gets and sets the twist axis of the solid being swept. The axis is used when sweeping a solid, and the twist angle is set. It can be a sketch line, linear edge, construction axis, or a face that defines an axis (cylinder, cone, torus, etc.).
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 ignored if sweeping a solid or a guide rail or surface has been specified. 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 twist angle of the sweep. This property is initialized with a twist angle of zero. When sweeping a solid setting the twist angle requires the solid twist axis to be set.

This property is ignored if a guide rail or surface has been specified. This property is valid for both parametric and non-parametric extrusions.

Accessed From

SweepFeatures.createInput, SweepFeatures.createInputForSolid

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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.extent Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the sweep extent type. It defaults to PerpendicularToPathExtentType. This property is ignored when a guide rail has not been specified.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.extent

# Set the value of the property.
sweepFeatureInput_var.extent = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
SweepExtentTypes propertyValue = sweepFeatureInput_var->extent();

// Set the value of the property, where value_var is a SweepExtentTypes.
bool returnValue = sweepFeatureInput_var->extent(value_var);

Property Value

This is a read/write property whose value is a SweepExtentTypes.

Version

Introduced in version December 2020


SweepFeatureInput.guideRail Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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.guideSurfaces Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the guide surfaces to create the sweep. This can be set to an empty array to remove the guide surfaces and have a single path sweep feature. By default connected faces that are tangent to any of the guide faces are set as guide faces. Use the isChainSelection property to disable the use of tangent faces.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.guideSurfaces

# Set the value of the property.
sweepFeatureInput_var.guideSurfaces = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = sweepFeatureInput_var->guideSurfaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = sweepFeatureInput_var->guideSurfaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version January 2024


SweepFeatureInput.isChainSelection Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Get and sets whether faces that are tangentially connected to the guide surfaces are also made guide surfaces.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.isChainSelection

# Set the value of the property.
sweepFeatureInput_var.isChainSelection = 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->isChainSelection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeatureInput_var->isChainSelection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


SweepFeatureInput.isDirectionFlipped Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the type of operation performed by the sweep.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType. This property is ignored when sweeping a solid or a guide rail or surface has been specified.

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.

Samples

Name | Description
sweepFeatures.add | Demonstrates the sweepFeatures.add method.

Version

Introduced in version November 2014


SweepFeatureInput.participantBodies Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the path to create the sweep.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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.solidAlignedAxis Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the axis to align the solid being swept with. The axis is used when sweeping a solid, and the solid orientation is set to AlignedSolidOrientationType. It can be a sketch line, linear edge, or construction axis.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.solidAlignedAxis

# Set the value of the property.
sweepFeatureInput_var.solidAlignedAxis = 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->solidAlignedAxis();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeatureInput_var->solidAlignedAxis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2024


SweepFeatureInput.solidBody Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the BRepBody object to sweep. It must be a solid body. Setting this property results in the type being a single path sweep, and if the profile, guide path, or surface are set, they are set to null.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.solidBody

# Set the value of the property.
sweepFeatureInput_var.solidBody = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = sweepFeatureInput_var->solidBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = sweepFeatureInput_var->solidBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version May 2024


SweepFeatureInput.solidOrientation Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the solid sweep orientation. It defaults to PerpendicularSolidOrientationType. Setting the solid orientation to AlignedSolidOrientationType requires the solid aligned axis to be set. This property is ignored if sweeping a profile.

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.solidOrientation

# Set the value of the property.
sweepFeatureInput_var.solidOrientation = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
SweepSolidOrientationTypes propertyValue = sweepFeatureInput_var->solidOrientation();

// Set the value of the property, where value_var is a SweepSolidOrientationTypes.
bool returnValue = sweepFeatureInput_var->solidOrientation(value_var);

Property Value

This is a read/write property whose value is a SweepSolidOrientationTypes.

Version

Introduced in version May 2024


SweepFeatureInput.solidTwistAxis Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the twist axis of the solid being swept. The axis is used when sweeping a solid, and the twist angle is set. It can be a sketch line, linear edge, construction axis, or a face that defines an axis (cylinder, cone, torus, etc.).

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.solidTwistAxis

# Set the value of the property.
sweepFeatureInput_var.solidTwistAxis = 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->solidTwistAxis();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeatureInput_var->solidTwistAxis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2024


SweepFeatureInput.taperAngle Property

Parent Object: SweepFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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 ignored if sweeping a solid or a guide rail or surface has been specified. This property is valid for both parametric and non-parametric extrusions.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

Gets and sets the twist angle of the sweep. This property is initialized with a twist angle of zero. When sweeping a solid setting the twist angle requires the solid twist axis to be set.

This property is ignored if a guide rail or surface has been specified. This property is valid for both parametric and non-parametric extrusions.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Collection that provides access to all of the existing sweep features in a component and supports the ability to create new sweep features.

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 or surface. 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.
createInputForSolid | Creates a SweepFeatureInput object for defining a simple sweep feature from a B-Rep solid with a path. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Creates a new sweep feature.

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
sweepFeatures.add | Demonstrates the sweepFeatures.add method.
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

Description

Demonstrates the sweepFeatures.add method.

Code Samples

  • Python
def demo_sweepFeatures_add(rootComp: adsk.fusion.Component):
    profile = _ui.selectEntity('Select a profile.', 'Profiles').entity
    pathCurve = _ui.selectEntity('Select a path curve', 'SketchCurves').entity

    path = adsk.fusion.Path.create(pathCurve, adsk.fusion.ChainedCurveOptions.tangentChainedCurves)

    sweepFeatures = rootComp.features.sweepFeatures
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    input = sweepFeatures.createInput(profile, path, operation)
    input.orientation = adsk.fusion.SweepOrientationTypes.PerpendicularOrientationType
    sweepFeature = sweepFeatures.add(input)


SweepFeatures.classType Method

Parent Object: SweepFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

The number of sweep features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Creates a SweepFeatureInput object for defining a simple sweep feature with only a path and no guide rail or surface. 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.

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
sweepFeatures.add | Demonstrates the sweepFeatures.add method.
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.createInputForSolid Method

Parent Object: SweepFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Creates a SweepFeatureInput object for defining a simple sweep feature from a B-Rep solid with a path. 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.

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
returnValue = sweepFeatures_var.createInputForSolid(solidBody, path, operation)
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

#include <Fusion/Features/SweepFeatures.h>

returnValue = sweepFeatures_var->createInputForSolid(solidBody, path, operation);

Return Value

Type | Description
SweepFeatureInput | Returns the newly created SweepFeatureInput object or null if the creation fails.

Parameters

Name | Type | Description
solidBody | BRepBody | The BRepBody object to sweep. It must be a solid body.
path | Path | The Path object that defines the path the body will be swept along.
operation | FeatureOperations | The type of feature operation to perform.

Version

Introduced in version May 2024


SweepFeatures.isValid Property

Parent Object: SweepFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Function that returns the specified sweep feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

Function that returns the specified sweep feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

Description

A definition object that is used to define the extents of a feature to be symmetric.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

Description

Statically creates a new SymmetricExtentDefinition object. This is used as input when create a new feature and defining the starting condition.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SymmetricExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

A symmetry constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns the first curve.

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.entityToken Property

Parent Object: SymmetryConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.entityToken
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
string propertyValue = symmetryConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


SymmetryConstraint.entityTwo Property

Parent Object: SymmetryConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns the second curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SymmetryConstraint.h>

Description

Returns the axis (SketchLine) that defines the symmetry.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Tab command inputs contain a set of command inputs and/or group command inputs/

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().
deleteMe | Deletes this Command input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
resourceFolder | Gets the folder that contains the icon for the tab. If no name is specified (no text on tab), a resourceFolder containing the icon needs to be provided. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Sets this to be the currently activated (selected) tab.

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();

Return Value

Type | Description
boolean | Returns true if the TabCommandInput was successfully activated.

Version

Introduced in version July 2015


TabCommandInput.children Property

Parent Object: TabCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: TabCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
returnValue = tabCommandInput_var.deleteMe()
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

#include <Core/UserInterface/TabCommandInput.h>

returnValue = tabCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


TabCommandInput.id Property

Parent Object: TabCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets if this is the currently activated (selected) tab.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

Description

Gets the folder that contains the icon for the tab. If no name is specified (no text on tab), a resourceFolder containing the icon needs to be provided. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TabCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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 separate 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.

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.
deleteMe | Deletes this Command input.
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 multiple 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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Adds a new command input to the toolbar at the bottom of the table.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Removes all rows in the table and the toolbar.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets and sets the spacing between columns. This is defined in pixels. For a newly created table, this property defaults to 1.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: TableCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.deleteMe()
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


TableCommandInput.deleteRow Method

Parent Object: TableCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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 multiple positions.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the position of the specified command input within the table.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets and sets whether a grid is displayed for the table. For a newly created table, this property defaults to false.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets and sets the spacing between rows. This is defined in pixels. For a newly created table, this property defaults to 1.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

Description

Gets and sets the presentation style the table is currently using for its display.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TableCommandInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

A tangent constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Returns the first curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Returns the second curve.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: TangentConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.entityToken
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
string propertyValue = tangentConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


TangentConstraint.isDeletable Property

Parent Object: TangentConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/TangentConstraint.h>

Description

Returns the parent sketch object.

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


TangentRelationship Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

A tangent relationship in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 tangent relationship.

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 tangent relationship.
entityToken Returns a token for the TangentRelationship object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same tangent relationship.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
faceOne Gets and sets the first BRepFace object that will remain tangent to the set of specified tangent faces.

To set this property, you need to position the timeline marker to immediately before this tangent relationship. This can be accomplished using the following code: thisTangentRelationship.timelineObject.rollTo(True)
healthState | Returns the current health state of the tangent relationship.
isSuppressed | Gets and sets if this tangent relationship 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 tangent relationship.
nativeObject The native object is the tangent relationship in the context of the component it was created within.

Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
occurrenceOne | Returns the first of two occurrences that this tangent relationship defines a relationship between.
occurrenceTwo | Returns the second of two occurrences that this tangent relationship defines a relationship between.
parentComponent | Returns the parent component that owns this tangent relationship.
tangentFaces Gets and sets a single BRepFace object that is part of the body that faceOne will remain tangent to. All of the faces of the body will be used when computing the tangent relationship.

To set this property, you need to position the timeline marker to immediately before this tangent relationship. This can be accomplished using the following code: thisTangentRelationship.timelineObject.rollTo(True)
timelineObject | Returns the timeline object associated with this tangent relationship.

Accessed From

Component.allTangentRelationships, FlatPatternComponent.allTangentRelationships, TangentRelationship.createForAssemblyContext, TangentRelationship.nativeObject, TangentRelationships.add, TangentRelationships.item, TangentRelationships.itemByName

Version

Introduced in version May 2022


TangentRelationship.assemblyContext Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

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.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.assemblyContext
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = tangentRelationship_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2022


TangentRelationship.attributes Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the collection of attributes associated with this tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.attributes
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = tangentRelationship_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2022


TangentRelationship.classType Method

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TangentRelationship.classType()
This is a static method.

#include <Fusion/Components/TangentRelationship.h>

returnValue = adsk::fusion::TangentRelationship::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


TangentRelationship.createForAssemblyContext Method

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

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.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
returnValue = tangentRelationship_var.createForAssemblyContext(occurrence)
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

#include <Fusion/Components/TangentRelationship.h>

returnValue = tangentRelationship_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
TangentRelationship | 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 2022


TangentRelationship.deleteMe Method

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Deletes this tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
returnValue = tangentRelationship_var.deleteMe()
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

#include <Fusion/Components/TangentRelationship.h>

returnValue = tangentRelationship_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete is successful.

Version

Introduced in version May 2022


TangentRelationship.entityToken Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns a token for the TangentRelationship object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same tangent relationship.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.entityToken
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
string propertyValue = tangentRelationship_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TangentRelationship.errorOrWarningMessage Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

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.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.errorOrWarningMessage
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
string propertyValue = tangentRelationship_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TangentRelationship.faceOne Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Gets and sets the first BRepFace object that will remain tangent to the set of specified tangent faces.

To set this property, you need to position the timeline marker to immediately before this tangent relationship. This can be accomplished using the following code: thisTangentRelationship.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.faceOne

# Set the value of the property.
tangentRelationship_var.faceOne = propertyValue
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = tangentRelationship_var->faceOne();

// Set the value of the property, where value_var is a Base.
bool returnValue = tangentRelationship_var->faceOne(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2022


TangentRelationship.healthState Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the current health state of the tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.healthState
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
FeatureHealthStates propertyValue = tangentRelationship_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version May 2022


TangentRelationship.isSuppressed Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Gets and sets if this tangent relationship is suppressed.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.isSuppressed

# Set the value of the property.
tangentRelationship_var.isSuppressed = propertyValue
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
boolean propertyValue = tangentRelationship_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tangentRelationship_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TangentRelationship.isValid Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.isValid
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
boolean propertyValue = tangentRelationship_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


TangentRelationship.name Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Gets and sets the name of the tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.name

# Set the value of the property.
tangentRelationship_var.name = propertyValue
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
string propertyValue = tangentRelationship_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = tangentRelationship_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TangentRelationship.nativeObject Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

The native object is the tangent relationship in the context of the component it was created within.

Returns null in the case where this object is not in the context of an assembly but is already the native object.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.nativeObject
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<TangentRelationship> propertyValue = tangentRelationship_var->nativeObject();

Property Value

This is a read only property whose value is a TangentRelationship.

Version

Introduced in version May 2022


TangentRelationship.objectType Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.objectType
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
string propertyValue = tangentRelationship_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TangentRelationship.occurrenceOne Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the first of two occurrences that this tangent relationship defines a relationship between.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.occurrenceOne
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = tangentRelationship_var->occurrenceOne();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2022


TangentRelationship.occurrenceTwo Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the second of two occurrences that this tangent relationship defines a relationship between.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.occurrenceTwo
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = tangentRelationship_var->occurrenceTwo();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2022


TangentRelationship.parentComponent Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the parent component that owns this tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.parentComponent
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Component> propertyValue = tangentRelationship_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version May 2022


TangentRelationship.tangentFaces Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Gets and sets a single BRepFace object that is part of the body that faceOne will remain tangent to. All of the faces of the body will be used when computing the tangent relationship.

To set this property, you need to position the timeline marker to immediately before this tangent relationship. This can be accomplished using the following code: thisTangentRelationship.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.tangentFaces

# Set the value of the property.
tangentRelationship_var.tangentFaces = propertyValue
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<Base> propertyValue = tangentRelationship_var->tangentFaces();

// Set the value of the property, where value_var is a Base.
bool returnValue = tangentRelationship_var->tangentFaces(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2022


TangentRelationship.timelineObject Property

Parent Object: TangentRelationship
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationship.h>

Description

Returns the timeline object associated with this tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationship_var" is a variable referencing a TangentRelationship object.

# Get the value of the property.
propertyValue = tangentRelationship_var.timelineObject
"tangentRelationship_var" is a variable referencing a TangentRelationship object.
#include <Fusion/Components/TangentRelationship.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = tangentRelationship_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version May 2022


TangentRelationshipInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

Defines all of the information required to create a new tangent relationship. This object provides equivalent functionality to the Tangent Relationship command dialog in that it gathers the required information to create a tangent relationship.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
faceOne | Gets and sets the first BRepFace object that will remain tangent to the set of specified tangent faces.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tangentFaces | Gets and sets a single BRepFace object that is part of the body that faceOne will remain tangent to. All of the faces of the body will be used when computing the tangent relationship.

Accessed From

TangentRelationships.createInput

Version

Introduced in version May 2022


TangentRelationshipInput.classType Method

Parent Object: TangentRelationshipInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TangentRelationshipInput.classType()
This is a static method.

#include <Fusion/Components/TangentRelationshipInput.h>

returnValue = adsk::fusion::TangentRelationshipInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


TangentRelationshipInput.faceOne Property

Parent Object: TangentRelationshipInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

Gets and sets the first BRepFace object that will remain tangent to the set of specified tangent faces.

Syntax

  • Python
  • C++
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.

# Get the value of the property.
propertyValue = tangentRelationshipInput_var.faceOne

# Set the value of the property.
tangentRelationshipInput_var.faceOne = propertyValue
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.
#include <Fusion/Components/TangentRelationshipInput.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = tangentRelationshipInput_var->faceOne();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = tangentRelationshipInput_var->faceOne(value_var);

Property Value

This is a read/write property whose value is a BRepFace.

Version

Introduced in version May 2022


TangentRelationshipInput.isValid Property

Parent Object: TangentRelationshipInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.

# Get the value of the property.
propertyValue = tangentRelationshipInput_var.isValid
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.
#include <Fusion/Components/TangentRelationshipInput.h>

// Get the value of the property.
boolean propertyValue = tangentRelationshipInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


TangentRelationshipInput.objectType Property

Parent Object: TangentRelationshipInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.

# Get the value of the property.
propertyValue = tangentRelationshipInput_var.objectType
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.
#include <Fusion/Components/TangentRelationshipInput.h>

// Get the value of the property.
string propertyValue = tangentRelationshipInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TangentRelationshipInput.tangentFaces Property

Parent Object: TangentRelationshipInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationshipInput.h>

Description

Gets and sets a single BRepFace object that is part of the body that faceOne will remain tangent to. All of the faces of the body will be used when computing the tangent relationship.

Syntax

  • Python
  • C++
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.

# Get the value of the property.
propertyValue = tangentRelationshipInput_var.tangentFaces

# Set the value of the property.
tangentRelationshipInput_var.tangentFaces = propertyValue
"tangentRelationshipInput_var" is a variable referencing a TangentRelationshipInput object.
#include <Fusion/Components/TangentRelationshipInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = tangentRelationshipInput_var->tangentFaces();

// Set the value of the property, where value_var is a Base.
bool returnValue = tangentRelationshipInput_var->tangentFaces(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2022


TangentRelationships Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

The collection of Tangent Relationships in this component. This provides access to all existing tangent relationships and supports the ability to create new tangent relationships.

Methods

Name | Description
add | Creates a new tangent relationship between two components.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 TangentRelationshipInput object, which is the API equivalent to the Tangent Relationship command dialog. You use methods and properties on the returned class to set the desired options, similar to providing input in the Tangent Relationship command dialog. Once the settings are defined you call the TangentRelationships.add method passing in the TangentRelationshipInput object to create the actual TangentRelationship.
item | Function that returns the specified tangent relationship using an index into the collection.
itemByName | Function that returns the specified tangent relationship using a name.

Properties

Name | Description
count | Returns number of TangentRelationship 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Component.tangentRelationships, FlatPatternComponent.tangentRelationships

Version

Introduced in version May 2022


TangentRelationships.add Method

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Creates a new tangent relationship between two components.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
returnValue = tangentRelationships_var.add(input)
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

#include <Fusion/Components/TangentRelationships.h>

returnValue = tangentRelationships_var->add(input);

Return Value

Type | Description
TangentRelationship | Returns the newly created TangentRelationship or null in the case of failure.

Parameters

Name | Type | Description
input | TangentRelationshipInput | The TangentRelationshipInput object that defines the geometry and various inputs that fully define a tangent relationship. A TangentRelationshipInput object is created using the TangentRelationships.createInput method.

Version

Introduced in version May 2022


TangentRelationships.classType Method

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TangentRelationships.classType()
This is a static method.

#include <Fusion/Components/TangentRelationships.h>

returnValue = adsk::fusion::TangentRelationships::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


TangentRelationships.count Property

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Returns number of TangentRelationship objects in the collection.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

# Get the value of the property.
propertyValue = tangentRelationships_var.count
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
#include <Fusion/Components/TangentRelationships.h>

// Get the value of the property.
uinteger propertyValue = tangentRelationships_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2022


TangentRelationships.createInput Method

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Creates a TangentRelationshipInput object, which is the API equivalent to the Tangent Relationship command dialog. You use methods and properties on the returned class to set the desired options, similar to providing input in the Tangent Relationship command dialog. Once the settings are defined you call the TangentRelationships.add method passing in the TangentRelationshipInput object to create the actual TangentRelationship.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
returnValue = tangentRelationships_var.createInput(faceOne, tangentFaces)
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

#include <Fusion/Components/TangentRelationships.h>

returnValue = tangentRelationships_var->createInput(faceOne, tangentFaces);

Return Value

Type | Description
TangentRelationshipInput | Returns the TangentRelationshipInput object or null if the creation failed.

Parameters

Name | Type | Description
faceOne | BRepFace | A BRepFace object that will remain tangent to the set of specified tangent faces.
tangentFaces | Base | A single BRepFace object that is part of the body that faceOne will remain tangent to. All of the faces of the body will be used when computing the tangent relationship.

Version

Introduced in version May 2022


TangentRelationships.isValid Property

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

# Get the value of the property.
propertyValue = tangentRelationships_var.isValid
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
#include <Fusion/Components/TangentRelationships.h>

// Get the value of the property.
boolean propertyValue = tangentRelationships_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


TangentRelationships.item Method

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Function that returns the specified tangent relationship using an index into the collection.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
returnValue = tangentRelationships_var.item(index)
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

#include <Fusion/Components/TangentRelationships.h>

returnValue = tangentRelationships_var->item(index);

Return Value

Type | Description
TangentRelationship | 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 May 2022


TangentRelationships.itemByName Method

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

Function that returns the specified tangent relationship using a name.

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
returnValue = tangentRelationships_var.itemByName(name)
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

#include <Fusion/Components/TangentRelationships.h>

returnValue = tangentRelationships_var->itemByName(name);

Return Value

Type | Description
TangentRelationship | 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 May 2022


TangentRelationships.objectType Property

Parent Object: TangentRelationships
Defined in namespace "adsk::fusion" and the header file is <Fusion/Components/TangentRelationships.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tangentRelationships_var" is a variable referencing a TangentRelationships object.

# Get the value of the property.
propertyValue = tangentRelationships_var.objectType
"tangentRelationships_var" is a variable referencing a TangentRelationships object.
#include <Fusion/Components/TangentRelationships.h>

// Get the value of the property.
string propertyValue = tangentRelationships_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TemporaryBRepManager Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

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.
createProjectedBodyOutline | Computes the approximate outline of a body. The outline is the loops formed from projecting the non-occluded silhouette curves of the body onto a plane. The outline is returned as a temporary BRepBody consisting of planar BRepFace objects whose boundaries form the outline. The computed outline can be an approximation i.e. not precise. This is to make it useful in cases where robustness is more important than precision. For most cases, a precise analytical result is computed, but in some cases, the silhouette of a curved surface may be approximated by a series of straight lines. Even though it's an approximation you can control the tolerance of the approximation. A tighter tolerance will result in a longer compute time.
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 toroidal 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.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

TemporaryBRepManager.get

Samples

Name | Description
TemporaryBRepManager API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.booleanOperation Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.classType Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a temporary copy of the input BRepBody, BRepFace, or BRepEdge object.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createBox Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a new temporary solid box BRepBody object.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createCylinderOrCone Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a temporary solid cylinder or cone BRepBody object.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createEllipticalCylinderOrCone Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a temporary elliptical solid cylinder or cone BrepBody object.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createFaceFromPlanarWires Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

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 contain planar wires. Each wire must be closed, they should not overlap, and they should all lie on the same plane.

Samples

Name | Description
TemporaryBRepManager API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createFromFile Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates new BRepBody objects based on the contents of the specified file.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createHelixWire Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a B-Rep body that contains a wire with a single edge that represents a helical curve.

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);

Return Value

Type | Description
BRepBody | Returns a temporary BRepBody object that contains a wire body that is the shape of the specified helix. Return null if the creation failed.

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 helix.
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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createProjectedBodyOutline Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Computes the approximate outline of a body. The outline is the loops formed from projecting the non-occluded silhouette curves of the body onto a plane. The outline is returned as a temporary BRepBody consisting of planar BRepFace objects whose boundaries form the outline.

The computed outline can be an approximation i.e. not precise. This is to make it useful in cases where robustness is more important than precision. For most cases, a precise analytical result is computed, but in some cases, the silhouette of a curved surface may be approximated by a series of straight lines. Even though it's an approximation you can control the tolerance of the approximation. A tighter tolerance will result in a longer compute time.

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

(returnValue, containsApproximation) = temporaryBRepManager_var.createProjectedBodyOutline(body, projectionPlane, tolerance)

#include <Fusion/BRep/TemporaryBRepManager.h

// Declare the output arguments.
Ptr<BRepBody> body;
Ptr<Plane> projectionPlane;
double tolerance;
boolean containsApproximation;
Ptr<BRepBody> returnValue = temporaryBRepManager_var->createProjectedBodyOutline(body, projectionPlane, tolerance, containsApproximation);

Return Value

Type | Description
BRepBody | Returns a BRepBody object consisting of planar BRepFace objects whose boundaries define the body's outline.

Parameters

Name | Type | Description
body | BRepBody | Input BRepBody object to calculate the projected outline for.
projectionPlane | Plane | Input Plane object that defines the position and orientation of the plane to project the body onto. The resulting body will lie on this plane.
tolerance | double | Input value that specifies the tolerance in centimeters to use when approximating smooth surfaces with line segments. A negative tolerance uses the default value which is 0.001 times the length of the diagonal of the bounding box of the input body. A positive tolerance must be greater than the point tolerance (0.000001).
containsApproximation | boolean | Output value that indicates if the result contains any silhouette curves that are an approximation of the true silhouette.

Version

Introduced in version November 2024


TemporaryBRepManager.createRuledSurface Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a new body by creating a ruled surface between the two input wire bodies.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createSilhouetteCurves Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Calculates the silhouette curve geometry for a given face as viewed from a given direction.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createSphere Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a temporary spherical BRepBody object.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createTorus Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Creates a temporary toroidal BRepBody object.

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 circle 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 circle this would be the radius of the profile circle.

Samples

Name | Description
TemporaryBRepManager API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createWireFromCurves Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Give an array of curve geometry objects, this method creates a new wire body.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.deleteFaces Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.exportToFile Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Exports the input bodies to the specified file.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.get Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

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.

Remarks

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 points where solids connect, it guarantees that there will be mesh nodes along those boundaries.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.isValid Property

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Calculates the intersection between the input body and plane and creates a wire body that represents the intersection curves.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.transform Method

Parent Object: TemporaryBRepManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/TemporaryBRepManager.h>

Description

Transforms the input body using the specified transformation matrix.

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 API Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TessellateFeature Object

TessellateFeature Object Preview

Derived from: MeshFeature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing tessellate feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
aspectRatio | Specify ratio between the height and width of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
createQuads | Creates quad faces on the mesh body where possible.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputBodies Gets and sets the input B-Rep bodies.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
maximumEdgeLength | Specify maximum length of any face edge on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
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.
normalDeviation | Specify maximum angle between the normal vectors of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
surfaceDeviation | Specify maximum distance between the surface of the original body and the surface of the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
tessellateRefinementType | Gets and sets the type of refinement.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

TessellateFeature.createForAssemblyContext, TessellateFeature.nativeObject, TessellateFeatures.add, TessellateFeatures.item, TessellateFeatures.itemByName

Version

Introduced in version January 2025


TessellateFeature.aspectRatio Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Specify ratio between the height and width of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.aspectRatio
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = tessellateFeature_var->aspectRatio();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


TessellateFeature.assemblyContext Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.assemblyContext
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = tessellateFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2025


TessellateFeature.attributes Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.attributes
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = tessellateFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2025


TessellateFeature.baseFeature Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.baseFeature
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = tessellateFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2025


TessellateFeature.bodies Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.bodies
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = tessellateFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2025


TessellateFeature.classType Method

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TessellateFeature.classType()
This is a static method.

#include <Fusion/MeshBody/TessellateFeature.h>

returnValue = adsk::fusion::TessellateFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


TessellateFeature.createForAssemblyContext Method

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
returnValue = tessellateFeature_var.createForAssemblyContext(occurrence)
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

#include <Fusion/MeshBody/TessellateFeature.h>

returnValue = tessellateFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
TessellateFeature | 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 2025


TessellateFeature.createQuads Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Creates quad faces on the mesh body where possible.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.createQuads

# Set the value of the property.
tessellateFeature_var.createQuads = propertyValue
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
boolean propertyValue = tessellateFeature_var->createQuads();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tessellateFeature_var->createQuads(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeature.deleteMe Method

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
returnValue = tessellateFeature_var.deleteMe()
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

#include <Fusion/MeshBody/TessellateFeature.h>

returnValue = tessellateFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2025


TessellateFeature.dissolve Method

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
returnValue = tessellateFeature_var.dissolve()
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

#include <Fusion/MeshBody/TessellateFeature.h>

returnValue = tessellateFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2025


TessellateFeature.entityToken Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.entityToken
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
string propertyValue = tessellateFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


TessellateFeature.errorOrWarningMessage Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.errorOrWarningMessage
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
string propertyValue = tessellateFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


TessellateFeature.faces Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.faces
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = tessellateFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2025


TessellateFeature.healthState Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.healthState
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = tessellateFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2025


TessellateFeature.inputBodies Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Gets and sets the input B-Rep bodies.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.inputBodies

# Set the value of the property.
tessellateFeature_var.inputBodies = propertyValue
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = tessellateFeature_var->inputBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = tessellateFeature_var->inputBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2025


TessellateFeature.isParametric Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.isParametric
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
boolean propertyValue = tessellateFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeature.isSuppressed Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.isSuppressed

# Set the value of the property.
tessellateFeature_var.isSuppressed = propertyValue
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
boolean propertyValue = tessellateFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tessellateFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeature.isValid Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.isValid
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
boolean propertyValue = tessellateFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeature.linkedFeatures Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.linkedFeatures
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = tessellateFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2025


TessellateFeature.maximumEdgeLength Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Specify maximum length of any face edge on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.maximumEdgeLength
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = tessellateFeature_var->maximumEdgeLength();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


TessellateFeature.name Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.name

# Set the value of the property.
tessellateFeature_var.name = propertyValue
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
string propertyValue = tessellateFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = tessellateFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2025


TessellateFeature.nativeObject Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

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.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.nativeObject
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<TessellateFeature> propertyValue = tessellateFeature_var->nativeObject();

Property Value

This is a read only property whose value is a TessellateFeature.

Version

Introduced in version January 2025


TessellateFeature.normalDeviation Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Specify maximum angle between the normal vectors of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.normalDeviation
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = tessellateFeature_var->normalDeviation();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


TessellateFeature.objectType Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.objectType
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
string propertyValue = tessellateFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


TessellateFeature.parentComponent Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.parentComponent
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = tessellateFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2025


TessellateFeature.surfaceDeviation Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Specify maximum distance between the surface of the original body and the surface of the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.surfaceDeviation
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = tessellateFeature_var->surfaceDeviation();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2025


TessellateFeature.tessellateRefinementType Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Gets and sets the type of refinement.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.tessellateRefinementType

# Set the value of the property.
tessellateFeature_var.tessellateRefinementType = propertyValue
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
TessellateRefinementTypes propertyValue = tessellateFeature_var->tessellateRefinementType();

// Set the value of the property, where value_var is a TessellateRefinementTypes.
bool returnValue = tessellateFeature_var->tessellateRefinementType(value_var);

Property Value

This is a read/write property whose value is a TessellateRefinementTypes.

Version

Introduced in version January 2025


TessellateFeature.timelineObject Property

Parent Object: TessellateFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"tessellateFeature_var" is a variable referencing a TessellateFeature object.

# Get the value of the property.
propertyValue = tessellateFeature_var.timelineObject
"tessellateFeature_var" is a variable referencing a TessellateFeature object.
#include <Fusion/MeshBody/TessellateFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = tessellateFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2025


TessellateFeatureInput Object

TessellateFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

This class defines the methods and properties that pertain to the definition of a tessellate feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Specify ratio between the height and width of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
createQuads | Creates quad faces on the mesh body where possible.
inputBodies | Gets and sets the input list of BReb bodies.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumEdgeLength | Specify maximum length of any face edge on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
normalDeviation | Specify maximum angle between the normal vectors of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
surfaceDeviation | Specify maximum distance between the surface of the original body and the surface of the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.
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.
tessellateRefinementType | Gets and sets the type of refinement, default value is MediumTessellateRefinementType.

Accessed From

TessellateFeatures.createInput

Version

Introduced in version January 2025


TessellateFeatureInput.aspectRatio Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Specify ratio between the height and width of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.aspectRatio

# Set the value of the property.
tessellateFeatureInput_var.aspectRatio = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = tessellateFeatureInput_var->aspectRatio();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = tessellateFeatureInput_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


TessellateFeatureInput.classType Method

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TessellateFeatureInput.classType()
This is a static method.

#include <Fusion/MeshBody/TessellateFeatureInput.h>

returnValue = adsk::fusion::TessellateFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


TessellateFeatureInput.createQuads Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Creates quad faces on the mesh body where possible.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.createQuads

# Set the value of the property.
tessellateFeatureInput_var.createQuads = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
boolean propertyValue = tessellateFeatureInput_var->createQuads();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tessellateFeatureInput_var->createQuads(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeatureInput.inputBodies Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Gets and sets the input list of BReb bodies.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.inputBodies

# Set the value of the property.
tessellateFeatureInput_var.inputBodies = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = tessellateFeatureInput_var->inputBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = tessellateFeatureInput_var->inputBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2025


TessellateFeatureInput.isValid Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.isValid
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
boolean propertyValue = tessellateFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeatureInput.maximumEdgeLength Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Specify maximum length of any face edge on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.maximumEdgeLength

# Set the value of the property.
tessellateFeatureInput_var.maximumEdgeLength = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = tessellateFeatureInput_var->maximumEdgeLength();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = tessellateFeatureInput_var->maximumEdgeLength(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


TessellateFeatureInput.normalDeviation Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Specify maximum angle between the normal vectors of each face on the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.normalDeviation

# Set the value of the property.
tessellateFeatureInput_var.normalDeviation = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = tessellateFeatureInput_var->normalDeviation();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = tessellateFeatureInput_var->normalDeviation(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


TessellateFeatureInput.objectType Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.objectType
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
string propertyValue = tessellateFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


TessellateFeatureInput.surfaceDeviation Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Specify maximum distance between the surface of the original body and the surface of the mesh body. Only valid if tessellateRefinementType is CustomTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.surfaceDeviation

# Set the value of the property.
tessellateFeatureInput_var.surfaceDeviation = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = tessellateFeatureInput_var->surfaceDeviation();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = tessellateFeatureInput_var->surfaceDeviation(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2025


TessellateFeatureInput.targetBaseFeature Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

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.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.targetBaseFeature

# Set the value of the property.
tessellateFeatureInput_var.targetBaseFeature = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = tessellateFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = tessellateFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version January 2025


TessellateFeatureInput.tessellateRefinementType Property

Parent Object: TessellateFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatureInput.h>

Description

Gets and sets the type of refinement, default value is MediumTessellateRefinementType.

Syntax

  • Python
  • C++
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.

# Get the value of the property.
propertyValue = tessellateFeatureInput_var.tessellateRefinementType

# Set the value of the property.
tessellateFeatureInput_var.tessellateRefinementType = propertyValue
"tessellateFeatureInput_var" is a variable referencing a TessellateFeatureInput object.
#include <Fusion/MeshBody/TessellateFeatureInput.h>

// Get the value of the property.
TessellateRefinementTypes propertyValue = tessellateFeatureInput_var->tessellateRefinementType();

// Set the value of the property, where value_var is a TessellateRefinementTypes.
bool returnValue = tessellateFeatureInput_var->tessellateRefinementType(value_var);

Property Value

This is a read/write property whose value is a TessellateRefinementTypes.

Version

Introduced in version January 2025


TessellateFeatures Object

TessellateFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing tessellate features in a component and supports the ability to create new tessellate features.

Methods

Name | Description
add | Creates a tessellate 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 TessellateFeatureInput object. Use properties and methods on this object to define the tessellation you want to create and then use the add method, passing in the TessellateFeatureInput object.
item | Function that returns the specified tessellate feature using an index into the collection.
itemByName | Function that returns the specified Tessellate feature using the name of the feature.

Properties

Name | Description
count | The number of tessellate 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.tessellateFeatures

Version

Introduced in version January 2025


TessellateFeatures.add Method

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Creates a tessellate feature.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
returnValue = tessellateFeatures_var.add(input)
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

#include <Fusion/MeshBody/TessellateFeatures.h>

returnValue = tessellateFeatures_var->add(input);

Return Value

Type | Description
TessellateFeature | Returns the newly created TessellateFeatureInput object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | TessellateFeatureInput | A TessellateFeatureInput object that defines the desired tessellate feature. Use the createInput method to create a new TessellateFeatureInput object and then use methods on it (the TessellateFeatureInput object) to define the tessellate.

Version

Introduced in version January 2025


TessellateFeatures.classType Method

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TessellateFeatures.classType()
This is a static method.

#include <Fusion/MeshBody/TessellateFeatures.h>

returnValue = adsk::fusion::TessellateFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2025


TessellateFeatures.count Property

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

The number of tessellate features in the collection.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

# Get the value of the property.
propertyValue = tessellateFeatures_var.count
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
#include <Fusion/MeshBody/TessellateFeatures.h>

// Get the value of the property.
uinteger propertyValue = tessellateFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2025


TessellateFeatures.createInput Method

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Creates a TessellateFeatureInput object. Use properties and methods on this object to define the tessellation you want to create and then use the add method, passing in the TessellateFeatureInput object.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
returnValue = tessellateFeatures_var.createInput(bodies)
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

#include <Fusion/MeshBody/TessellateFeatures.h>

returnValue = tessellateFeatures_var->createInput(bodies);

Return Value

Type | Description
TessellateFeatureInput | Returns the newly created TessellateFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
bodies | BRepBody[] | A array with BReb bodies in either a parametric or direct modeling design.

Version

Introduced in version January 2025


TessellateFeatures.isValid Property

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

# Get the value of the property.
propertyValue = tessellateFeatures_var.isValid
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
#include <Fusion/MeshBody/TessellateFeatures.h>

// Get the value of the property.
boolean propertyValue = tessellateFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2025


TessellateFeatures.item Method

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Function that returns the specified tessellate feature using an index into the collection.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
returnValue = tessellateFeatures_var.item(index)
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

#include <Fusion/MeshBody/TessellateFeatures.h>

returnValue = tessellateFeatures_var->item(index);

Return Value

Type | Description
TessellateFeature | 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 2025


TessellateFeatures.itemByName Method

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

Function that returns the specified Tessellate feature using the name of the feature.

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
returnValue = tessellateFeatures_var.itemByName(name)
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

#include <Fusion/MeshBody/TessellateFeatures.h>

returnValue = tessellateFeatures_var->itemByName(name);

Return Value

Type | Description
TessellateFeature | 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 January 2025


TessellateFeatures.objectType Property

Parent Object: TessellateFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshBody/TessellateFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.

# Get the value of the property.
propertyValue = tessellateFeatures_var.objectType
"tessellateFeatures_var" is a variable referencing a TessellateFeatures object.
#include <Fusion/MeshBody/TessellateFeatures.h>

// Get the value of the property.
string propertyValue = tessellateFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2025


TextBoxCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Provides a command input to interact with a text box.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.
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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
text | Gets and sets the text in the text box. When text is set using the text property, any HTML formatting is ignored and the full string will be displayed in the text box. For example, if you specify the string "Here is a <b>Bold</b> word", and use the formattedText property, you will see "Here is a Bold word" in the text box. However, if you use the text property, you will see "Here is a <b>Bold</b> word" and when you get the text property you will get back "Here is a <b>Bold</b> word". This can be useful if you're using the text box to have the user enter HTML code so it's treated as a simple string.
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: TextBoxCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
returnValue = textBoxCommandInput_var.deleteMe()
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

#include <Core/UserInterface/TextBoxCommandInput.h>

returnValue = textBoxCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


TextBoxCommandInput.formattedText Property

Parent Object: TextBoxCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets and sets the formatted text displayed in the dialog.

Remarks

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 hyper-links, which when clicked by the user, Fusion will open the specified URL in the default browser. Hyper-links are defined using the <a> tag such as "You are using Autodesk's <a href=http://fusion.autodesk.com>Fusion</a>.". When setting the formattedText it's assumed the string has HTML formatting and it's best if the TextBoxCommandInput is set the input to be read-only. If the user edits formatted text, the result that's returned by both the formattedText and the text property may not always be as expected. If you want the user to enter or edit text in the text input, then you use the text property to define the text.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets and sets if the text box is read-only or not. If it is read-only the user cannot edit the text.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

Description

Gets and sets the text in the text box. When text is set using the text property, any HTML formatting is ignored and the full string will be displayed in the text box. For example, if you specify the string "Here is a <b>Bold</b> word", and use the formattedText property, you will see "Here is a Bold word" in the text box. However, if you use the text property, you will see "Here is a <b>Bold</b> word" and when you get the text property you will get back "Here is a <b>Bold</b> word". This can be useful if you're using the text box to have the user enter HTML code so it's treated as a simple string.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextBoxCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Represents the palette that is the Text Command window in Fusion.

Remarks

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

# Write some text.
textPalette.writeText('This is a text message.')

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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.
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.

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 currently 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 that will be displayed in the palette. This can be a local file or a URL on the web where the HTML will be read. To avoid reading a file, this can also be the full HTML definition as a string.

If you are providing the HTML content as a string, it should begin with the element. Any references made in the HTML should be to URL's and not local files since the local path is ambiguous.
id | Gets The unique, language independent, ID of this palette.
isNative | Indicates if this is one of the standard Fusion palettes or a custom palette created through the API. If true, it is a standard Fusion palette and will have some restrictions on changing its properties and cannot be deleted.
isTransparent | Returns if this palette was created as a transparent palette.
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 window, a value of zero indicates the left side of the screen and not the Fusion window.
name | Gets and set the name of the palette as seen in the user interface. The name of native palettes cannot be set.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 window, a value of zero indicates the top of the screen and not the Fusion 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.
navigatingURL | This event is fired when a navigation event occurs on the page. This allows the add-in to determine how this navigation should be handled by the browser.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2017


TextCommandPalette.classType Method

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "textCommandPalette_closed" is the event handler function.
futil.add_handler(textCommandPalette_var.closed, textCommandPalette_closed, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the closed event.
def textCommandPalette_closed(args: adsk.core.UserInterfaceGeneralEventArgs):
    # Code to react to the event.
    app.log('In textCommandPalette_closed event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "MyClosedHandler" is the name of the class that handles the event.
onClosed = MyClosedHandler()
textCommandPalette_var.closed.add(onClosed)
handlers.append(onClosed)

-------- Event handler class definition ---------
# Event handler for the closed event.
class MyClosedHandler(adsk.core.UserInterfaceGeneralEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.UserInterfaceGeneralEventArgs):
        # Code to react to the event.
        app.log('In MyClosedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Deletes this palette. Fusion native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Gets and sets how the palette is currently docked.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Gets and sets the URL to the HTML file that will be displayed in the palette. This can be a local file or a URL on the web where the HTML will be read. To avoid reading a file, this can also be the full HTML definition as a string.

If you are providing the HTML content as a string, it should begin with the element. Any references made in the HTML should be to URL's and not local files since the local path is ambiguous.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Gets The unique, language independent, ID of this palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "textCommandPalette_incomingFromHTML" is the event handler function.
futil.add_handler(textCommandPalette_var.incomingFromHTML, textCommandPalette_incomingFromHTML, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the incomingFromHTML event.
def textCommandPalette_incomingFromHTML(args: adsk.core.HTMLEventArgs):
    # Code to react to the event.
    app.log('In textCommandPalette_incomingFromHTML event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "MyIncomingFromHTMLHandler" is the name of the class that handles the event.
onIncomingFromHTML = MyIncomingFromHTMLHandler()
textCommandPalette_var.incomingFromHTML.add(onIncomingFromHTML)
handlers.append(onIncomingFromHTML)

-------- Event handler class definition ---------
# Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.HTMLEventArgs):
        # Code to react to the event.
        app.log('In MyIncomingFromHTMLHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Indicates if this is one of the standard Fusion palettes or a custom palette created through the API. If true, it is a standard Fusion palette and will have some restrictions on changing its properties and cannot be deleted.

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.isTransparent Property

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Returns if this palette was created as a transparent palette.

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.isTransparent
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
boolean propertyValue = textCommandPalette_var->isTransparent();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2024


TextCommandPalette.isValid Property

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Gets and sets whether this palette is currently being displayed in the user interface.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2017


TextCommandPalette.left Property

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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 window, a value of zero indicates the left side of the screen and not the Fusion window.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Gets and set the name of the palette as seen in the user interface. The name of native palettes cannot be set.

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.navigatingURL Event

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

This event is fired when a navigation event occurs on the page. This allows the add-in to determine how this navigation should be handled by the browser.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "textCommandPalette_navigatingURL" is the event handler function.
futil.add_handler(textCommandPalette_var.navigatingURL, textCommandPalette_navigatingURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the navigatingURL event.
def textCommandPalette_navigatingURL(args: adsk.core.NavigationEventArgs):
    # Code to react to the event.
    app.log('In textCommandPalette_navigatingURL event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
# "MyNavigatingURLHandler" is the name of the class that handles the event.
onNavigatingURL = MyNavigatingURLHandler()
textCommandPalette_var.navigatingURL.add(onNavigatingURL)
handlers.append(onNavigatingURL)

-------- Event handler class definition ---------
# Event handler for the navigatingURL event.
class MyNavigatingURLHandler(adsk.core.NavigationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.NavigationEventArgs):
        # Code to react to the event.
        app.log('In MyNavigatingURLHandler event handler.')
--------- Required include files. ---------
#include <Core/UserInterface/TextCommandPalette.h>
#include <Core/UserInterface/NavigationEvent.h>
#include <Core/UserInterface/NavigationEventHandler.h>
#include <Core/UserInterface/NavigationEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the navigatingURL event.
class MyNavigatingURLEventHandler : public adsk::core::NavigationEventHandler
{
public:
    void notify(const Ptr<NavigationEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyNavigatingURLEventHandler event handler.");
    }
} _navigatingURL;

--------- Connect the handler to the event. ---------
// "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
// Connect the handler function to the event.
Ptr<NavigationEvent> navigatingURLEvent = textCommandPalette_var->navigatingURL();
if (!navigatingURLEvent)
    return;

bool isOk = navigatingURLEvent->add(&_navigatingURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a NavigationEvent.

Version

Introduced in version March 2021


TextCommandPalette.objectType Property

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Sends the string to the JavaScript associated with the loaded HTML.

Remarks

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 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.

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. If useNewWebBrowser flag is set to true while creating the palette control this API call will be asynchronous and an empty string is returned. Response will 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.

Version

Introduced in version August 2017


TextCommandPalette.setMaximumSize Method

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.

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 window, a value of zero indicates the left side of the screen and not the Fusion 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 window, a value of zero indicates the top of the screen and not the Fusion window.

Version

Introduced in version August 2017


TextCommandPalette.setSize Method

Parent Object: TextCommandPalette
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Snaps this palette to another palette.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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 window, a value of zero indicates the top of the screen and not the Fusion window.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TextCommandPalette.h>

Description

Write the specified text to the TEXT COMMAND window.

Remarks

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

# Write some text.
textPalette.writeText('This is a text message.')

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


TextureMapControl Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl.h>

Description

Provides access to the various settings that control how a texture is applied to a body or mesh. This is the base class for the various texture mapping techniques.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
reset | Resets the texture map back to its original default settings.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

BRepBody.textureMapControl, MeshBody.textureMapControl, TSplineBody.textureMapControl

Derived Classes

ProjectedTextureMapControl, TextureMapControl3D

Version

Introduced in version March 2022


TextureMapControl.classType Method

Parent Object: TextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TextureMapControl.classType()
This is a static method.

#include <Core/Materials/TextureMapControl.h>

returnValue = adsk::core::TextureMapControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


TextureMapControl.isValid Property

Parent Object: TextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"textureMapControl_var" is a variable referencing a TextureMapControl object.

# Get the value of the property.
propertyValue = textureMapControl_var.isValid
"textureMapControl_var" is a variable referencing a TextureMapControl object.
#include <Core/Materials/TextureMapControl.h>

// Get the value of the property.
boolean propertyValue = textureMapControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


TextureMapControl.objectType Property

Parent Object: TextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"textureMapControl_var" is a variable referencing a TextureMapControl object.

# Get the value of the property.
propertyValue = textureMapControl_var.objectType
"textureMapControl_var" is a variable referencing a TextureMapControl object.
#include <Core/Materials/TextureMapControl.h>

// Get the value of the property.
string propertyValue = textureMapControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


TextureMapControl.reset Method

Parent Object: TextureMapControl
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl.h>

Description

Resets the texture map back to its original default settings.

Syntax

  • Python
  • C++
"textureMapControl_var" is a variable referencing a TextureMapControl object.
returnValue = textureMapControl_var.reset()
"textureMapControl_var" is a variable referencing a TextureMapControl object.

#include <Core/Materials/TextureMapControl.h>

returnValue = textureMapControl_var->reset();

Return Value

Type | Description
boolean | Returns true if the reset was successful.

Version

Introduced in version March 2022


TextureMapControl3D Object

Derived from: TextureMapControl Object
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Provides access to the various settings that control how a 3D texture is applied to a body.

Methods

Name | Description
bestFit | Reorients the transform to best fit the geometry of the 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().
reset | Resets the texture map back to its original default settings.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
transform | Gets and sets the transform that defines the position and orientation of how the texture is applied to the body. For wood grain, the Z direction of the defined coordinate system is the direction of the grain.

Version

Introduced in version March 2022


TextureMapControl3D.bestFit Method

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Reorients the transform to best fit the geometry of the body.

Syntax

  • Python
  • C++
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.
returnValue = textureMapControl3D_var.bestFit()
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.

#include <Core/Materials/TextureMapControl3D.h>

returnValue = textureMapControl3D_var->bestFit();

Return Value

Type | Description
boolean | Returns true if the best fit was successful.

Version

Introduced in version March 2022


TextureMapControl3D.classType Method

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TextureMapControl3D.classType()
This is a static method.

#include <Core/Materials/TextureMapControl3D.h>

returnValue = adsk::core::TextureMapControl3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


TextureMapControl3D.isValid Property

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.

# Get the value of the property.
propertyValue = textureMapControl3D_var.isValid
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.
#include <Core/Materials/TextureMapControl3D.h>

// Get the value of the property.
boolean propertyValue = textureMapControl3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


TextureMapControl3D.objectType Property

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.

# Get the value of the property.
propertyValue = textureMapControl3D_var.objectType
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.
#include <Core/Materials/TextureMapControl3D.h>

// Get the value of the property.
string propertyValue = textureMapControl3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


TextureMapControl3D.reset Method

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Resets the texture map back to its original default settings.

Syntax

  • Python
  • C++
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.
returnValue = textureMapControl3D_var.reset()
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.

#include <Core/Materials/TextureMapControl3D.h>

returnValue = textureMapControl3D_var->reset();

Return Value

Type | Description
boolean | Returns true if the reset was successful.

Version

Introduced in version March 2022


TextureMapControl3D.transform Property

Parent Object: TextureMapControl3D
Defined in namespace "adsk::core" and the header file is <Core/Materials/TextureMapControl3D.h>

Description

Gets and sets the transform that defines the position and orientation of how the texture is applied to the body. For wood grain, the Z direction of the defined coordinate system is the direction of the grain.

Syntax

  • Python
  • C++
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.

# Get the value of the property.
propertyValue = textureMapControl3D_var.transform

# Set the value of the property.
textureMapControl3D_var.transform = propertyValue
"textureMapControl3D_var" is a variable referencing a TextureMapControl3D object.
#include <Core/Materials/TextureMapControl3D.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = textureMapControl3D_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = textureMapControl3D_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version March 2022


ThickenFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Object that represents an existing Thicken feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputFaces Gets and sets the ObjectCollection containing the face and/or patch bodies to thicken.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the feature operation to perform.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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.entityToken Property

Parent Object: ThickenFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.entityToken
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
string propertyValue = thickenFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ThickenFeature.errorOrWarningMessage Property

Parent Object: ThickenFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Gets and sets the ObjectCollection containing the face and/or patch bodies to thicken.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Gets and sets whether to add thickness symmetrically or only on one side of the face/s to thicken.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Gets and sets the feature operation to perform.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Sets the faces and patch bodies to thicken.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the parameter controlling the thickness. You can edit the thickness value by editing the value of the parameter object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a Thicken feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 Thicken feature is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Thicken feature) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
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 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.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
thickenFeatures.add | Demonstrates the thickenFeatures.add method.
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatureInput.classType Method

Parent Object: ThickenFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.creationOccurrence Property

Parent Object: ThickenFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Thicken feature is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Thicken feature) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.creationOccurrence

# Set the value of the property.
thickenFeatureInput_var.creationOccurrence = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = thickenFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = thickenFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version October 2022


ThickenFeatureInput.inputFaces Property

Parent Object: ThickenFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

An ObjectCollection containing the face and/or patch bodies to thicken.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.

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.

Samples

Name | Description
thickenFeatures.add | Demonstrates the thickenFeatures.add method.

Version

Introduced in version June 2015


ThickenFeatureInput.isSymmetric Property

Parent Object: ThickenFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Gets and sets whether to add thickness symmetrically or only on one side of the face/s to thicken

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Gets and sets the feature operation to perform.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the thickness distance.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Collection that provides access to all of the existing Thicken features in a component and supports the ability to create new Thicken features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Creates a new Thicken feature.

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
thickenFeatures.add | Demonstrates the thickenFeatures.add method.
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


thickenFeatures.add

Description

Demonstrates the thickenFeatures.add method.

Code Samples

  • Python
def demo_thickenFeatures_add(rootComp: adsk.fusion.Component):
    face = _ui.selectEntity('Select a face to thicken.', 'Faces').entity
    faces = adsk.core.ObjectCollection.create()
    faces.add(face)
    thickness = adsk.core.ValueInput.createByReal(1)
    isSymmetric = False
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation

    thickFeatures = rootComp.features.thickenFeatures
    input: adsk.fusion.ThickenFeatureInput = thickFeatures.createInput(faces, thickness, isSymmetric, operation)
    input.isChainSelection = True
    thickFeature = thickFeatures.add(input)


ThickenFeatures.classType Method

Parent Object: ThickenFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

The number of Thicken features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

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.

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 symmetrically 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
thickenFeatures.add | Demonstrates the thickenFeatures.add method.
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatures.isValid Property

Parent Object: ThickenFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Function that returns the specified Thicken feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

Function that returns the specified thicken feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThickenFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

This object provides methods to query the thread data contained in the XML files in ThreadData folder within the Fusion install folder. You can use the queried values to create a ThreadInfo object that is then used to create a thread feature.

Methods

Name | Description
allClasses | Returns and array/list of all the available classes for a thread type of a given thread designation.
allDesignations | returns an array/list of all the available thread designations for a thread type of a given size. Valid thread types and sizes and be obtained by using the allThreadTypes and allSizes functions.
allSizes | Returns an array/list of all the available thread sizes for a given thread type. You can use the allThreadTypes property to get the available thread types.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. The custom name is the localized name of the thread type using the current language specified for Fusion.
threadTypeUnit | Method that returns the unit for a given thread type.

Properties

Name | Description
allThreadTypes | This method returns an array of all the available thread types (families). The type names are always English. This English name should be used in the other methods that take the type as an input argument. If you need to display the type name to the user, you can use the threadTypeCustomName method To get the localized name.
defaultInchThreadType | Gets the default thread type for inch threads.
defaultMetricThreadType | Gets the default thread type for metric threads.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Returns and array/list of all the available classes for a thread type of a given thread designation.

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/list 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 | The thread type of the thread class you want.
designation | string | The thread designation of the thread class you want.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

returns an array/list of all the available thread designations for a thread type of a given size. Valid thread types and sizes and be obtained by using the allThreadTypes and allSizes functions.

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/list if an invalid thread type or size was specified.

Parameters

Name | Type | Description
threadType | string | The thread type of the designation you want.
size | string | The thread size of the designation you want.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Returns an array/list of all the available thread sizes for a given thread type. You can use the allThreadTypes property to get the available thread types.

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 an empty array/list 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

This method returns an array of all the available thread types (families). The type names are always English. This English name should be used in the other methods that take the type as an input argument. If you need to display the type name to the user, you can use the threadTypeCustomName method To get the localized name.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Gets the default thread type for inch threads.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Gets the default thread type for metric threads.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Method that gets the recommended thread data for a given model diameter.

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 diameter of the cylinder the thread will be placed on. The units are centimeters.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Method that returns the custom name for a given thread type. The custom name is the localized name of the thread type using the current language specified for Fusion.

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 an empty string if an invalid thread type was specified.

Parameters

Name | Type | Description
threadType | string | The thread type you want to get the custom name for.

Version

Introduced in version January 2015


ThreadDataQuery.threadTypeUnit Method

Parent Object: ThreadDataQuery
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadDataQuery.h>

Description

Method that returns the unit for a given thread type.

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 | The thread type you want to get the thread unit type for.

Version

Introduced in version January 2015


ThreadFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Object that represents an existing thread feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
inputCylindricalFaces Gets and sets the cylindrical input faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isFullLength Gets and sets if this thread is the full length of the cylinder. It only can be set to true.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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

RecognizedHoleSegment.threadFeatures, 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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.entityToken Property

Parent Object: ThreadFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.entityToken
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
string propertyValue = threadFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


ThreadFeature.errorOrWarningMessage Property

Parent Object: ThreadFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Gets and sets the cylindrical input faces.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Gets and sets if this thread is the full length of the cylinder. It only can be set to true.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Sets the thread offset, length and location. Calling this method will cause the isFullLength property to be set to false.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Gets and sets the thread data. Also can edit the thread through the properties and methods on the ThreadInfo object.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a thread feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 information that defines the thread.
threadLength | Gets and sets the thread length. It is only used in the case where the isFullLength property is false.
threadLocation Gets and sets which end of the cylinder the thread is measured from when it's not full length. The thread position and length can be measured from either the "low" or "high" end. You can determine the low and high end by using the Cylinder associated with the cylindrical BRepFace the thread is being added to. The BRepFace.geometry which will return a Cylinder object. The axis property of the Cylinder is a vector and the high end of the cylinder is at the far end of the cylinder with respect to the axis vector.

This property is only used in the case where the isFullLength property is false and is otherwise ignored. It defaults to creating a thread at the high end.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets the cylindrical input faces.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets if this thread is the full length of the cylinder. It defaults to true.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets the information that defines the thread.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets the thread length. It is only used in the case where the isFullLength property is false.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

Description

Gets and sets which end of the cylinder the thread is measured from when it's not full length. The thread position and length can be measured from either the "low" or "high" end. You can determine the low and high end by using the Cylinder associated with the cylindrical BRepFace the thread is being added to. The BRepFace.geometry which will return a Cylinder object. The axis property of the Cylinder is a vector and the high end of the cylinder is at the far end of the cylinder with respect to the axis vector.

This property is only used in the case where the isFullLength property is false and is otherwise ignored. It defaults to creating a thread at the high end.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Collection that provides access to all of the existing thread features in a component and supports the ability to create new thread features.

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. This object is the API equivalent of the Thread feature dialog. It collects the required input and once fully defined you can pass this object to the ThreadFeatures.add method to create the thread feature.
createThreadInfo | Method that creates a new ThreadInfo object that can be used in creating thread features. The ThreadInfo object that defines the type and size of the thread to create. When creating a thread, the type and size of the thread is specified by referencing thread information defined in one of the XML files in the ThreadData folder within the Fusion install folder. You can use the ThreadDataQuery object to query these XML files to find the specific thread you want to create. The ThreadDataQuery object can be obtained by using the ThreadFeatures.threadDataQuery property.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
threadDataQuery | Property that returns the ThreadDataQuery object. When creating a thread, the type and size of the thread is specified by referencing thread information defined in one of the XML files in the ThreadData folder. The ThreadDataQuery is an object that supports methods to query the existing threads defined in these files.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Creates a new thread feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

The number of thread features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Creates a ThreadFeatureInput object. This object is the API equivalent of the Thread feature dialog. It collects the required input and once fully defined you can pass this object to the ThreadFeatures.add method to create the thread feature.

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/None 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 ThreadInfo object that defines the type and size of the thread to create. When creating a thread, the type and size of the thread is specified by referencing thread information defined in one of the XML files in the ThreadData folder within the Fusion install folder. You can use the ThreadDataQuery object to query these XML files to find the specific thread you want to create. The ThreadDataQuery object can be obtained by using the ThreadFeatures.threadDataQuery property. You then use this information to create a ThreadInfo object using the ThreadFeatures.createThreadInfo method.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Method that creates a new ThreadInfo object that can be used in creating thread features. The ThreadInfo object that defines the type and size of the thread to create. When creating a thread, the type and size of the thread is specified by referencing thread information defined in one of the XML files in the ThreadData folder within the Fusion install folder. You can use the ThreadDataQuery object to query these XML files to find the specific thread you want to create. The ThreadDataQuery object can be obtained by using the ThreadFeatures.threadDataQuery property.

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 call-out. 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Function that returns the specified thread feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Function that returns the specified thread feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadFeatures.h>

Description

Property that returns the ThreadDataQuery object. When creating a thread, the type and size of the thread is specified by referencing thread information defined in one of the XML files in the ThreadData folder. The ThreadDataQuery is an object that supports methods to query the existing threads defined in these files.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

This class defines the methods and properties that define the type and size of a thread. This object is used to create and query thread and tapped (straight and tapered) hole features. A new ThreadInfo object is created by using the ThreadInfo.create method. If the ThreadInfo object is obtained from an existing thread or hole feature, modifying the ThreadInfo object will modify the feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Returns 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 | Returns the value that defines the major diameter. The units are centimeters.
minorDiameter | Returns the value that defines the minor diameter. The units are centimeters.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
pitchDiameter | Returns the value that defines the pitch diameter. The units are centimeters.
threadAngle | Returns the value that defines the thread angle. The units are degrees.
threadClass | Returns and sets the string that defines the thread class.
threadDesignation | Returns and sets the string that defines the thread designation.
threadPitch | Returns the value that defines the thread pitch. The units are centimeters.
threadSize | Returns the string that defines the thread size. This is
threadType | Returns 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns and sets if the thread is an internal or external thread. A value of true indicates an internal thread. It defaults to true.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the value that defines the major diameter. The units are centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the value that defines the minor diameter. The units are centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the value that defines the pitch diameter. The units are centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the value that defines the thread angle. The units are degrees.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns and sets the string that defines the thread class.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns and sets the string that defines the thread designation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the value that defines the thread pitch. The units are centimeters.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns the string that defines the thread size. This is

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThreadInfo.h>

Description

Returns and sets the string that defines the thread type.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

Description

A definition object that is used to define the extents of a feature to be through all.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

Description

Statically creates a new ThroughAllExtentDefinition object. This is used as input when defining the extents of a feature to be through all.

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.

Samples

Name | Description
extrudeFeatures.add using ThroughAllExtent | Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.isPositiveDirection Property

Parent Object: ThroughAllExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ThroughAllExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

A collection of TimelineObjects in a parametric design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
timelineGroups | Returns the collection of groups within the timeline.

Accessed From

Design.timeline, FlatPatternProduct.timeline, WorkingModel.timeline

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Fillet Feature Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


Timeline.classType Method

Parent Object: Timeline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Returns the number of items in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Deletes all objects in the timeline that are after the current position of the marker.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

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.

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.
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


Timeline.markerPosition Property

Parent Object: Timeline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Moves the marker to the beginning of the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Moves the marker to the end of the timeline.

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.
Fillet Feature Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


Timeline.movetoNextStep Method

Parent Object: Timeline
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Moves the marker to the next step in the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Moves the marker to the previous step in the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Plays the timeline beginning at the current position of the marker.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/Timeline.h>

Description

Returns the collection of groups within the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Represents a group in the timeline.

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 TimelineObject represents a TimelineGroup object, since it does not have an associated entity.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

The number of items in the group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Deletes the group with the option of deleting or keeping the contents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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 TimelineObject represents a TimelineGroup object, since it does not have an associated entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Returns the current health state of the object associated with this TimelineObject.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Indicates if the group is collapsed or expanded.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Gets and sets if this object is suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Function that returns the specified timeline object within the group using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

Description

Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroup.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

Provides access to the time line groups within a design and provides methods to create new groups.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Timeline.timelineGroups

Version

Introduced in version August 2014


TimelineGroups.add Method

Parent Object: TimelineGroups
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

Returns the number of items in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

Function that returns the specified timeline group using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineGroups.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Represents an object in the timeline.

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 TimelineObject represents a TimelineGroup object, since it does not have an associated entity.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

ArrangeFeature.timelineObject, AsBuiltJoint.timelineObject, AssemblyConstraint.timelineObject, BaseFeature.timelineObject, BossFeature.timelineObject, BoundaryFillFeature.timelineObject, BoxFeature.timelineObject, Canvas.timelineObject, ChamferFeature.timelineObject, CircularPatternFeature.timelineObject, CoilFeature.timelineObject, CombineFeature.timelineObject, ConstructionAxis.timelineObject, ConstructionPlane.timelineObject, ConstructionPoint.timelineObject, CopyPasteBody.timelineObject, CustomFeature.timelineObject, CutPasteBody.timelineObject, CylinderFeature.timelineObject, Decal.timelineObject, DeleteFaceFeature.timelineObject, DraftFeature.timelineObject, ExtendFeature.timelineObject, ExtrudeFeature.timelineObject, Feature.timelineObject, FilletFeature.timelineObject, FlangeFeature.timelineObject, FlatPattern.timelineObject, FormFeature.timelineObject, HoleFeature.timelineObject, Joint.timelineObject, JointOrigin.timelineObject, LoftFeature.timelineObject, MeshCombineFaceGroupsFeature.timelineObject, MeshCombineFeature.timelineObject, MeshConvertFeature.timelineObject, MeshFeature.timelineObject, MeshGenerateFaceGroupsFeature.timelineObject, MeshReduceFeature.timelineObject, MeshRemeshFeature.timelineObject, MeshRepairFeature.timelineObject, MeshReverseNormalFeature.timelineObject, MeshSeparateFeature.timelineObject, MeshShellFeature.timelineObject, MeshSmoothFeature.timelineObject, MirrorFeature.timelineObject, MoveFeature.timelineObject, Occurrence.timelineObject, OffsetFacesFeature.timelineObject, OffsetFeature.timelineObject, PatchFeature.timelineObject, PathPatternFeature.timelineObject, PipeFeature.timelineObject, RectangularPatternFeature.timelineObject, RefoldFeature.timelineObject, RemoveFeature.timelineObject, ReplaceFaceFeature.timelineObject, ReverseNormalFeature.timelineObject, RevolveFeature.timelineObject, RibFeature.timelineObject, RigidGroup.timelineObject, RipFeature.timelineObject, RuledSurfaceFeature.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, TangentRelationship.timelineObject, TessellateFeature.timelineObject, ThickenFeature.timelineObject, ThreadFeature.timelineObject, Timeline.item, TimelineGroup.item, TorusFeature.timelineObject, TrimFeature.timelineObject, UnfoldFeature.timelineObject, UnstitchFeature.timelineObject, UntrimFeature.timelineObject, VolumetricCustomFeature.timelineObject, VolumetricModelToMeshFeature.timelineObject, WebFeature.timelineObject

Derived Classes

TimelineGroup

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Fillet Feature Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


TimelineObject.canReorder Method

Parent Object: TimelineObject
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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 TimelineObject represents a TimelineGroup object, since it does not have an associated entity.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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.
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version July 2016


TimelineObject.healthState Property

Parent Object: TimelineObject
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Returns the current health state of the object associated with this TimelineObject.

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.
Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version July 2016


TimelineObject.index Property

Parent Object: TimelineObject
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Gets and sets if this object is suppressed.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

Description

Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/TimelineObject.h>

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.

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.
Fillet Feature Edit API Sample | Demonstrates editing a fillet feature. To successfully run this sample you can use this Ruled Surface Feature API Sample | Demonstrates creating a new ruled surface feature.

Version

Introduced in version August 2014


ToEntityExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

Description

A definition object that is used to define the extents of a feature to be up to a specified construction plane or face.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Samples

Name | Description
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.

Version

Introduced in version November 2016


ToEntityExtentDefinition.classType Method

Parent Object: ToEntityExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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.

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.

Samples

Name | Description
extrudeFeatures.add using setTwoSidesExtent | Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.

Version

Introduced in version November 2016


ToEntityExtentDefinition.directionHint Property

Parent Object: ToEntityExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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 which direction to go. In most cases this is not needed and the property will be null.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

Description

Gets and sets the entity that the feature extent is defined up to. This can be a ConstructionPlane, Profile, BrepFace, BrepBody, or BRepVertex.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/ToEntityExtentDefinition.h>

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.

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


Tool Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Represents a Tool.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromJson | Creates a Tool object from given JSON string.
createFromP21 | Preview Creates a Tool object given a string containing a tool defined using the P21 format. Throws an error if the given string does not conform to the P21 format.
toJson | Generates and returns a JSON string that contains a description of this tool.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameters | Gets the CAMParameters collection associated with this tool. This defines all of the settings that describe the details of the tool.
presets | Gets the ToolPresets collection associated with this tool.

Accessed From

CAMTemplateOperationInput.tool, DocumentToolLibrary.item, DocumentToolLibrary.toolsBySetupOrFolder, Operation.tool, OperationInput.tool, Tool.createFromJson, Tool.createFromP21, ToolLibrary.item, ToolQueryResult.tool

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


Tool.classType Method

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Tool.classType()
This is a static method.

#include <Cam/Tools/Tool.h>

returnValue = adsk::cam::Tool::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


Tool.createFromJson Method

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Creates a Tool object from given JSON string.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Tool.createFromJson(json)
This is a static method.

#include <Cam/Tools/Tool.h>

returnValue = adsk::cam::Tool::createFromJson(json);

Return Value

Type | Description
Tool | Returns the newly created Tool.

Parameters

Name | Type | Description
json | string | The JSON should fully define the tool and contain all tool parameters. If the JSON contains more than one tool, only the first Tool is loaded.

Version

Introduced in version April 2023


Tool.createFromP21 Method

Parent Object: Tool

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Creates a Tool object given a string containing a tool defined using the P21 format. Throws an error if the given string does not conform to the P21 format.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Tool.createFromP21(p21)
This is a static method.

#include <Cam/Tools/Tool.h>

returnValue = adsk::cam::Tool::createFromP21(p21);

Return Value

Type | Description
Tool | Returns the newly created Tool.

Parameters

Name | Type | Description
p21 | string | Creates a Tool object from the given P21 string.

Version

Introduced in version September 2024


Tool.isValid Property

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"tool_var" is a variable referencing a Tool object.

# Get the value of the property.
propertyValue = tool_var.isValid
"tool_var" is a variable referencing a Tool object.
#include <Cam/Tools/Tool.h>

// Get the value of the property.
boolean propertyValue = tool_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


Tool.objectType Property

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"tool_var" is a variable referencing a Tool object.

# Get the value of the property.
propertyValue = tool_var.objectType
"tool_var" is a variable referencing a Tool object.
#include <Cam/Tools/Tool.h>

// Get the value of the property.
string propertyValue = tool_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


Tool.parameters Property

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Gets the CAMParameters collection associated with this tool. This defines all of the settings that describe the details of the tool.

Syntax

  • Python
  • C++
"tool_var" is a variable referencing a Tool object.

# Get the value of the property.
propertyValue = tool_var.parameters
"tool_var" is a variable referencing a Tool object.
#include <Cam/Tools/Tool.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = tool_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


Tool.presets Property

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Gets the ToolPresets collection associated with this tool.

Syntax

  • Python
  • C++
"tool_var" is a variable referencing a Tool object.

# Get the value of the property.
propertyValue = tool_var.presets
"tool_var" is a variable referencing a Tool object.
#include <Cam/Tools/Tool.h>

// Get the value of the property.
Ptr<ToolPresets> propertyValue = tool_var->presets();

Property Value

This is a read only property whose value is a ToolPresets.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


Tool.toJson Method

Parent Object: Tool
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/Tool.h>

Description

Generates and returns a JSON string that contains a description of this tool.

Syntax

  • Python
  • C++
"tool_var" is a variable referencing a Tool object.
returnValue = tool_var.toJson()
"tool_var" is a variable referencing a Tool object.

#include <Cam/Tools/Tool.h>

returnValue = tool_var->toJson();

Return Value

Type | Description
string | Returns a JSON string that contains a description of this tool.

Version

Introduced in version April 2023


Toolbar Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Provides access to a toolbar in the user interface. A toolbar is a collection of toolbar controls.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentUserInterface | Gets the owning UserInterface object.

Accessed From

Toolbars.item, Toolbars.itemById, UserInterface.activeToolbar

Version

Introduced in version August 2014


Toolbar.classType Method

Parent Object: Toolbar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Gets the controls in this toolbar.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Toolbar.id Property

Parent Object: Toolbar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Gets the unique ID of the toolbar that can be used programmatically to find a specific toolbar.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Toolbar.isValid Property

Parent Object: Toolbar
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbar.h>

Description

Gets the owning UserInterface object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

The base class for all toolbar controls.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControl.classType Method

Parent Object: ToolbarControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Deletes the ToolbarControl

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControl.id Property

Parent Object: ToolbarControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Gets or sets if this control is currently visible.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarControl.parent Property

Parent Object: ToolbarControl
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControl.h>

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the NavBar) 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

Provides access to a list of toolbar controls.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ToolbarPanel.promotedControls

Version

Introduced in version August 2014


ToolbarControlList.classType Method

Parent Object: ToolbarControlList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

Gets the number of toolbar controls.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

Returns the ToolbarControl at the specified ID.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControlList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

ToolbarControls is a collection of ToolbarControl objects displayed in a toolbar or menu.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarControls.addCommand Method

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

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.

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
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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControls.addDropDown Method

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

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.

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 | This argument defines the resource folder that contains the images used for the icon when the drop-down is in a toolbar. Icons can be defined using either PNG or SVG files. More information about icons can be found in the user manual topic User Interface Customization.
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 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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControls.addSeparator Method

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

Adds a separator to the controls in the toolbar, panel, or drop-down.

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 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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControls.addSplitButton Method

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

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.

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[] | An array 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 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

Gets the number of controls in the collection.

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
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarControls.isValid Property

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

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.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarControls.itemById Method

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

Returns the ToolbarControl at the specified ID.

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
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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarControls.objectType Property

Parent Object: ToolbarControls
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarControls.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Toolbar panels are the panels shown in the command toolbar.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 or sets 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. Setting it here will override that default behavior.
name | Gets or sets the name of the panel as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanel.classType Method

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

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.

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
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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanel.deleteMe Method

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Deletes this toolbar panel.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarPanel.id Property

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets The unique, language independent, ID of this panel.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanel.index Property

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

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.

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.

Version

Introduced in version August 2014


ToolbarPanel.indexWithinTab Method

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets the position this panel is in within the toolbar tab. The first panel in the tab is at position 0.

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);

Return Value

Type | Description
uinteger | Returns the index value of the panel within the tab.

Parameters

Name | Type | Description
tabId | string |

Version

Introduced in version August 2019


ToolbarPanel.isValid Property

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets or sets 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. Setting it here will override that default behavior.

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.isVisible

# Set the value of the property.
toolbarPanel_var.isVisible = propertyValue
"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();

// Set the value of the property, where value_var is a boolean.
bool returnValue = toolbarPanel_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarPanel.name Property

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets or sets the name of the panel as seen in the user interface.

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.name

# Set the value of the property.
toolbarPanel_var.name = propertyValue
"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();

// Set the value of the property, where value_var is a string.
bool returnValue = toolbarPanel_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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanel.objectType Property

Parent Object: ToolbarPanel
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets the parent UserInterface object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Returns the name of the product this toolbar panel is associated with.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets the controls in the panel that have been promoted. Promoted controls are the controls that are displayed within the panel.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanel.h>

Description

Gets or sets the set of workspaces that this panel is displayed for.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

A ToolbarPanelList is a list of ToolbarPanel objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

UserInterface.allToolbarPanels, UserInterface.toolbarPanelsByProductType

Version

Introduced in version June 2015


ToolbarPanelList.classType Method

Parent Object: ToolbarPanelList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

Gets the number of toolbar panels in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

Returns the specified work space using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

Returns the ToolbarPanel of the specified ID.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanelList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

Provides access to a set of toolbar panels. Many toolbar panels exist 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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ToolbarTab.toolbarPanels, Workspace.toolbarPanels

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanels.add Method

Parent Object: ToolbarPanels
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

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.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarPanels.classType Method

Parent Object: ToolbarPanels
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

Gets the number of ToolbarPanels.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanels.isValid Property

Parent Object: ToolbarPanels
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

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.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


ToolbarPanels.itemById Method

Parent Object: ToolbarPanels
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

Returns the ToolbarPanel at the specified ID.

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
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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


ToolbarPanels.objectType Property

Parent Object: ToolbarPanels
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarPanels.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Provides access to the toolbars. These are currently the right and left QAT's and the NavBar.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

UserInterface.toolbars

Version

Introduced in version August 2014


Toolbars.classType Method

Parent Object: Toolbars
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Gets the number of Toolbar objects in the collection.

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.

Version

Introduced in version August 2014


Toolbars.isValid Property

Parent Object: Toolbars
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Returns the specified toolbar using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

Returns the Toolbar of the specified ID.

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.

Version

Introduced in version August 2014


Toolbars.objectType Property

Parent Object: Toolbars
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Toolbars.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Toolbar tabs are the tabs shown in the command toolbar.

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 native tabs cannot be deleted. Use the isNative property to determine if this is a native or API created tab.
move | Move this tab to a different position in the Toolbar in the user interface.

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 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 or sets whether this tab is currently being displayed in the user interface. By default, a tab is made visible if it is associated with the active workspace and hidden otherwise. Setting it here will override that default behavior.
name | Gets or sets the name of the tab as seen in the user interface.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, UserInterface.activeToolbarTab

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTab.activate Method

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Activate this toolbar tab.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Deletes this tab. Fusion native tabs cannot be deleted. Use the isNative property to determine if this is a native or API created tab.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version October 2019


ToolbarTab.id Property

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets The unique, language independent, ID of this tab.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTab.index Property

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets if this toolbar tab is currently active - i.e. displayed.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets if this tab is native to Fusion or was created via the API.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets or sets whether this tab is currently being displayed in the user interface. By default, a tab is made visible if it is associated with the active workspace and hidden otherwise. Setting it here will override that default behavior.

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.isVisible

# Set the value of the property.
toolbarTab_var.isVisible = propertyValue
"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();

// Set the value of the property, where value_var is a boolean.
bool returnValue = toolbarTab_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTab.move Method

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Move this tab to a different position in the Toolbar in the user interface.

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.
returnValue = toolbarTab_var.move(positionId, isBefore)
"toolbarTab_var" is a variable referencing a ToolbarTab object.

#include <Core/UserInterface/ToolbarTab.h>

returnValue = toolbarTab_var->move(positionId, isBefore);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
positionId | string | The ID of another ToolbarTab in the same Toolbar that is used to position this tab. This tab will be positioned either directly before or after it.
isBefore | boolean | If true, then this tab will be positioned directly before the tab indicated by positionID. If false, then this tab will be positioned after it.

Version

Introduced in version May 2024


ToolbarTab.name Property

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets or sets the name of the tab as seen in the user interface.

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.name

# Set the value of the property.
toolbarTab_var.name = propertyValue
"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();

// Set the value of the property, where value_var is a string.
bool returnValue = toolbarTab_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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTab.objectType Property

Parent Object: ToolbarTab
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets the parent UserInterface object.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Returns the name of the product this toolbar tab is associated with.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTab.h>

Description

Gets the collection containing the panels associated with this tab. It's through this collection that you can add new toolbar panels.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTabList Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

A ToolbarTabList is a list of ToolbarTab objects.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

UserInterface.allToolbarTabs, UserInterface.toolbarTabsByProductType

Version

Introduced in version August 2019


ToolbarTabList.classType Method

Parent Object: ToolbarTabList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

Gets the number of toolbar tabs in the collection.

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.

Version

Introduced in version August 2019


ToolbarTabList.isValid Property

Parent Object: ToolbarTabList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

Returns the specified tab using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

Returns the ToolbarTab of the specified ID.

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.

Version

Introduced in version August 2019


ToolbarTabList.objectType Property

Parent Object: ToolbarTabList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ToolbarTabs Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Provides access to a set of toolbar tabs.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Workspace.toolbarTabs

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTabs.add Method

Parent Object: ToolbarTabs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Creates a new ToolbarTab. The tab is initially empty. This method appends the tab to the end of the collection.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version October 2019


ToolbarTabs.classType Method

Parent Object: ToolbarTabs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Gets the number of ToolbarTabs.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTabs.isValid Property

Parent Object: ToolbarTabs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

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.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


ToolbarTabs.itemById Method

Parent Object: ToolbarTabs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

Returns the ToolbarTab at the specified ID.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2019


ToolbarTabs.objectType Property

Parent Object: ToolbarTabs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ToolbarTabs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ToolLibraries Object

Derived from: CAMLibrary Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

The ToolLibraries object provides utilities to access, import and update tool libraries.

Methods

Name | Description
childAssetURLs | Get all assets under given URL.
childFolderURLs | Get all library folders under given URL.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFolder | Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.
createQuery | Creates a new ToolQuery that is used to query the library for tools matching the query.
deleteAsset | Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.
deleteFolder | Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.
displayName | Get the localized display name for a given URL. The URL must point to a folder.
importToolLibrary | Import a given ToolLibrary from a specific location. The imported ToolLibrary can be accessed through this ToolLibraries object. Throws an error, if the given URL is read-only.
toolLibraryAtURL | Get a specific ToolLibrary by given URL. Returns null, if the URL does not exist.
updateToolLibrary | Update ToolLibrary in ToolLibraries. Overrides the URL by given ToolLibrary. Throws an error if the URL does not already point to an existing ToolLibrary.
urlByLocation | Get the URL for a given LibraryLocations.

Properties

Name | Description
assetTypeName | Get the name of the asset type which can be accessed by the library.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAMLibraryManager.toolLibraries

Samples

Name Description
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


ToolLibraries.assetTypeName Property

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get the name of the asset type which can be accessed by the library.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.

# Get the value of the property.
propertyValue = toolLibraries_var.assetTypeName
"toolLibraries_var" is a variable referencing a ToolLibraries object.
#include <Cam/Tools/ToolLibraries.h>

// Get the value of the property.
string propertyValue = toolLibraries_var->assetTypeName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolLibraries.childAssetURLs Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get all assets under given URL.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.childAssetURLs(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->childAssetURLs(url);

Return Value

Type | Description
URL[] | Returns list of asset URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolLibraries.childFolderURLs Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get all library folders under given URL.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.childFolderURLs(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->childFolderURLs(url);

Return Value

Type | Description
URL[] | Returns list of folder URLs at given location.

Parameters

Name | Type | Description
url | URL | The URL to the parent folder.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolLibraries.classType Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolLibraries.classType()
This is a static method.

#include <Cam/Tools/ToolLibraries.h>

returnValue = adsk::cam::ToolLibraries::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolLibraries.createFolder Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Create a new folder in the library. Create the folder under given parent URL with given folder name. Add counting suffix, in case a folder with given name already exists. Throw an error if given URL does not point to a valid folder or the URL is read-only. Also throws an error if given folder name is empty.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.createFolder(parentUrl, folderName)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->createFolder(parentUrl, folderName);

Return Value

Type | Description
URL | Returns the URL to the newly created folder

Parameters

Name | Type | Description
parentUrl | URL | The parent URL for the folder to be created.
folderName | string | Name of the new folder to be created. Must not be empty.

Version

Introduced in version May 2023


ToolLibraries.createQuery Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Creates a new ToolQuery that is used to query the library for tools matching the query.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.createQuery(location)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->createQuery(location);

Return Value

Type | Description
ToolQuery | Returns a new ToolQuery. The query is predefined by given parameter.

Parameters

Name | Type | Description
location | LibraryLocations | The location specifies the LibraryLocations where to search.

Version

Introduced in version April 2023


ToolLibraries.deleteAsset Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Delete asset by URL from the library. Throw an error if given URL does not point to a valid asset or the URL is read-only.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.deleteAsset(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->deleteAsset(url);

Return Value

Type | Description
boolean | Returns true if asset was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the asset that should be removed.

Version

Introduced in version April 2023


ToolLibraries.deleteFolder Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Delete folder by URL from the library. Any content of the folder will also be deleted. Throw an error if given URL does not point to a valid folder or the URL is read-only.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.deleteFolder(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->deleteFolder(url);

Return Value

Type | Description
boolean | Returns true if folder was deleted successfully, false otherwise

Parameters

Name | Type | Description
url | URL | The URL to the folder that should be removed.

Version

Introduced in version April 2023


ToolLibraries.displayName Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get the localized display name for a given URL. The URL must point to a folder.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.displayName(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->displayName(url);

Return Value

Type | Description
string | Returns localized display name for the folder. Returns empty string for invalid URL.

Parameters

Name | Type | Description
url | URL | The URL that defines the path to a folder.

Version

Introduced in version April 2023


ToolLibraries.importToolLibrary Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Import a given ToolLibrary from a specific location. The imported ToolLibrary can be accessed through this ToolLibraries object. Throws an error, if the given URL is read-only.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.importToolLibrary(toolLibrary, destinationUrl, libraryName)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->importToolLibrary(toolLibrary, destinationUrl, libraryName);

Return Value

Type | Description
URL | Returns the URL of the newly imported tool library, or null if the import failed.

Parameters

Name | Type | Description
toolLibrary | ToolLibrary | The ToolLibrary that should be imported.
destinationUrl | URL | The URL to the parent folder where the imported tool library will be saved.
libraryName | string | The name of the library that should be created due to the import. If the specified name already exists, a number will be added to the name to ensure it is unique.

Version

Introduced in version April 2023


ToolLibraries.isValid Property

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.

# Get the value of the property.
propertyValue = toolLibraries_var.isValid
"toolLibraries_var" is a variable referencing a ToolLibraries object.
#include <Cam/Tools/ToolLibraries.h>

// Get the value of the property.
boolean propertyValue = toolLibraries_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolLibraries.objectType Property

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.

# Get the value of the property.
propertyValue = toolLibraries_var.objectType
"toolLibraries_var" is a variable referencing a ToolLibraries object.
#include <Cam/Tools/ToolLibraries.h>

// Get the value of the property.
string propertyValue = toolLibraries_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolLibraries.toolLibraryAtURL Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get a specific ToolLibrary by given URL. Returns null, if the URL does not exist.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.toolLibraryAtURL(url)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->toolLibraryAtURL(url);

Return Value

Type | Description
ToolLibrary | Returns the ToolLibrary for a valid URL, returns null otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the ToolLibrary to be loaded.

Samples

Name Description
Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.
Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023


ToolLibraries.updateToolLibrary Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Update ToolLibrary in ToolLibraries. Overrides the URL by given ToolLibrary. Throws an error if the URL does not already point to an existing ToolLibrary.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.updateToolLibrary(url, toolLibrary)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->updateToolLibrary(url, toolLibrary);

Return Value

Type | Description
boolean | Returns true if asset was updated successfully, false otherwise.

Parameters

Name | Type | Description
url | URL | The URL to the existing asset in the ToolLibraries that should be updated.
toolLibrary | ToolLibrary | The ToolLibrary that should be persisted.

Version

Introduced in version April 2023


ToolLibraries.urlByLocation Method

Parent Object: ToolLibraries
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibraries.h>

Description

Get the URL for a given LibraryLocations.

Syntax

  • Python
  • C++
"toolLibraries_var" is a variable referencing a ToolLibraries object.
returnValue = toolLibraries_var.urlByLocation(location)
"toolLibraries_var" is a variable referencing a ToolLibraries object.

#include <Cam/Tools/ToolLibraries.h>

returnValue = toolLibraries_var->urlByLocation(location);

Return Value

Type | Description
URL | Returns the URL for given location.

Parameters

Name | Type | Description
location | LibraryLocations | The LibraryLocations to be converted into an URL.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolLibrary Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

ToolLibrary represents a collection of Tool objects.

Methods

Name | Description
add | Inserts a Tool at the end of the ToolLibrary.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createEmpty | Creates an empty ToolLibrary.
createFromJson | Creates a ToolLibrary by given JSON-string. Raises an error if the given JSON is invalid.
createQuery | Creates a new ToolQuery that is used to query the library for tools matching the query.
item | Get Tool by index in ToolLibrary.
remove | Remove Tool by index from ToolLibrary.
toJson | Generate and return JSON string that contains all tools of that list.

Properties

Name | Description
count | The number of tools in the ToolLibrary.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

DocumentToolLibrary.createEmpty, DocumentToolLibrary.createFromJson, ToolLibraries.toolLibraryAtURL, ToolLibrary.createEmpty, ToolLibrary.createFromJson, ToolQueryResult.toolLibrary

Derived Classes

DocumentToolLibrary

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolLibrary.add Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Inserts a Tool at the end of the ToolLibrary.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.
returnValue = toolLibrary_var.add(tool)
"toolLibrary_var" is a variable referencing a ToolLibrary object.

#include <Cam/Tools/ToolLibrary.h>

returnValue = toolLibrary_var->add(tool);

Return Value

Type | Description
boolean | Returns true for successful insertion, false otherwise

Parameters

Name | Type | Description
tool | Tool | The Tool that should be added.

Version

Introduced in version April 2023


ToolLibrary.classType Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolLibrary.classType()
This is a static method.

#include <Cam/Tools/ToolLibrary.h>

returnValue = adsk::cam::ToolLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolLibrary.count Property

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

The number of tools in the ToolLibrary.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.

# Get the value of the property.
propertyValue = toolLibrary_var.count
"toolLibrary_var" is a variable referencing a ToolLibrary object.
#include <Cam/Tools/ToolLibrary.h>

// Get the value of the property.
uinteger propertyValue = toolLibrary_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


ToolLibrary.createEmpty Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Creates an empty ToolLibrary.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolLibrary.createEmpty()
This is a static method.

#include <Cam/Tools/ToolLibrary.h>

returnValue = adsk::cam::ToolLibrary::createEmpty();

Return Value

Type | Description
ToolLibrary | Returns the newly created ToolLibrary.

Version

Introduced in version April 2023


ToolLibrary.createFromJson Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Creates a ToolLibrary by given JSON-string. Raises an error if the given JSON is invalid.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolLibrary.createFromJson(json)
This is a static method.

#include <Cam/Tools/ToolLibrary.h>

returnValue = adsk::cam::ToolLibrary::createFromJson(json);

Return Value

Type | Description
ToolLibrary | Returns the newly created ToolLibrary.

Parameters

Name | Type | Description
json | string | The JSON contains all tools that should be added to the new ToolLibrary

Version

Introduced in version April 2023


ToolLibrary.createQuery Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Creates a new ToolQuery that is used to query the library for tools matching the query.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.
returnValue = toolLibrary_var.createQuery()
"toolLibrary_var" is a variable referencing a ToolLibrary object.

#include <Cam/Tools/ToolLibrary.h>

returnValue = toolLibrary_var->createQuery();

Return Value

Type | Description
ToolQuery | Returns a new ToolQuery. The query is predefined by given parameter.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolLibrary.isValid Property

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.

# Get the value of the property.
propertyValue = toolLibrary_var.isValid
"toolLibrary_var" is a variable referencing a ToolLibrary object.
#include <Cam/Tools/ToolLibrary.h>

// Get the value of the property.
boolean propertyValue = toolLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolLibrary.item Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Get Tool by index in ToolLibrary.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.
returnValue = toolLibrary_var.item(index)
"toolLibrary_var" is a variable referencing a ToolLibrary object.

#include <Cam/Tools/ToolLibrary.h>

returnValue = toolLibrary_var->item(index);

Return Value

Type | Description
Tool | Returns the Tool in the ToolLibrary by given index.

Parameters

Name | Type | Description
index | uinteger | Index of the Tool in the ToolLibrary.

Version

Introduced in version April 2023


ToolLibrary.objectType Property

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.

# Get the value of the property.
propertyValue = toolLibrary_var.objectType
"toolLibrary_var" is a variable referencing a ToolLibrary object.
#include <Cam/Tools/ToolLibrary.h>

// Get the value of the property.
string propertyValue = toolLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolLibrary.remove Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Remove Tool by index from ToolLibrary.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.
returnValue = toolLibrary_var.remove(index)
"toolLibrary_var" is a variable referencing a ToolLibrary object.

#include <Cam/Tools/ToolLibrary.h>

returnValue = toolLibrary_var->remove(index);

Return Value

Type | Description
boolean | Returns true for successful deletion, false otherwise

Parameters

Name | Type | Description
index | uinteger | Index of the Tool in the ToolLibrary that should be removed.

Version

Introduced in version April 2023


ToolLibrary.toJson Method

Parent Object: ToolLibrary
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolLibrary.h>

Description

Generate and return JSON string that contains all tools of that list.

Syntax

  • Python
  • C++
"toolLibrary_var" is a variable referencing a ToolLibrary object.
returnValue = toolLibrary_var.toJson()
"toolLibrary_var" is a variable referencing a ToolLibrary object.

#include <Cam/Tools/ToolLibrary.h>

returnValue = toolLibrary_var->toJson();

Return Value

Type | Description
string | Returns JSON string that contains all tools of that list.

Version

Introduced in version April 2023


ToolPreset Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

A Preset defines the material specific properties of a Tool.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets and sets the identifier of that Preset. The id can be used to select a Preset for a Operation.
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 that Preset.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parameters | Gets the CAMParameters collection for this Preset.

Accessed From

CAMTemplateOperationInput.toolPreset, Operation.toolPreset, OperationInput.toolPreset, ToolPresets.add, ToolPresets.item, ToolPresets.itemsByName

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPreset.classType Method

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolPreset.classType()
This is a static method.

#include <Cam/Tools/ToolPreset.h>

returnValue = adsk::cam::ToolPreset::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolPreset.id Property

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

Gets and sets the identifier of that Preset. The id can be used to select a Preset for a Operation.

Syntax

  • Python
  • C++
"toolPreset_var" is a variable referencing a ToolPreset object.

# Get the value of the property.
propertyValue = toolPreset_var.id

# Set the value of the property.
toolPreset_var.id = propertyValue
"toolPreset_var" is a variable referencing a ToolPreset object.
#include <Cam/Tools/ToolPreset.h>

// Get the value of the property.
string propertyValue = toolPreset_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = toolPreset_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


ToolPreset.isValid Property

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolPreset_var" is a variable referencing a ToolPreset object.

# Get the value of the property.
propertyValue = toolPreset_var.isValid
"toolPreset_var" is a variable referencing a ToolPreset object.
#include <Cam/Tools/ToolPreset.h>

// Get the value of the property.
boolean propertyValue = toolPreset_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolPreset.name Property

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

Gets and sets the name of that Preset.

Syntax

  • Python
  • C++
"toolPreset_var" is a variable referencing a ToolPreset object.

# Get the value of the property.
propertyValue = toolPreset_var.name

# Set the value of the property.
toolPreset_var.name = propertyValue
"toolPreset_var" is a variable referencing a ToolPreset object.
#include <Cam/Tools/ToolPreset.h>

// Get the value of the property.
string propertyValue = toolPreset_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = toolPreset_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPreset.objectType Property

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolPreset_var" is a variable referencing a ToolPreset object.

# Get the value of the property.
propertyValue = toolPreset_var.objectType
"toolPreset_var" is a variable referencing a ToolPreset object.
#include <Cam/Tools/ToolPreset.h>

// Get the value of the property.
string propertyValue = toolPreset_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolPreset.parameters Property

Parent Object: ToolPreset
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPreset.h>

Description

Gets the CAMParameters collection for this Preset.

Syntax

  • Python
  • C++
"toolPreset_var" is a variable referencing a ToolPreset object.

# Get the value of the property.
propertyValue = toolPreset_var.parameters
"toolPreset_var" is a variable referencing a ToolPreset object.
#include <Cam/Tools/ToolPreset.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = toolPreset_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPresets Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

ToolPresets represents a collection of ToolPreset. It provides access and allows the manipulation like removing and extending the list.

Methods

Name | Description
add | Creates and inserts a new Preset at the end of the Preset collection of the owning Tool. The new Preset will have the same values as the owning Tool.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Get Preset by index.
itemsByName | Search presets by name. Returns all presets for which the name matches the given pattern. Compare is case insensitive and characters * and ? are used for wild-card matching.
remove | Remove Preset by index from the owning Tool.

Properties

Name | Description
count | The number of Presets of the owning Tool.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Tool.presets

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPresets.add Method

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Creates and inserts a new Preset at the end of the Preset collection of the owning Tool. The new Preset will have the same values as the owning Tool.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.
returnValue = toolPresets_var.add()
"toolPresets_var" is a variable referencing a ToolPresets object.

#include <Cam/Tools/ToolPresets.h>

returnValue = toolPresets_var->add();

Return Value

Type | Description
ToolPreset | Returns the newly created Preset

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPresets.classType Method

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolPresets.classType()
This is a static method.

#include <Cam/Tools/ToolPresets.h>

returnValue = adsk::cam::ToolPresets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolPresets.count Property

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

The number of Presets of the owning Tool.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.

# Get the value of the property.
propertyValue = toolPresets_var.count
"toolPresets_var" is a variable referencing a ToolPresets object.
#include <Cam/Tools/ToolPresets.h>

// Get the value of the property.
uinteger propertyValue = toolPresets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2023


ToolPresets.isValid Property

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.

# Get the value of the property.
propertyValue = toolPresets_var.isValid
"toolPresets_var" is a variable referencing a ToolPresets object.
#include <Cam/Tools/ToolPresets.h>

// Get the value of the property.
boolean propertyValue = toolPresets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolPresets.item Method

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Get Preset by index.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.
returnValue = toolPresets_var.item(index)
"toolPresets_var" is a variable referencing a ToolPresets object.

#include <Cam/Tools/ToolPresets.h>

returnValue = toolPresets_var->item(index);

Return Value

Type | Description
ToolPreset | Returns Preset at by given index, null otherwise

Parameters

Name | Type | Description
index | uinteger | Index of the Preset in the owning Tool that should be returned.

Version

Introduced in version April 2023


ToolPresets.itemsByName Method

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Search presets by name. Returns all presets for which the name matches the given pattern. Compare is case insensitive and characters * and ? are used for wild-card matching.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.
returnValue = toolPresets_var.itemsByName(name)
"toolPresets_var" is a variable referencing a ToolPresets object.

#include <Cam/Tools/ToolPresets.h>

returnValue = toolPresets_var->itemsByName(name);

Return Value

Type | Description
ToolPreset[] | Returns all presets with matching name.

Parameters

Name | Type | Description
name | string | Name of the Preset to search for. The string can define a pattern with wild-card matching. '*' represents an arbitrary sequence including the empty sequence and '?' represents one arbitrary character.

Samples

Name | Description
Manufacturing Workflow API Sample | Manufacturing Workflow API Sample This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolPresets.objectType Property

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.

# Get the value of the property.
propertyValue = toolPresets_var.objectType
"toolPresets_var" is a variable referencing a ToolPresets object.
#include <Cam/Tools/ToolPresets.h>

// Get the value of the property.
string propertyValue = toolPresets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolPresets.remove Method

Parent Object: ToolPresets
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolPresets.h>

Description

Remove Preset by index from the owning Tool.

Syntax

  • Python
  • C++
"toolPresets_var" is a variable referencing a ToolPresets object.
returnValue = toolPresets_var.remove(index)
"toolPresets_var" is a variable referencing a ToolPresets object.

#include <Cam/Tools/ToolPresets.h>

returnValue = toolPresets_var->remove(index);

Return Value

Type | Description
boolean | Returns true for successful deletion, false otherwise

Parameters

Name | Type | Description
index | uinteger | Index of the Preset in the Tool that should be removed.

Version

Introduced in version April 2023


ToolQuery Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

ToolQuery objects are used to search for a set of Tools or ToolLibrary objects inside of the ToolLibraries collection or for a set of Tools inside of a particular ToolLibrary.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
execute | Query for specific a Tool or ToolLbrary.

Properties

Name | Description
criteria | List of all criteria a tool must fulfill. Use the suffix '.min' and '.max', to define a upper and / or lower boundary for a particular value.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
location | Specifies the location to search in the Tool library. Setting the location clears any previous specified URL. When searching inside a ToolLibrary the location will be ignored.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
url | The URL specifies the location and folder to search for in the Tool library. Setting the URL updates the location. When searching inside a ToolLibrary the URL will be ignored.
vendor | The case-insensitive vendor specifies the vendor of the tool. The default empty vendor applies to all tools.

Accessed From

DocumentToolLibrary.createQuery, ToolLibraries.createQuery, ToolLibrary.createQuery

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolQuery.classType Method

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolQuery.classType()
This is a static method.

#include <Cam/Tools/ToolQuery.h>

returnValue = adsk::cam::ToolQuery::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolQuery.criteria Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

List of all criteria a tool must fulfill. Use the suffix '.min' and '.max', to define a upper and / or lower boundary for a particular value.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.criteria
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
Ptr<NamedValues> propertyValue = toolQuery_var->criteria();

Property Value

This is a read only property whose value is a NamedValues.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolQuery.execute Method

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

Query for specific a Tool or ToolLbrary.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.
returnValue = toolQuery_var.execute()
"toolQuery_var" is a variable referencing a ToolQuery object.

#include <Cam/Tools/ToolQuery.h>

returnValue = toolQuery_var->execute();

Return Value

Type | Description
ToolQueryResult[] | Returns a list of `ToolQueryResult`. Each result references a Tool that matches this query.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version May 2023


ToolQuery.isValid Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.isValid
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
boolean propertyValue = toolQuery_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolQuery.location Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

Specifies the location to search in the Tool library. Setting the location clears any previous specified URL. When searching inside a ToolLibrary the location will be ignored.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.location

# Set the value of the property.
toolQuery_var.location = propertyValue
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
LibraryLocations propertyValue = toolQuery_var->location();

// Set the value of the property, where value_var is a LibraryLocations.
bool returnValue = toolQuery_var->location(value_var);

Property Value

This is a read/write property whose value is a LibraryLocations.

Version

Introduced in version April 2023


ToolQuery.objectType Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.objectType
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
string propertyValue = toolQuery_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolQuery.url Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

The URL specifies the location and folder to search for in the Tool library. Setting the URL updates the location. When searching inside a ToolLibrary the URL will be ignored.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.url

# Set the value of the property.
toolQuery_var.url = propertyValue
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
Ptr<URL> propertyValue = toolQuery_var->url();

// Set the value of the property, where value_var is a URL.
bool returnValue = toolQuery_var->url(value_var);

Property Value

This is a read/write property whose value is a URL.

Version

Introduced in version April 2023


ToolQuery.vendor Property

Parent Object: ToolQuery
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQuery.h>

Description

The case-insensitive vendor specifies the vendor of the tool. The default empty vendor applies to all tools.

Syntax

  • Python
  • C++
"toolQuery_var" is a variable referencing a ToolQuery object.

# Get the value of the property.
propertyValue = toolQuery_var.vendor

# Set the value of the property.
toolQuery_var.vendor = propertyValue
"toolQuery_var" is a variable referencing a ToolQuery object.
#include <Cam/Tools/ToolQuery.h>

// Get the value of the property.
string propertyValue = toolQuery_var->vendor();

// Set the value of the property, where value_var is a string.
bool returnValue = toolQuery_var->vendor(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2023


ToolQueryResult Object

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

The ToolQueryResult represents one result item of a ToolQuery.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
tool | The Tool that matches the query.
toolItemIndex | The index specifies the index of the Tool inside the ToolLibrary.
toolLibrary | The ToolLibrary contains a Tool that matches the query.
toolLibraryURL | The URL defines the location of the ToolLibrary asset in ToolLibraries.

Accessed From

ToolQuery.execute

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolQueryResult.classType Method

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ToolQueryResult.classType()
This is a static method.

#include <Cam/Tools/ToolQueryResult.h>

returnValue = adsk::cam::ToolQueryResult::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


ToolQueryResult.isValid Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.isValid
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
boolean propertyValue = toolQueryResult_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


ToolQueryResult.objectType Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.objectType
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
string propertyValue = toolQueryResult_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


ToolQueryResult.tool Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

The Tool that matches the query.

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.tool
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
Ptr<Tool> propertyValue = toolQueryResult_var->tool();

Property Value

This is a read only property whose value is a Tool.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


ToolQueryResult.toolItemIndex Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

The index specifies the index of the Tool inside the ToolLibrary.

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.toolItemIndex
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
integer propertyValue = toolQueryResult_var->toolItemIndex();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version April 2023


ToolQueryResult.toolLibrary Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

The ToolLibrary contains a Tool that matches the query.

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.toolLibrary
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
Ptr<ToolLibrary> propertyValue = toolQueryResult_var->toolLibrary();

Property Value

This is a read only property whose value is a ToolLibrary.

Version

Introduced in version April 2023


ToolQueryResult.toolLibraryURL Property

Parent Object: ToolQueryResult
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/ToolQueryResult.h>

Description

The URL defines the location of the ToolLibrary asset in ToolLibraries.

Syntax

  • Python
  • C++
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.

# Get the value of the property.
propertyValue = toolQueryResult_var.toolLibraryURL
"toolQueryResult_var" is a variable referencing a ToolQueryResult object.
#include <Cam/Tools/ToolQueryResult.h>

// Get the value of the property.
Ptr<URL> propertyValue = toolQueryResult_var->toolLibraryURL();

Property Value

This is a read only property whose value is a URL.

Version

Introduced in version April 2023


Torus Object

Derived from: Surface Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Gets and sets the center axis of the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Creates and returns an independent copy of this Torus object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Creates a transient torus object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Returns the surface evaluator.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Gets all of the data defining the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Gets and sets the major radius of the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Gets and sets the minor radius of the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Gets and sets the origin point (center) of the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Sets all of the data defining the torus.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Returns the surface type.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Torus.h>

Description

Updates this surface by transforming it with a given input matrix.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Object that represents an existing torus feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

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.

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.entityToken Property

Parent Object: TorusFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.entityToken
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
string propertyValue = torusFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


TorusFeature.errorOrWarningMessage Property

Parent Object: TorusFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

Collection that provides access to all of the existing torus features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.torusFeatures

Version

Introduced in version September 2015


TorusFeatures.classType Method

Parent Object: TorusFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

The number of torus features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

Function that returns the specified torus feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

Function that returns the specified torus feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TorusFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


TransformRefGraphNodeProperty Object

TransformRefGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is provides a transform to a node. This is set with an Occurrence of a Component.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property. This should be the occurrence of a component.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.classType Method

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.TransformRefGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

returnValue = adsk::volume::TransformRefGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.description Property

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.

# Get the value of the property.
propertyValue = transformRefGraphNodeProperty_var.description
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.
#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = transformRefGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.isValid Property

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.

# Get the value of the property.
propertyValue = transformRefGraphNodeProperty_var.isValid
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.
#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = transformRefGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.name Property

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.

# Get the value of the property.
propertyValue = transformRefGraphNodeProperty_var.name
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.
#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = transformRefGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.objectType Property

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.

# Get the value of the property.
propertyValue = transformRefGraphNodeProperty_var.objectType
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.
#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = transformRefGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


TransformRefGraphNodeProperty.value Property

Parent Object: TransformRefGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/TransformRefGraphNodeProperty.h>

Description

Get or set the value of the property. This should be the occurrence of a component.

Syntax

  • Python
  • C++
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.

# Get the value of the property.
propertyValue = transformRefGraphNodeProperty_var.value

# Set the value of the property.
transformRefGraphNodeProperty_var.value = propertyValue
"transformRefGraphNodeProperty_var" is a variable referencing a TransformRefGraphNodeProperty object.
#include <Volume/Volumetric/TransformRefGraphNodeProperty.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = transformRefGraphNodeProperty_var->value();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = transformRefGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version May 2025


TriadCommandInput Object

Derived from: CommandInput Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Represents a command input that displays a triad and allows the user to control translation rotation, and scaling. Using properties on the input you can choose which controls are available to the user. This displays inputs in the command dialog where the user can enter values and also displays a manipulator in the graphics window to allow them to graphically set the values. The input boxes are displayed in the dialog when the isVisible property of the command input is true. The manipulator is displayed in the graphics window when both the isVisible and isEnabled properties are true.

It will often be useful to first create a GroupCommandInput and then create the TriadCommandInput within the group so it's apparent to the user these items are related and they can be collapsed to reduce clutter in the dialog. This also allows you to label the set of displayed inputs by using the name of the GroupCommandInput.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.
hideAll | Hides all controls.
hideAllRotations | Sets all rotation related controls to be invisible. This is useful if you are only using translations or scaling.
hideAllScaling | Sets all scaling related controls to be invisible. This is useful if you are only using translations or rotations.
setFlipVisibility | A convenience method to turn on and off the visibility of the horizontal and vertical flip controls.
setFullVisibility | A convenience method to turn on and off the visibility of commonly used controls in a triad. These include the X, Y, and Z axis translations, the X, Y, and Z axis rotations, scaling in the X, Y, and Z directions, scaling on the X-Y, Y-Z and Z-X planes, translation on the X-Y, Y-Z, and Z-X planes, and the origin move.
setPlanarMoveVisibility | A convenience method to turn on and off the visibility of the X-Y, Y-Z, and Z-X planar translation controls.
setRotateVisibility | A convenience method to turn on and off the visibility of the X, Y, and Z axis rotation controls.
setScaleVisibility | A convenience method to turn on and off the visibility of the controls that define scaling in the X, Y, and Z direction and the X-Y, Y-Z, and Z-X planes.
setTranslateVisibility | A convenience method to turn on and off the visibility of the X, Y, and Z translation controls.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
isFlippedHorizontal | Gets and sets if the triad is flipped horizontally (around the around the Y-Z plane of the triad).
isFlippedVertical | Gets and sets if the triad is flipped vertically (around the around the X-Z plane of the triad).
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.
isHorizontalFlipVisible | Gets and sets if the control that lets the user flip horizontally (around the Y-Z plane of the triad) is visible in both the graphical manipulator and the dialog.
isOriginTranslationVisible | Gets and sets if the control that supports translation in the X, Y, and Z directions is visible in both the graphical manipulator and in the dialog. In the manipulator, this is the large dot at the origin or the triad.
isUnifiedScalingVisible | Gets and sets if the control that defines the scaling in all directions visible in both the graphical manipulator and in the dialog.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidExpressions | Returns true if all of the input fields have valid expressions. If this property is false, the triad is incorrectly defined and the current values should not be used.
isVerticalFlipVisible | Gets and sets if the control that lets the user flip vertical (around the X-Z plane of the triad) is visible in both the graphical manipulator and the dialog.
isVisible Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
isXRotationVisible | Gets and sets if the control that defines the rotation around the X axis is visible in both the graphical manipulator and in the dialog.
isXScalingInXYVisible | Gets and sets if the control that defines the scaling along the X axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Y plane of the triad.
isXScalingInXZVisible | Gets and sets if the control that defines the scaling along the X axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Z plane of the triad.
isXTranslationVisible | Gets and sets if the control that supports X Translation is visible in both the graphical manipulator and in the dialog.
isXYPlaneScalingVisible | Gets and sets if the control that defines the scaling in the X-Y plane is visible in both the graphical manipulator and in the dialog.
isXYPlaneTranslationVisible | Gets and sets if the control that defines the translation in the X-Y plane is visible in both the graphical manipulator and in the dialog.
isXZPlaneScalingVisible | Gets and sets if the control that defines the scaling in the X-Z plane is visible in both the graphical manipulator and in the dialog.
isXZPlaneTranslationVisible | Gets and sets if the control that defines the translation in the X-Z plane is visible in both the graphical manipulator and in the dialog.
isYRotationVisible | Gets and sets if the control that defines the rotation around the Y axis is visible in both the graphical manipulator and in the dialog.
isYScalingInXYVisible | Gets and sets if the control that defines the scaling along the Y axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Y plane of the triad.
isYScalingInYZVisible | Gets and sets if the control that defines the scaling along the Y axis is visible in both the graphical manipulator and in the dialog. This control lies on the Y-Z plane of the triad.
isYTranslationVisible | Gets and sets if the control that defines the Y Translation is visible in both the graphical manipulator and in the dialog.
isYZPlaneScalingVisible | Gets and sets if the control that defines the scaling in the Y-Z plane is visible in both the graphical manipulator and in the dialog.
isYZPlaneTranslationVisible | Gets and sets if the control that defines the translation in the Y-Z plane is visible in both the graphical manipulator and in the dialog.
isZRotationVisible | Gets and sets if the control that defines the rotation around the Z axis is visible in both the graphical manipulator and in the dialog.
isZScalingInXZVisible | Gets and sets if the control that defines the scaling along the Z axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Z plane of the triad.
isZScalingInYZVisible | Gets and sets if the control that defines the scaling along the Z axis is visible in both the graphical manipulator and in the dialog. This control lies on the Y-Z plane of the triad.
isZTranslationVisible | Gets and sets if the control that defines the Z Translation is visible in both the graphical manipulator and in the dialog.
lastChangeMade | Returns which value was most recently changed. To determine the actual change made you need to compare the transforms returned by the transform and lastTransform properties. Having information about the specific type of change made makes it easier to compare the matrices because you know what to look for.
lastTransform | Returns the transform of the triad before the latest change. Using the matrices returned by this property and the transform property you can determine what changed. The lastChangeMade property is also useful to help you know the type of change to look for when comparing the matrices.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.
positionTransform | Gets the current position and orientation of the triad using a transformation matrix. This transform does not include any scaling.
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.
transform | Gets or sets the current position, orientation, and scale of the triad using a transformation matrix.
unifiedeScaleFactor Gets and sets the current value of the unified scale factor of the triad.

The isValidExpressions property should be checked before using the value within the command.
unifiedScaleFactorExpression | Gets or sets the expression displayed in the input field for the unified scale. This can contain equations and references to parameters but must result in a valid unitless expression.
xRotation Gets and sets the current value of the rotation around the X axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.
xRotationExpression | Gets or sets the expression displayed in the input field for the X rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.
xScaleFactor Gets and sets the current value of the scale factor along the X axis of the triad.

The isValidExpressions property should be checked before using the value within the command.
xScaleFactorExpression | Gets or sets the expression displayed in the input field for the X scale. This can contain equations and references to parameters but must result in a valid unitless expression.
xTranslation Gets and sets the current value of the translation along the X axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the returned value.
xTranslationExpression | Gets or sets the expression displayed in the input field for the X translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.
xYPlaneScaleFactor Gets and sets the current value of the scale factor on the X-Y plane of the triad.

The isValidExpressions property should be checked before using the value within the command.
xYPlaneScaleFactorExpression | Gets or sets the expression displayed in the input field for the X-Y plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.
yRotation Gets and sets the current value of the rotation around the Y axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.
yRotationExpression | Gets or sets the expression displayed in the input field for the Y rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.
yScaleFactor Gets and sets the current value of the scale factor along the Y axis of the triad.

The isValidExpressions property should be checked before using the value within the command.
yScaleFactorExpression | Gets or sets the expression displayed in the input field for the Y scale. This can contain equations and references to parameters but must result in a valid unitless expression.
yTranslation Gets and sets the current value of the translation along the Y axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the value within the command.
yTranslationExpression | Gets or sets the expression displayed in the input field for the Y translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.
yZPlaneScaleFactor Gets and sets the current value of the scale factor on the Y-Z plane of the triad.

The isValidExpressions property should be checked before using the value within the command.
yZPlaneScaleFactorExpression | Gets or sets the expression displayed in the input field for the Y-Z plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.
zRotation Gets and sets the current value of the rotation around the Z axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.
zRotationExpression | Gets or sets the expression displayed in the input field for the Z rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.
zScaleFactor Gets and sets the current value of the scale factor along the Z axis of the triad.

The isValidExpressions property should be checked before using the value within the command.
zScaleFactorExpression | Gets or sets the expression displayed in the input field for the Z scale. This can contain equations and references to parameters but must result in a valid unitless expression.
zTranslation Gets and sets the current value of the translation along the Z axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the value within the command.
zTranslationExpression | Gets or sets the expression displayed in the input field for the Z translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.
zXPlaneScaleFactor Gets and sets the current value of the scale factor on the Z-X plane of the triad.

The isValidExpressions property should be checked before using the value within the command.
zXPlaneScaleFactorExpression | Gets or sets the expression displayed in the input field for the Z-X plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Accessed From

CommandInputs.addTriadCommandInput

Version

Introduced in version May 2022


TriadCommandInput.classType Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TriadCommandInput.classType()
This is a static method.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = adsk::core::TriadCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2022


TriadCommandInput.commandInputs Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.commandInputs
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = triadCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version May 2022


TriadCommandInput.deleteMe Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.deleteMe()
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2022


TriadCommandInput.hideAll Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Hides all controls.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.hideAll()
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->hideAll();

Return Value

Type | Description
boolean | Returns true if hiding the controls was successful.

Version

Introduced in version May 2022


TriadCommandInput.hideAllRotations Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Sets all rotation related controls to be invisible. This is useful if you are only using translations or scaling.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.hideAllRotations()
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->hideAllRotations();

Return Value

Type | Description
boolean | Returns true if hiding the controls was successful.

Version

Introduced in version May 2022


TriadCommandInput.hideAllScaling Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Sets all scaling related controls to be invisible. This is useful if you are only using translations or rotations.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.hideAllScaling()
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->hideAllScaling();

Return Value

Type | Description
boolean | Returns true if hiding the controls was successful.

Version

Introduced in version May 2022


TriadCommandInput.id Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.id
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.isEnabled Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isEnabled

# Set the value of the property.
triadCommandInput_var.isEnabled = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isFlippedHorizontal Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the triad is flipped horizontally (around the around the Y-Z plane of the triad).

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isFlippedHorizontal

# Set the value of the property.
triadCommandInput_var.isFlippedHorizontal = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isFlippedHorizontal();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isFlippedHorizontal(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isFlippedVertical Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the triad is flipped vertically (around the around the X-Z plane of the triad).

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isFlippedVertical

# Set the value of the property.
triadCommandInput_var.isFlippedVertical = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isFlippedVertical();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isFlippedVertical(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isFullWidth Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

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.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isFullWidth

# Set the value of the property.
triadCommandInput_var.isFullWidth = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isHorizontalFlipVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that lets the user flip horizontally (around the Y-Z plane of the triad) is visible in both the graphical manipulator and the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isHorizontalFlipVisible

# Set the value of the property.
triadCommandInput_var.isHorizontalFlipVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isHorizontalFlipVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isHorizontalFlipVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isOriginTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that supports translation in the X, Y, and Z directions is visible in both the graphical manipulator and in the dialog. In the manipulator, this is the large dot at the origin or the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isOriginTranslationVisible

# Set the value of the property.
triadCommandInput_var.isOriginTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isOriginTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isOriginTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isUnifiedScalingVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling in all directions visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isUnifiedScalingVisible

# Set the value of the property.
triadCommandInput_var.isUnifiedScalingVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isUnifiedScalingVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isUnifiedScalingVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isValid Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isValid
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isValidExpressions Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Returns true if all of the input fields have valid expressions. If this property is false, the triad is incorrectly defined and the current values should not be used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isValidExpressions
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isValidExpressions();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isVerticalFlipVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that lets the user flip vertical (around the X-Z plane of the triad) is visible in both the graphical manipulator and the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isVerticalFlipVisible

# Set the value of the property.
triadCommandInput_var.isVerticalFlipVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isVerticalFlipVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isVerticalFlipVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isVisible

# Set the value of the property.
triadCommandInput_var.isVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXRotationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the rotation around the X axis is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXRotationVisible

# Set the value of the property.
triadCommandInput_var.isXRotationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXRotationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXRotationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXScalingInXYVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the X axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Y plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXScalingInXYVisible

# Set the value of the property.
triadCommandInput_var.isXScalingInXYVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXScalingInXYVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXScalingInXYVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXScalingInXZVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the X axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Z plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXScalingInXZVisible

# Set the value of the property.
triadCommandInput_var.isXScalingInXZVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXScalingInXZVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXScalingInXZVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that supports X Translation is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXTranslationVisible

# Set the value of the property.
triadCommandInput_var.isXTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXYPlaneScalingVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling in the X-Y plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXYPlaneScalingVisible

# Set the value of the property.
triadCommandInput_var.isXYPlaneScalingVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXYPlaneScalingVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXYPlaneScalingVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXYPlaneTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the translation in the X-Y plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXYPlaneTranslationVisible

# Set the value of the property.
triadCommandInput_var.isXYPlaneTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXYPlaneTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXYPlaneTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXZPlaneScalingVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling in the X-Z plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXZPlaneScalingVisible

# Set the value of the property.
triadCommandInput_var.isXZPlaneScalingVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXZPlaneScalingVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXZPlaneScalingVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isXZPlaneTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the translation in the X-Z plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isXZPlaneTranslationVisible

# Set the value of the property.
triadCommandInput_var.isXZPlaneTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isXZPlaneTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isXZPlaneTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYRotationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the rotation around the Y axis is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYRotationVisible

# Set the value of the property.
triadCommandInput_var.isYRotationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYRotationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYRotationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYScalingInXYVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the Y axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Y plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYScalingInXYVisible

# Set the value of the property.
triadCommandInput_var.isYScalingInXYVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYScalingInXYVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYScalingInXYVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYScalingInYZVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the Y axis is visible in both the graphical manipulator and in the dialog. This control lies on the Y-Z plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYScalingInYZVisible

# Set the value of the property.
triadCommandInput_var.isYScalingInYZVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYScalingInYZVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYScalingInYZVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the Y Translation is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYTranslationVisible

# Set the value of the property.
triadCommandInput_var.isYTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYZPlaneScalingVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling in the Y-Z plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYZPlaneScalingVisible

# Set the value of the property.
triadCommandInput_var.isYZPlaneScalingVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYZPlaneScalingVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYZPlaneScalingVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isYZPlaneTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the translation in the Y-Z plane is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isYZPlaneTranslationVisible

# Set the value of the property.
triadCommandInput_var.isYZPlaneTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isYZPlaneTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isYZPlaneTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isZRotationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the rotation around the Z axis is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isZRotationVisible

# Set the value of the property.
triadCommandInput_var.isZRotationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isZRotationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isZRotationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isZScalingInXZVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the Z axis is visible in both the graphical manipulator and in the dialog. This control lies on the X-Z plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isZScalingInXZVisible

# Set the value of the property.
triadCommandInput_var.isZScalingInXZVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isZScalingInXZVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isZScalingInXZVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isZScalingInYZVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the scaling along the Z axis is visible in both the graphical manipulator and in the dialog. This control lies on the Y-Z plane of the triad.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isZScalingInYZVisible

# Set the value of the property.
triadCommandInput_var.isZScalingInYZVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isZScalingInYZVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isZScalingInYZVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.isZTranslationVisible Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets if the control that defines the Z Translation is visible in both the graphical manipulator and in the dialog.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.isZTranslationVisible

# Set the value of the property.
triadCommandInput_var.isZTranslationVisible = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
boolean propertyValue = triadCommandInput_var->isZTranslationVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = triadCommandInput_var->isZTranslationVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2022


TriadCommandInput.lastChangeMade Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Returns which value was most recently changed. To determine the actual change made you need to compare the transforms returned by the transform and lastTransform properties. Having information about the specific type of change made makes it easier to compare the matrices because you know what to look for.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.lastChangeMade
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
TriadChanges propertyValue = triadCommandInput_var->lastChangeMade();

Property Value

This is a read only property whose value is a TriadChanges.

Version

Introduced in version May 2022


TriadCommandInput.lastTransform Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Returns the transform of the triad before the latest change. Using the matrices returned by this property and the transform property you can determine what changed. The lastChangeMade property is also useful to help you know the type of change to look for when comparing the matrices.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.lastTransform
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = triadCommandInput_var->lastTransform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version May 2022


TriadCommandInput.name Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the user visible name of this input.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.name
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.objectType Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.objectType
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.parentCommand Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the parent Command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.parentCommand
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = triadCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version May 2022


TriadCommandInput.parentCommandInput Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.parentCommandInput
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = triadCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version May 2022


TriadCommandInput.positionTransform Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets the current position and orientation of the triad using a transformation matrix. This transform does not include any scaling.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.positionTransform
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = triadCommandInput_var->positionTransform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version May 2022


TriadCommandInput.setFlipVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of the horizontal and vertical flip controls.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setFlipVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setFlipVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.setFullVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of commonly used controls in a triad. These include the X, Y, and Z axis translations, the X, Y, and Z axis rotations, scaling in the X, Y, and Z directions, scaling on the X-Y, Y-Z and Z-X planes, translation on the X-Y, Y-Z, and Z-X planes, and the origin move.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setFullVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setFullVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.setPlanarMoveVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of the X-Y, Y-Z, and Z-X planar translation controls.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setPlanarMoveVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setPlanarMoveVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.setRotateVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of the X, Y, and Z axis rotation controls.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setRotateVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setRotateVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.setScaleVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of the controls that define scaling in the X, Y, and Z direction and the X-Y, Y-Z, and Z-X planes.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setScaleVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setScaleVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.setTranslateVisibility Method

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

A convenience method to turn on and off the visibility of the X, Y, and Z translation controls.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
returnValue = triadCommandInput_var.setTranslateVisibility(isVisible)
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

#include <Core/UserInterface/TriadCommandInput.h>

returnValue = triadCommandInput_var->setTranslateVisibility(isVisible);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
isVisible | boolean | Defines if the visibility of the controls should be turned on or off. True indicates they will be visible.

Version

Introduced in version May 2022


TriadCommandInput.toolClipFilename Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

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.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.toolClipFilename

# Set the value of the property.
triadCommandInput_var.toolClipFilename = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.tooltip Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

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.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.tooltip

# Set the value of the property.
triadCommandInput_var.tooltip = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.tooltipDescription Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

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.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.tooltipDescription

# Set the value of the property.
triadCommandInput_var.tooltipDescription = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.transform Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the current position, orientation, and scale of the triad using a transformation matrix.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.transform

# Set the value of the property.
triadCommandInput_var.transform = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = triadCommandInput_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = triadCommandInput_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version May 2022


TriadCommandInput.unifiedeScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the unified scale factor of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.unifiedeScaleFactor

# Set the value of the property.
triadCommandInput_var.unifiedeScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->unifiedeScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->unifiedeScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.unifiedScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the unified scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.unifiedScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.unifiedScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->unifiedScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->unifiedScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.xRotation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the rotation around the X axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xRotation

# Set the value of the property.
triadCommandInput_var.xRotation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->xRotation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->xRotation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.xRotationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the X rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xRotationExpression

# Set the value of the property.
triadCommandInput_var.xRotationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->xRotationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->xRotationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.xScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor along the X axis of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xScaleFactor

# Set the value of the property.
triadCommandInput_var.xScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->xScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->xScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.xScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the X scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.xScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->xScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->xScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.xTranslation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the translation along the X axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the returned value.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xTranslation

# Set the value of the property.
triadCommandInput_var.xTranslation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->xTranslation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->xTranslation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.xTranslationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the X translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xTranslationExpression

# Set the value of the property.
triadCommandInput_var.xTranslationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->xTranslationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->xTranslationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.xYPlaneScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor on the X-Y plane of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xYPlaneScaleFactor

# Set the value of the property.
triadCommandInput_var.xYPlaneScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->xYPlaneScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->xYPlaneScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.xYPlaneScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the X-Y plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.xYPlaneScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.xYPlaneScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->xYPlaneScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->xYPlaneScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.yRotation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the rotation around the Y axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yRotation

# Set the value of the property.
triadCommandInput_var.yRotation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->yRotation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->yRotation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.yRotationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Y rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yRotationExpression

# Set the value of the property.
triadCommandInput_var.yRotationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->yRotationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->yRotationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.yScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor along the Y axis of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yScaleFactor

# Set the value of the property.
triadCommandInput_var.yScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->yScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->yScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.yScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Y scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.yScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->yScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->yScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.yTranslation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the translation along the Y axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yTranslation

# Set the value of the property.
triadCommandInput_var.yTranslation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->yTranslation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->yTranslation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.yTranslationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Y translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yTranslationExpression

# Set the value of the property.
triadCommandInput_var.yTranslationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->yTranslationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->yTranslationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.yZPlaneScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor on the Y-Z plane of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yZPlaneScaleFactor

# Set the value of the property.
triadCommandInput_var.yZPlaneScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->yZPlaneScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->yZPlaneScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.yZPlaneScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Y-Z plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.yZPlaneScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.yZPlaneScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->yZPlaneScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->yZPlaneScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.zRotation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the rotation around the Z axis of the triad. The value is in radians but will be displayed to the user in degrees.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zRotation

# Set the value of the property.
triadCommandInput_var.zRotation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->zRotation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->zRotation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.zRotationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Z rotation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression degrees are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zRotationExpression

# Set the value of the property.
triadCommandInput_var.zRotationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->zRotationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->zRotationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.zScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor along the Z axis of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zScaleFactor

# Set the value of the property.
triadCommandInput_var.zScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->zScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->zScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.zScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Z scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.zScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->zScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->zScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.zTranslation Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the translation along the Z axis of the triad. The value is in centimeters but will be displayed to the user in default units for the design.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zTranslation

# Set the value of the property.
triadCommandInput_var.zTranslation = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->zTranslation();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->zTranslation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.zTranslationExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Z translation. This can contain equations and references to parameters but must result in a valid distance expression. If units are not specified as part of the expression, the default user units of length are used.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zTranslationExpression

# Set the value of the property.
triadCommandInput_var.zTranslationExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->zTranslationExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->zTranslationExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriadCommandInput.zXPlaneScaleFactor Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets and sets the current value of the scale factor on the Z-X plane of the triad.

The isValidExpressions property should be checked before using the value within the command.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zXPlaneScaleFactor

# Set the value of the property.
triadCommandInput_var.zXPlaneScaleFactor = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
double propertyValue = triadCommandInput_var->zXPlaneScaleFactor();

// Set the value of the property, where value_var is a double.
bool returnValue = triadCommandInput_var->zXPlaneScaleFactor(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version May 2022


TriadCommandInput.zXPlaneScaleFactorExpression Property

Parent Object: TriadCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/TriadCommandInput.h>

Description

Gets or sets the expression displayed in the input field for the Z-X plane scale. This can contain equations and references to parameters but must result in a valid unitless expression.

Syntax

  • Python
  • C++
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.

# Get the value of the property.
propertyValue = triadCommandInput_var.zXPlaneScaleFactorExpression

# Set the value of the property.
triadCommandInput_var.zXPlaneScaleFactorExpression = propertyValue
"triadCommandInput_var" is a variable referencing a TriadCommandInput object.
#include <Core/UserInterface/TriadCommandInput.h>

// Get the value of the property.
string propertyValue = triadCommandInput_var->zXPlaneScaleFactorExpression();

// Set the value of the property, where value_var is a string.
bool returnValue = triadCommandInput_var->zXPlaneScaleFactorExpression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2022


TriangleMesh Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

The TriangleMesh object represents all of the data defining a triangular mesh.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.isValid Property

Parent Object: TriangleMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Returns the node coordinates as an array of Point3D objects.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.

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 float.

Version

Introduced in version August 2014


TriangleMesh.nodeCount Property

Parent Object: TriangleMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Returns the total number of nodes in the mesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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<integer> propertyValue = triangleMesh_var->nodeIndices();

Property Value

This is a read only property whose value is an array of type integer.

Version

Introduced in version August 2014


TriangleMesh.normalVectors Property

Parent Object: TriangleMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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 float.

Version

Introduced in version August 2014


TriangleMesh.objectType Property

Parent Object: TriangleMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

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.

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 float.

Version

Introduced in version August 2014


TriangleMesh.triangleCount Property

Parent Object: TriangleMesh
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>

Description

Returns the number of triangles in the mesh.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

Used to calculate new meshes for a B-Rep or T-Spline using defined criteria.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

Calculates a new triangle mesh based on the current settings.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

Description

Returns the parent MeshManager object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

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;

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshCalculator.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Provides access to a set of triangle meshes.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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, i.e. 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

MeshManager.displayMeshes

Version

Introduced in version August 2014


TriangleMeshList.bestMesh Property

Parent Object: TriangleMeshList
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Returns the mesh with the tightest surface tolerance. This can return null in the case the list is empty, i.e. Count is 0.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Returns the number of meshes in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

Returns the specified triangle meshes.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMeshList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Object that represents an existing trim feature in a design.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
bRepCells Gets the set of valid cells that have been calculated based on the current inputs. 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.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Gets the set of valid cells that have been calculated based on the current inputs. 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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.entityToken Property

Parent Object: TrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.entityToken
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
string propertyValue = trimFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


TrimFeature.errorOrWarningMessage Property

Parent Object: TrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeature.h>

Description

Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a TrimFeatureInput.

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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

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 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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatureInput.h>

Description

Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Collection that provides access to all of the existing trim features in a component and supports the ability to create new trim features.

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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Creates a new trim feature.

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
trimFeatures.add | Demonstrates the trimFeatures.add method.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


trimFeatures.add

Description

Demonstrates the trimFeatures.add method.

Code Samples

  • Python
def demo_trimFeatures_add(rootComp: adsk.fusion.Component):
    tool = _ui.selectEntity('Select trimming tool', 'SketchCurves').entity

    trimFeatures = rootComp.features.trimFeatures
    input = trimFeatures.createInput(tool)

    # Arbitrarily choose the first cell to trim.
    cells = input.bRepCells
    cells[0].isSelected = True

    # Create the feature.
    trimFeatures.add(input)


TrimFeatures.classType Method

Parent Object: TrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

The number of trim features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

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 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.

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
trimFeatures.add | Demonstrates the trimFeatures.add method.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatures.isValid Property

Parent Object: TrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Function that returns the specified trim feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

Function that returns the specified trim feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TrimFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

A collection of TSpline bodies.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

FormFeature.tSplineBodies

Version

Introduced in version April 2019


TSplineBodies.addByTSMDescription Method

Parent Object: TSplineBodies
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Creates a new TSplineBody using the T-Spline description provided by the input string which contains TSM formatted text.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Creates a new TSplineBody by reading in a TSM file from disk.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

The number of bodies in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Function that returns the specified T-Spline body using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

Returns a TSplineBody by specifying the name of the body as seen in the browser.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBodies.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

A TSpline body.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
entityToken Returns a token for the TSplineBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same T-Spline body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentFormFeature | Returns the owning form feature.
textureMapControl | Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to the body.

Accessed From

TSplineBodies.addByTSMDescription, TSplineBodies.addByTSMFile, TSplineBodies.item, TSplineBodies.itemByName

Version

Introduced in version April 2019


TSplineBody.classType Method

Parent Object: TSplineBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.entityToken Property

Parent Object: TSplineBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Returns a token for the TSplineBody object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same T-Spline body.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.entityToken
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
string propertyValue = tSplineBody_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


TSplineBody.getTSMDescription Method

Parent Object: TSplineBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Returns the T-Spline body as a string in the form of a TSM description.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Returns the owning form feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Saves the body as a TSM file.

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


TSplineBody.textureMapControl Property

Parent Object: TSplineBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/TSpline/TSplineBody.h>

Description

Returns the TextureMapControl object associated with this body when there is an appearance assigned to the body that has a texture associated with it. If there isn't a texture, this property will return null. If there is a texture, you can use the returned object to query and modify how the texture is applied to the body.

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.textureMapControl
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
Ptr<TextureMapControl> propertyValue = tSplineBody_var->textureMapControl();

Property Value

This is a read only property whose value is a TextureMapControl.

Version

Introduced in version March 2022


TwoDistancesChamferEdgeSet Object

Derived from: ChamferEdgeSet Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Provides access to the edges and the parameters associated with a two distances chamfer.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 chamfer edge set from the chamfer. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
distanceOne | Returns the model parameter that controls the first offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.
distanceTwo | Returns the model parameter that controls the first offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.
edges Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isFlipped Gets and sets if the chamfer is flipped. This swaps the directions for distance one and two.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isTangentChain | Gets and sets the Tangent chain for chamfer. This enables tangent chain option for 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.classType Method

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TwoDistancesChamferEdgeSet.classType()
This is a static method.

#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

returnValue = adsk::fusion::TwoDistancesChamferEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.deleteMe Method

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Deletes the chamfer edge set from the chamfer.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
returnValue = twoDistancesChamferEdgeSet_var.deleteMe()
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

returnValue = twoDistancesChamferEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.distanceOne Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Returns the model parameter that controls the first offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.distanceOne
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoDistancesChamferEdgeSet_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.distanceTwo Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Returns the model parameter that controls the first offset distance of the chamfer. You can edit the distance by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.distanceTwo
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoDistancesChamferEdgeSet_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.edges Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Gets and sets the edges that will be chamfered. This collection can contain BRepEdge, BRepFace, and Feature objects. If BRepFace or Feature are objects are provided, all of the edges associated with those objects will be chamfered.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.edges

# Set the value of the property.
twoDistancesChamferEdgeSet_var.edges = propertyValue
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = twoDistancesChamferEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = twoDistancesChamferEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.isFlipped Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Gets and sets if the chamfer is flipped. This swaps the directions for distance one and two.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.isFlipped

# Set the value of the property.
twoDistancesChamferEdgeSet_var.isFlipped = propertyValue
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = twoDistancesChamferEdgeSet_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = twoDistancesChamferEdgeSet_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.isTangentChain Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Gets and sets the Tangent chain for chamfer. This enables tangent chain option for chamfer.

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.isTangentChain

# Set the value of the property.
twoDistancesChamferEdgeSet_var.isTangentChain = propertyValue
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = twoDistancesChamferEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = twoDistancesChamferEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


TwoDistancesChamferEdgeSet.isValid Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.isValid
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
boolean propertyValue = twoDistancesChamferEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2020


TwoDistancesChamferEdgeSet.objectType Property

Parent Object: TwoDistancesChamferEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.

# Get the value of the property.
propertyValue = twoDistancesChamferEdgeSet_var.objectType
"twoDistancesChamferEdgeSet_var" is a variable referencing a TwoDistancesChamferEdgeSet object.
#include <Fusion/Features/TwoDistancesChamferEdgeSet.h>

// Get the value of the property.
string propertyValue = twoDistancesChamferEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2020


TwoDistancesChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Provides information to create a chamfer that is defined by a two distances from the edge.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.classType Method

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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 March 2022


TwoDistancesChamferTypeDefinition.distanceOne Property

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

Returns the parameter controlling the first distance. You can edit the distance by editing the value of the parameter object.

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 March 2022


TwoDistancesChamferTypeDefinition.distanceTwo Property

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

Returns the parameter controlling the second distance. You can edit the distance by editing the value of the parameter object.

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 March 2022


TwoDistancesChamferTypeDefinition.isValid Property

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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 March 2022


TwoDistancesChamferTypeDefinition.objectType Property

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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 March 2022


TwoDistancesChamferTypeDefinition.parentFeature Property

Parent Object: TwoDistancesChamferTypeDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

Description

Returns the feature that owns this chamfer type definition

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 March 2022


TwoSidesAngleExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

Description

Defines the inputs for a TwoSidesAngleExtentDefinition object. This feature extent type defines the extents of the feature using angle extents on two sides.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesAngleExtentDefinition.h>

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.

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


TwoSidesDistanceExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Defines the inputs for a TwoSidesDistanceExtentDefinition object. This defines a feature extent where the distance in each direction can be a different value.

Remarks

This object is retired. Extents are now defined independently for both directions. To get the equivalent of what this object provided, you will create a DistanceExtentDefinition for each direction and use the when creating the extrusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Gets the ModelParameter that defines the first distance
distanceTwo | Gets the ModelParameter that defines the second distance
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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


TwoSidesDistanceExtentDefinition.classType Method

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TwoSidesDistanceExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

returnValue = adsk::fusion::TwoSidesDistanceExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


TwoSidesDistanceExtentDefinition.distanceOne Property

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

Gets the ModelParameter that defines the first distance

Syntax

  • Python
  • C++
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesDistanceExtentDefinition_var.distanceOne
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.
#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoSidesDistanceExtentDefinition_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2022


TwoSidesDistanceExtentDefinition.distanceTwo Property

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

Gets the ModelParameter that defines the second distance

Syntax

  • Python
  • C++
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesDistanceExtentDefinition_var.distanceTwo
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.
#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoSidesDistanceExtentDefinition_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2022


TwoSidesDistanceExtentDefinition.isValid Property

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesDistanceExtentDefinition_var.isValid
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.
#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = twoSidesDistanceExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


TwoSidesDistanceExtentDefinition.objectType Property

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesDistanceExtentDefinition_var.objectType
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.
#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

// Get the value of the property.
string propertyValue = twoSidesDistanceExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


TwoSidesDistanceExtentDefinition.parentFeature Property

Parent Object: TwoSidesDistanceExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

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.

Syntax

  • Python
  • C++
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesDistanceExtentDefinition_var.parentFeature
"twoSidesDistanceExtentDefinition_var" is a variable referencing a TwoSidesDistanceExtentDefinition object.
#include <Fusion/Features/TwoSidesDistanceExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = twoSidesDistanceExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition Object

Derived from: ExtentDefinition Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

This object is retired. See more information in the 'Remarks' section below.

Defines the inputs for a TwoSidesToExtentDefinition object. This defines a feature extent where the extents of feature go up to faces or construction planes in both directions.

Remarks

This object is retired. Extents are now defined independently for both directions. To get the equivalent of what this object provided, you will create two ToEntityExtentDefinition objects and use one for each direction of the extrusion.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
matchShape | Gets and sets whether the toEntity is extended to fully intersect the extrusion.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
toEntityOne | Gets and sets the entity that defines the extent on side one. The valid types of entities can vary depending on the type of feature this is being used with.
toEntityTwo | Gets and sets the entity that defines the extent on side two. The valid types of entities can vary depending on the type of feature this is being used with.

Version

Introduced in version August 2014


TwoSidesToExtentDefinition.classType Method

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TwoSidesToExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/TwoSidesToExtentDefinition.h>

returnValue = adsk::fusion::TwoSidesToExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.isValid Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.isValid
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = twoSidesToExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.matchShape Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

Gets and sets whether the toEntity is extended to fully intersect the extrusion.

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.matchShape

# Set the value of the property.
twoSidesToExtentDefinition_var.matchShape = propertyValue
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = twoSidesToExtentDefinition_var->matchShape();

// Set the value of the property, where value_var is a boolean.
bool returnValue = twoSidesToExtentDefinition_var->matchShape(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.objectType Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.objectType
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
string propertyValue = twoSidesToExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.parentFeature Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

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.

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.parentFeature
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = twoSidesToExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.toEntityOne Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

Gets and sets the entity that defines the extent on side one. The valid types of entities can vary depending on the type of feature this is being used with.

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.toEntityOne

# Set the value of the property.
twoSidesToExtentDefinition_var.toEntityOne = propertyValue
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = twoSidesToExtentDefinition_var->toEntityOne();

// Set the value of the property, where value_var is a Base.
bool returnValue = twoSidesToExtentDefinition_var->toEntityOne(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2022


TwoSidesToExtentDefinition.toEntityTwo Property

Parent Object: TwoSidesToExtentDefinition
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/TwoSidesToExtentDefinition.h>

Description

Gets and sets the entity that defines the extent on side two. The valid types of entities can vary depending on the type of feature this is being used with.

Syntax

  • Python
  • C++
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesToExtentDefinition_var.toEntityTwo

# Set the value of the property.
twoSidesToExtentDefinition_var.toEntityTwo = propertyValue
"twoSidesToExtentDefinition_var" is a variable referencing a TwoSidesToExtentDefinition object.
#include <Fusion/Features/TwoSidesToExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = twoSidesToExtentDefinition_var->toEntityTwo();

// Set the value of the property, where value_var is a Base.
bool returnValue = twoSidesToExtentDefinition_var->toEntityTwo(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2022


UnfoldFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Object that represents an existing unfold feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

UnfoldFeatures.item, UnfoldFeatures.itemByName

Version

Introduced in version August 2020


UnfoldFeature.assemblyContext Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

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.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.assemblyContext
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = unfoldFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2020


UnfoldFeature.attributes Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.attributes
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = unfoldFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2020


UnfoldFeature.baseFeature Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

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.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.baseFeature
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = unfoldFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version August 2020


UnfoldFeature.bodies Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.bodies
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = unfoldFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2020


UnfoldFeature.classType Method

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UnfoldFeature.classType()
This is a static method.

#include <Fusion/SheetMetal/UnfoldFeature.h>

returnValue = adsk::fusion::UnfoldFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


UnfoldFeature.deleteMe Method

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
returnValue = unfoldFeature_var.deleteMe()
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

#include <Fusion/SheetMetal/UnfoldFeature.h>

returnValue = unfoldFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2020


UnfoldFeature.dissolve Method

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

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.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
returnValue = unfoldFeature_var.dissolve()
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

#include <Fusion/SheetMetal/UnfoldFeature.h>

returnValue = unfoldFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2020


UnfoldFeature.entityToken Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.entityToken
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
string propertyValue = unfoldFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


UnfoldFeature.errorOrWarningMessage Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

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.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.errorOrWarningMessage
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
string propertyValue = unfoldFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


UnfoldFeature.faces Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.faces
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = unfoldFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2020


UnfoldFeature.healthState Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.healthState
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = unfoldFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version August 2020


UnfoldFeature.isParametric Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.isParametric
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
boolean propertyValue = unfoldFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


UnfoldFeature.isSuppressed Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.isSuppressed

# Set the value of the property.
unfoldFeature_var.isSuppressed = propertyValue
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
boolean propertyValue = unfoldFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unfoldFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2020


UnfoldFeature.isValid Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.isValid
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
boolean propertyValue = unfoldFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


UnfoldFeature.linkedFeatures Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

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.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.linkedFeatures
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = unfoldFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version August 2020


UnfoldFeature.name Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.name

# Set the value of the property.
unfoldFeature_var.name = propertyValue
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
string propertyValue = unfoldFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = unfoldFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2020


UnfoldFeature.objectType Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.objectType
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
string propertyValue = unfoldFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


UnfoldFeature.parentComponent Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.parentComponent
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = unfoldFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2020


UnfoldFeature.timelineObject Property

Parent Object: UnfoldFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.

# Get the value of the property.
propertyValue = unfoldFeature_var.timelineObject
"unfoldFeature_var" is a variable referencing a UnfoldFeature object.
#include <Fusion/SheetMetal/UnfoldFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = unfoldFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2020


UnfoldFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

Collection that provides access to all of the existing unfold features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 unfold feature using an index into the collection.
itemByName | Function that returns the specified unfold feature using the name of the feature.

Properties

Name | Description
count | The number of unfold 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.unfoldFeatures

Version

Introduced in version August 2020


UnfoldFeatures.classType Method

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UnfoldFeatures.classType()
This is a static method.

#include <Fusion/SheetMetal/UnfoldFeatures.h>

returnValue = adsk::fusion::UnfoldFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2020


UnfoldFeatures.count Property

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

The number of unfold features in the collection.

Syntax

  • Python
  • C++
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.

# Get the value of the property.
propertyValue = unfoldFeatures_var.count
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.
#include <Fusion/SheetMetal/UnfoldFeatures.h>

// Get the value of the property.
uinteger propertyValue = unfoldFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2020


UnfoldFeatures.isValid Property

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.

# Get the value of the property.
propertyValue = unfoldFeatures_var.isValid
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.
#include <Fusion/SheetMetal/UnfoldFeatures.h>

// Get the value of the property.
boolean propertyValue = unfoldFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2020


UnfoldFeatures.item Method

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

Function that returns the specified unfold feature using an index into the collection.

Syntax

  • Python
  • C++
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.
returnValue = unfoldFeatures_var.item(index)
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.

#include <Fusion/SheetMetal/UnfoldFeatures.h>

returnValue = unfoldFeatures_var->item(index);

Return Value

Type | Description
UnfoldFeature | 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 2020


UnfoldFeatures.itemByName Method

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

Function that returns the specified unfold feature using the name of the feature.

Syntax

  • Python
  • C++
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.
returnValue = unfoldFeatures_var.itemByName(name)
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.

#include <Fusion/SheetMetal/UnfoldFeatures.h>

returnValue = unfoldFeatures_var->itemByName(name);

Return Value

Type | Description
UnfoldFeature | 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 2020


UnfoldFeatures.objectType Property

Parent Object: UnfoldFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/SheetMetal/UnfoldFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.

# Get the value of the property.
propertyValue = unfoldFeatures_var.objectType
"unfoldFeatures_var" is a variable referencing a UnfoldFeatures object.
#include <Fusion/SheetMetal/UnfoldFeatures.h>

// Get the value of the property.
string propertyValue = unfoldFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2020


UnitAndValuePreferences Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

The UnitAndValuePreferences object provides access to unit and value precision related preferences.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the angular precision. This value specifies the number of decimals to display.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets if abbreviations are used for units display.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets if symbols are used for units display.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets if trailing zeros are hidden when displaying numbers.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the degree display format.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the foot and inch display format.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the general precision for distance values. This value specifies the number of decimals to display.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets if the decimal is a period or comma.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets if scientific notation is used when displaying numbers.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the units types to use when displaying values.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the minimum number of digits to the right of the decimal to display before hiding trailing zeros.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the number scientific notation precision. This value specifies the number of decimals to display.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the number of whole digits that will be displayed before switching to scientific notation.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitAndValuePreferences.h>

Description

Gets and sets the number of non zero decimal places that will be displayed before switching to scientific notation.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

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.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | **RETIRED** 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"
formatValue Given a floating point number this method evaluates it as a value of a specific unit type and returns an appropriate string. By default, the current unit settings defined in the user preferences is used, but you can set the method arguments to override the defaults to specify the formatting you want. The input value always uses internal units, which are centimeters for length, radians for angles, and mass is in kilograms.

This method is useful whenever you have a value you've gotten from Fusion or computed on your own and need to display it to the user as a string. This method does the conversion and also takes into account the units and the formatting the user has specified in their preferences.

Below are some examples of various formatting where the user preferences for general precision is four decimal places, and the angular precision is one decimal place. Also, trailing zeros are set to be hidden and the minimum precision is two decimal places when trailing zeros are turned off. The design units are specified to be "inch".

Here, only the value is supplied and the default is to assume the units are the current design length unit and use the preference settings to format it so there are four decimal places shown and the unit name is included. formatValue(1.5) -> "0.5906 in"

In this example, an angle is specified by using "deg" as the unit, and the result showing one decimal place, which is what's defined in the user preference, and it shows the unit name. formatValue(0.7853981633974483096, "deg") -> "45.0 deg"

This example converts the input value of 1.5 cm to mm where eight decimal places are shown, trailing zeros are shown, and the unit name is shown. The fourth argument of minimum precision is ignored, since it is only used when showTrailing zeros is False. formatValue(1.5, "mm", 8, BooleanOptions.TrueBooleanOption, 0, True) - > "15.00000000 mm"
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 might 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 to represent the current length unit and is affected by the preference settings that let the user choose whether abbreviations 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 determining 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
product | Returns the parent Product.

Accessed From

CAM.unitsManager, Design.unitsManager, Drawing.unitsManager, FlatPatternProduct.unitsManager, Product.unitsManager, WorkingModel.unitsManager

Derived Classes

FusionUnitsManager

Samples

Name | Description
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

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...

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

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 to represent the current length unit and is affected by the preference settings that let the user choose whether abbreviations 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 determining the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.

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
Get Volume of Active Design API Sample | 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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Gets the value (in internal units) of the expression.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

This function is retired. See more information in the 'Remarks' section below.

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"

Remarks

This property has been replaced by the formatValue method. This method does not honor the preferences for the precision, as it's supposed to. The formatValue method provides this capability and the ability to override the preference settings and specify how the value should be formatted.

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.

Version

Introduced in version August 2014
Retired in version January 2025


UnitsManager.formatUnits Method

Parent Object: UnitsManager
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"

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.formatValue Method

Parent Object: UnitsManager
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Given a floating point number this method evaluates it as a value of a specific unit type and returns an appropriate string. By default, the current unit settings defined in the user preferences is used, but you can set the method arguments to override the defaults to specify the formatting you want. The input value always uses internal units, which are centimeters for length, radians for angles, and mass is in kilograms.

This method is useful whenever you have a value you've gotten from Fusion or computed on your own and need to display it to the user as a string. This method does the conversion and also takes into account the units and the formatting the user has specified in their preferences.

Below are some examples of various formatting where the user preferences for general precision is four decimal places, and the angular precision is one decimal place. Also, trailing zeros are set to be hidden and the minimum precision is two decimal places when trailing zeros are turned off. The design units are specified to be "inch".

Here, only the value is supplied and the default is to assume the units are the current design length unit and use the preference settings to format it so there are four decimal places shown and the unit name is included. formatValue(1.5) -> "0.5906 in"

In this example, an angle is specified by using "deg" as the unit, and the result showing one decimal place, which is what's defined in the user preference, and it shows the unit name. formatValue(0.7853981633974483096, "deg") -> "45.0 deg"

This example converts the input value of 1.5 cm to mm where eight decimal places are shown, trailing zeros are shown, and the unit name is shown. The fourth argument of minimum precision is ignored, since it is only used when showTrailing zeros is False. formatValue(1.5, "mm", 8, BooleanOptions.TrueBooleanOption, 0, True) - > "15.00000000 mm"

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
# Uses no optional arguments.
returnValue = unitsManager_var.formatValue(value)

# Uses optional arguments.
returnValue = unitsManager_var.formatValue(value, units, precision, showTrailingZeros, minimumPrecision, showUnits)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

// Uses no optional arguments.
returnValue = unitsManager_var->formatValue(value);

// Uses optional arguments.
returnValue = unitsManager_var->formatValue(value, units, precision, showTrailingZeros, minimumPrecision, showUnits);

Return Value

Type | Description
string | Returns the formatted string or an empty string in case of an error.

Parameters

Name | Type | Description
value | double | A floating point value that is assumed to use the internal unit type, which are centimeters for length, radians for angles, and mass is in kilograms.
units | string | The units the value represents. The default value for this argument is "DefaultDistance" which means it will use the default distance units defined for the active design. This is an optional argument whose default value is "DefaultDistance".
precision | integer | This specifies the number of decimal places to display. The default value is -1 which indicates the precision specified in preferences should be used. A maximum of 9 can be used and any larger numbers will be forced to 9. This is an optional argument whose default value is -1.
showTrailingZeros | BooleanOptions | Specifies if trailing zeros should be shown or not. The default value is to use the preference setting. This is an optional argument whose default value is BooleanOptions.DefaultBooleanOption.
minimumPrecision | integer | When trailing zeros are not displayed, this specifies a minimum precision where some trailing zeros are still shown. The default value is -1 which indicates the minimum precision specified in preferences should be used. A maximum of 8 can be used, and any larger numbers will be forced to 8. This is an optional argument whose default value is -1.
showUnits | boolean | This specifies whether the unit name or symbol should be included in the result. This is an optional argument whose default value is True.

Samples

Name | Description
Get Volume of Active Design API Sample | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version March 2024


UnitsManager.internalUnits Property

Parent Object: UnitsManager
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Checks to see if the given expression is valid.

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 | The expression to validate.
units | string | The units to use when validating the expression.

Version

Introduced in version January 2015


UnitsManager.objectType Property

Parent Object: UnitsManager
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Returns the parent Product.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/UnitsManager.h>

Description

Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with might 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"

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Object that represents an existing Unstitch feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 unstitched. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
inputFaces Gets the faces that were input to be unstitched.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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.entityToken Property

Parent Object: UnstitchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.entityToken
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
string propertyValue = unstitchFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


UnstitchFeature.errorOrWarningMessage Property

Parent Object: UnstitchFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Gets the faces that were input to be unstitched.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Sets the faces and/or bodies to be unstitched.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Collection that provides access to all of the existing Unstitch features in a component and supports the ability to create new Unstitch features.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Creates a new Unstitch feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

The number of Unstitch features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Function that returns the specified Unstitch feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

Function that returns the specified unstitch feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UnstitchFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


UntrimFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Object that represents an existing Untrim feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
redefineLoops | Set the loops to be removed.
redefineLoopsFromFaces | Set the loops to be removed from a set of faces.

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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.
extensionDistance | Gets the ModelParameter that defines the extension distance used to extend external boundaries. This can return null in the case where only internal boundaries have been removed. The value can be edited by using the properties of the returned ModelParameter object.
faces Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
facesToUntrim | Gets the face objects to untrim. Returns null/None in the case where loops are specified instead of faces.
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.
loopsToUntrim | Gets the loop objects to untrim. Returns null/None in the case where faces are specified instead of loops
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
untrimLoopType | Gets the loop type that was untrimmed. To change the trim type, use one of the redefine methods.

Accessed From

UntrimFeature.createForAssemblyContext, UntrimFeature.nativeObject, UntrimFeatures.add, UntrimFeatures.item, UntrimFeatures.itemByName

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeature.assemblyContext Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.assemblyContext
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = untrimFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2021


UntrimFeature.attributes Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.attributes
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = untrimFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2021


UntrimFeature.baseFeature Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.baseFeature
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = untrimFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version January 2021


UntrimFeature.bodies Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.bodies
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = untrimFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version January 2021


UntrimFeature.classType Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UntrimFeature.classType()
This is a static method.

#include <Fusion/Features/UntrimFeature.h>

returnValue = adsk::fusion::UntrimFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


UntrimFeature.createForAssemblyContext Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.
returnValue = untrimFeature_var.createForAssemblyContext(occurrence)
"untrimFeature_var" is a variable referencing a UntrimFeature object.

#include <Fusion/Features/UntrimFeature.h>

returnValue = untrimFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
UntrimFeature | 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 January 2021


UntrimFeature.deleteMe Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.
returnValue = untrimFeature_var.deleteMe()
"untrimFeature_var" is a variable referencing a UntrimFeature object.

#include <Fusion/Features/UntrimFeature.h>

returnValue = untrimFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2021


UntrimFeature.dissolve Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.
returnValue = untrimFeature_var.dissolve()
"untrimFeature_var" is a variable referencing a UntrimFeature object.

#include <Fusion/Features/UntrimFeature.h>

returnValue = untrimFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2021


UntrimFeature.entityToken Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.entityToken
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
string propertyValue = untrimFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


UntrimFeature.errorOrWarningMessage Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.errorOrWarningMessage
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
string propertyValue = untrimFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


UntrimFeature.extensionDistance Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Gets the ModelParameter that defines the extension distance used to extend external boundaries. This can return null in the case where only internal boundaries have been removed. The value can be edited by using the properties of the returned ModelParameter object.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.extensionDistance
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = untrimFeature_var->extensionDistance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2021


UntrimFeature.faces Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.faces
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = untrimFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2021


UntrimFeature.facesToUntrim Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Gets the face objects to untrim. Returns null/None in the case where loops are specified instead of faces.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.facesToUntrim
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = untrimFeature_var->facesToUntrim();

Property Value

This is a read only property whose value is an array of type BRepFace.

Version

Introduced in version January 2021


UntrimFeature.healthState Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.healthState
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = untrimFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version January 2021


UntrimFeature.isParametric Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.isParametric
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
boolean propertyValue = untrimFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


UntrimFeature.isSuppressed Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.isSuppressed

# Set the value of the property.
untrimFeature_var.isSuppressed = propertyValue
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
boolean propertyValue = untrimFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = untrimFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2021


UntrimFeature.isValid Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.isValid
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
boolean propertyValue = untrimFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


UntrimFeature.linkedFeatures Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.linkedFeatures
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = untrimFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2021


UntrimFeature.loopsToUntrim Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Gets the loop objects to untrim. Returns null/None in the case where faces are specified instead of loops

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.loopsToUntrim
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepLoop>> propertyValue = untrimFeature_var->loopsToUntrim();

Property Value

This is a read only property whose value is an array of type BRepLoop.

Version

Introduced in version January 2021


UntrimFeature.name Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.name

# Set the value of the property.
untrimFeature_var.name = propertyValue
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
string propertyValue = untrimFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = untrimFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2021


UntrimFeature.nativeObject Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

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.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.nativeObject
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<UntrimFeature> propertyValue = untrimFeature_var->nativeObject();

Property Value

This is a read only property whose value is a UntrimFeature.

Version

Introduced in version January 2021


UntrimFeature.objectType Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.objectType
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
string propertyValue = untrimFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


UntrimFeature.parentComponent Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.parentComponent
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = untrimFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2021


UntrimFeature.redefineLoops Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Set the loops to be removed.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.
returnValue = untrimFeature_var.redefineLoops(loops)
"untrimFeature_var" is a variable referencing a UntrimFeature object.

#include <Fusion/Features/UntrimFeature.h>

returnValue = untrimFeature_var->redefineLoops(loops);

Return Value

Type | Description
boolean | Returns whether the operation was successful

Parameters

Name | Type | Description
loops | BRepLoop[] | Input the entities that define loops to remove. Only loops that do not have a connected face can be removed (the edges in the loop have a single face) The array can only contain loops from surface bodies, (the isSolid property of the BRepBody returns false).

Version

Introduced in version January 2021


UntrimFeature.redefineLoopsFromFaces Method

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Set the loops to be removed from a set of faces.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.
returnValue = untrimFeature_var.redefineLoopsFromFaces(faces, untrimLoopType)
"untrimFeature_var" is a variable referencing a UntrimFeature object.

#include <Fusion/Features/UntrimFeature.h>

returnValue = untrimFeature_var->redefineLoopsFromFaces(faces, untrimLoopType);

Return Value

Type | Description
boolean | Returns whether the operation was successful

Parameters

Name | Type | Description
faces | BRepFace[] | An array of BRepFace objects that will have the loops of the specified types removed. Only loops that do not have a connected face can be removed (the edges in the loop have a single face). The array can only contain faces from surface bodies, (the isSolid property of the BRepBody returns false).
untrimLoopType | UntrimLoopTypes | The loop type to be untrimmed (AllLoopUntrimType, InternalLoopUntrimType, or ExternalLoopUntrimType).

Version

Introduced in version January 2021


UntrimFeature.timelineObject Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.timelineObject
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = untrimFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2021


UntrimFeature.untrimLoopType Property

Parent Object: UntrimFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeature.h>

Description

Gets the loop type that was untrimmed. To change the trim type, use one of the redefine methods.

Syntax

  • Python
  • C++
"untrimFeature_var" is a variable referencing a UntrimFeature object.

# Get the value of the property.
propertyValue = untrimFeature_var.untrimLoopType
"untrimFeature_var" is a variable referencing a UntrimFeature object.
#include <Fusion/Features/UntrimFeature.h>

// Get the value of the property.
UntrimLoopTypes propertyValue = untrimFeature_var->untrimLoopType();

Property Value

This is a read only property whose value is a UntrimLoopTypes.

Version

Introduced in version January 2021


UntrimFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a Untrim feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setLoops | Set the loops to be removed.
setLoopsFromFaces | Set the loops to be removed from a set of faces.

Properties

Name | Description
extensionDistance | Gets and sets the ValueInput object that defines the extension distance applied to faces when an external boundary is removed.
facesToUntrim | Gets the face objects to untrim. Returns null/None in the case where loops are specified instead of faces.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loopsToUntrim | Gets the loop objects to untrim. Returns null/None in the case where faces are specified instead of loops
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
untrimLoopType | Gets the loop type to be untrimmed. This is only used when faces are being untrimmed and is ignored for loops.

Accessed From

UntrimFeatures.createInputFromFaces, UntrimFeatures.createInputFromLoops

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeatureInput.classType Method

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UntrimFeatureInput.classType()
This is a static method.

#include <Fusion/Features/UntrimFeatureInput.h>

returnValue = adsk::fusion::UntrimFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


UntrimFeatureInput.extensionDistance Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Gets and sets the ValueInput object that defines the extension distance applied to faces when an external boundary is removed.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.extensionDistance

# Set the value of the property.
untrimFeatureInput_var.extensionDistance = propertyValue
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = untrimFeatureInput_var->extensionDistance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = untrimFeatureInput_var->extensionDistance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2021


UntrimFeatureInput.facesToUntrim Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Gets the face objects to untrim. Returns null/None in the case where loops are specified instead of faces.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.facesToUntrim
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = untrimFeatureInput_var->facesToUntrim();

Property Value

This is a read only property whose value is an array of type BRepFace.

Version

Introduced in version January 2021


UntrimFeatureInput.isValid Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.isValid
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
boolean propertyValue = untrimFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


UntrimFeatureInput.loopsToUntrim Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Gets the loop objects to untrim. Returns null/None in the case where faces are specified instead of loops

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.loopsToUntrim
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepLoop>> propertyValue = untrimFeatureInput_var->loopsToUntrim();

Property Value

This is a read only property whose value is an array of type BRepLoop.

Version

Introduced in version January 2021


UntrimFeatureInput.objectType Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.objectType
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
string propertyValue = untrimFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


UntrimFeatureInput.setLoops Method

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Set the loops to be removed.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
returnValue = untrimFeatureInput_var.setLoops(loops)
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

#include <Fusion/Features/UntrimFeatureInput.h>

returnValue = untrimFeatureInput_var->setLoops(loops);

Return Value

Type | Description
boolean | Returns whether the operation was successful

Parameters

Name | Type | Description
loops | BRepLoop[] | Redefines this input to remove loops from the body. If faces were previously defined, that information will be lost. Only loops that do not have a connected face can be removed (the edges in the loop have a single face) The array can only contain loops from surface bodies, (the isSolid property of the BRepBody returns false).

Version

Introduced in version January 2021


UntrimFeatureInput.setLoopsFromFaces Method

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Set the loops to be removed from a set of faces.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
returnValue = untrimFeatureInput_var.setLoopsFromFaces(faces, untrimLoopType)
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

#include <Fusion/Features/UntrimFeatureInput.h>

returnValue = untrimFeatureInput_var->setLoopsFromFaces(faces, untrimLoopType);

Return Value

Type | Description
boolean | Returns whether the operation was successful

Parameters

Name | Type | Description
faces | BRepFace[] | An array of BRepFace objects that will have the loops of the specified types removed. Only loops that do not have a connected face can be removed (the edges in the loop have a single face). The array can only contain faces from surface bodies, (the isSolid property of the BRepBody returns false).
untrimLoopType | UntrimLoopTypes | The loop type to be untrimmed (AllLoopUntrimType, InternalLoopUntrimType, or ExternalLoopUntrimType).

Version

Introduced in version January 2021


UntrimFeatureInput.untrimLoopType Property

Parent Object: UntrimFeatureInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatureInput.h>

Description

Gets the loop type to be untrimmed. This is only used when faces are being untrimmed and is ignored for loops.

Syntax

  • Python
  • C++
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.

# Get the value of the property.
propertyValue = untrimFeatureInput_var.untrimLoopType
"untrimFeatureInput_var" is a variable referencing a UntrimFeatureInput object.
#include <Fusion/Features/UntrimFeatureInput.h>

// Get the value of the property.
UntrimLoopTypes propertyValue = untrimFeatureInput_var->untrimLoopType();

Property Value

This is a read only property whose value is a UntrimLoopTypes.

Version

Introduced in version January 2021


UntrimFeatures Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Collection that provides access to all of the existing Untrim features in a component and supports the ability to create new Untrim features.

Methods

Name | Description
add | Creates a new Untrim 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().
createInputFromFaces | Creates a UntrimFeatureInput object that defines the input needed to create a untrim feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the UntrimFeatureInput object.
createInputFromLoops | Creates a UntrimFeatureInput object that defines the input needed to create a untrim feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the UntrimFeatureInput object.
item | Function that returns the specified Untrim feature using an index into the collection.
itemByName | Function that returns the specified Untrim feature using the name of the feature.

Properties

Name | Description
count | The number of Untrim 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.untrimFeatures

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeatures.add Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Creates a new Untrim feature.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
returnValue = untrimFeatures_var.add(input)
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

#include <Fusion/Features/UntrimFeatures.h>

returnValue = untrimFeatures_var->add(input);

Return Value

Type | Description
UntrimFeature | Returns the newly created UntrimFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | UntrimFeatureInput | An UntrimFeatureInput object that defines the desired Untrim feature. Use the createInput method to create a new UntrimFeatureInput object and then use methods on it (the UntrimFeatureInput object) to define the desired options for the Untrim feature.

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeatures.classType Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UntrimFeatures.classType()
This is a static method.

#include <Fusion/Features/UntrimFeatures.h>

returnValue = adsk::fusion::UntrimFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2021


UntrimFeatures.count Property

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

The number of Untrim features in the collection.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

# Get the value of the property.
propertyValue = untrimFeatures_var.count
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
#include <Fusion/Features/UntrimFeatures.h>

// Get the value of the property.
uinteger propertyValue = untrimFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2021


UntrimFeatures.createInputFromFaces Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Creates a UntrimFeatureInput object that defines the input needed to create a untrim feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the UntrimFeatureInput object.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
# Uses no optional arguments.
returnValue = untrimFeatures_var.createInputFromFaces(faces, untrimLoopType)

# Uses optional arguments.
returnValue = untrimFeatures_var.createInputFromFaces(faces, untrimLoopType, extensionDistance)
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

#include <Fusion/Features/UntrimFeatures.h>

// Uses no optional arguments.
returnValue = untrimFeatures_var->createInputFromFaces(faces, untrimLoopType);

// Uses optional arguments.
returnValue = untrimFeatures_var->createInputFromFaces(faces, untrimLoopType, extensionDistance);

Return Value

Type | Description
UntrimFeatureInput | Returns the newly created UntrimFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
faces | BRepFace[] | An array of BRepFace objects that will have the loops of the specified type removed. Only loops that do not have a connected face can be removed (the edges in the loop have a single face). The array can only contain faces from surface bodies, (the isSolid property of the BRepBody returns false).
untrimLoopType | UntrimLoopTypes | The loop type to be untrimmed (AllLoopUntrimType, InternalLoopUntrimType, or ExternalLoopUntrimType).
extensionDistance | ValueInput | If the untrim loop type is AllLoopUntrimType or ExternalLoopUntrimType the untrimmed faces can be extended by a specified distance. This is an optional argument whose default value is null.

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeatures.createInputFromLoops Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Creates a UntrimFeatureInput object that defines the input needed to create a untrim feature. Use the input object to define the input to create the desired feature and then use the Add method, passing in the UntrimFeatureInput object.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
# Uses no optional arguments.
returnValue = untrimFeatures_var.createInputFromLoops(loops)

# Uses optional arguments.
returnValue = untrimFeatures_var.createInputFromLoops(loops, extensionDistance)
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

#include <Fusion/Features/UntrimFeatures.h>

// Uses no optional arguments.
returnValue = untrimFeatures_var->createInputFromLoops(loops);

// Uses optional arguments.
returnValue = untrimFeatures_var->createInputFromLoops(loops, extensionDistance);

Return Value

Type | Description
UntrimFeatureInput | Returns the newly created UntrimFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
loops | BRepLoop[] | Input the entities that define loops to remove. Only loops that do not have a connected face can be removed (the edges in the loop have a single face) The array can only contain loops from surface bodies, (the isSolid property of the BRepBody returns false).
extensionDistance | ValueInput | If an external boundary is removed the untrimmed face can be extended by a specified distance. This is an optional argument whose default value is null.

Samples

Name | Description
Untrim Feature API Sample | Demonstrates creating a new untrim feature.

Version

Introduced in version January 2021


UntrimFeatures.isValid Property

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

# Get the value of the property.
propertyValue = untrimFeatures_var.isValid
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
#include <Fusion/Features/UntrimFeatures.h>

// Get the value of the property.
boolean propertyValue = untrimFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2021


UntrimFeatures.item Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Function that returns the specified Untrim feature using an index into the collection.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
returnValue = untrimFeatures_var.item(index)
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

#include <Fusion/Features/UntrimFeatures.h>

returnValue = untrimFeatures_var->item(index);

Return Value

Type | Description
UntrimFeature | 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 2021


UntrimFeatures.itemByName Method

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

Function that returns the specified Untrim feature using the name of the feature.

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
returnValue = untrimFeatures_var.itemByName(name)
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

#include <Fusion/Features/UntrimFeatures.h>

returnValue = untrimFeatures_var->itemByName(name);

Return Value

Type | Description
UntrimFeature | 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 January 2021


UntrimFeatures.objectType Property

Parent Object: UntrimFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/UntrimFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.

# Get the value of the property.
propertyValue = untrimFeatures_var.objectType
"untrimFeatures_var" is a variable referencing a UntrimFeatures object.
#include <Fusion/Features/UntrimFeatures.h>

// Get the value of the property.
string propertyValue = untrimFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2021


URL Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

A URL object provides useful and easy-to-use methods for creating, modifying, and analyzing URLs.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | Create a new URL by given string.
join | Join this URL with the given path and return the resulting URL. The operation does not alter the current URL. Join inserts a slash '/' to properly extend the path, so that "http://foo".join("bar") will return "http://foo/bar", not "http://foobar".
toString | Get the entire URL as string.

Properties

Name | Description
isURLValid | Check whether the URL is valid. Ensures that the URL is formatted with a protocol followed by a path which can be empty. The check is independent of the existence of the resource the URL may point to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
leafName | Get the leaf name of the URL, which is the section behind the last '/'.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parent | Get the parent URL, represented by the section before the last '/'.
pathName | Get the path name of the URL, including the last '/' of the protocol followed by the path of the URL.
protocol | Get the protocol scheme of the URL, including the final ':'.

Accessed From

CAMLibrary.childAssetURLs, CAMLibrary.childFolderURLs, CAMLibrary.createFolder, CAMLibrary.urlByLocation, CAMTemplateLibrary.childAssetURLs, CAMTemplateLibrary.childFolderURLs, CAMTemplateLibrary.createFolder, CAMTemplateLibrary.importTemplate, CAMTemplateLibrary.updateTemplate, CAMTemplateLibrary.urlByLocation, Machine.postURL, MachineFromLibraryInput.url, MachineLibrary.childAssetURLs, MachineLibrary.childFolderURLs, MachineLibrary.createFolder, MachineLibrary.importMachine, MachineLibrary.urlByLocation, MachineQuery.url, PostConfigurationQuery.url, PostLibrary.childAssetURLs, PostLibrary.childFolderURLs, PostLibrary.createFolder, PostLibrary.importPostConfiguration, PostLibrary.urlByLocation, PostProcessingMachineElement.postURL, PrintSettingLibrary.childAssetURLs, PrintSettingLibrary.childFolderURLs, PrintSettingLibrary.createFolder, PrintSettingLibrary.importPrintSetting, PrintSettingLibrary.urlByLocation, PrintSettingQuery.url, StockMaterialLibrary.childAssetURLs, StockMaterialLibrary.childFolderURLs, StockMaterialLibrary.createFolder, StockMaterialLibrary.importStockMaterial, StockMaterialLibrary.urlByLocation, ToolLibraries.childAssetURLs, ToolLibraries.childFolderURLs, ToolLibraries.createFolder, ToolLibraries.importToolLibrary, ToolLibraries.urlByLocation, ToolQuery.url, ToolQueryResult.toolLibraryURL, URL.create, URL.join, URL.parent

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


URL.classType Method

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.URL.classType()
This is a static method.

#include <Core/Application/URL.h>

returnValue = adsk::core::URL::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2023


URL.create Method

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Create a new URL by given string.

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.URL.create(url)
This is a static method.

#include <Core/Application/URL.h>

returnValue = adsk::core::URL::create(url);

Return Value

Type | Description
URL | Returns the new URL object.

Parameters

Name | Type | Description
url | string | The string is used to define the URL.

Samples

Name Description
Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.
Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Version

Introduced in version April 2023


URL.isURLValid Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Check whether the URL is valid. Ensures that the URL is formatted with a protocol followed by a path which can be empty. The check is independent of the existence of the resource the URL may point to.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.isURLValid
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
boolean propertyValue = uRL_var->isURLValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


URL.isValid Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.isValid
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
boolean propertyValue = uRL_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2023


URL.join Method

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Join this URL with the given path and return the resulting URL. The operation does not alter the current URL. Join inserts a slash '/' to properly extend the path, so that "http://foo".join("bar") will return "http://foo/bar", not "http://foobar".

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.
returnValue = uRL_var.join(path)
"uRL_var" is a variable referencing a URL object.

#include <Core/Application/URL.h>

returnValue = uRL_var->join(path);

Return Value

Type | Description
URL | Returns the joined URL.

Parameters

Name | Type | Description
path | string | The path to join to this URL.

Version

Introduced in version April 2023


URL.leafName Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Get the leaf name of the URL, which is the section behind the last '/'.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.leafName
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
string propertyValue = uRL_var->leafName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


URL.objectType Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.objectType
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
string propertyValue = uRL_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


URL.parent Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Get the parent URL, represented by the section before the last '/'.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.parent
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
Ptr<URL> propertyValue = uRL_var->parent();

Property Value

This is a read only property whose value is a URL.

Version

Introduced in version April 2023


URL.pathName Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Get the path name of the URL, including the last '/' of the protocol followed by the path of the URL.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.pathName
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
string propertyValue = uRL_var->pathName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


URL.protocol Property

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Get the protocol scheme of the URL, including the final ':'.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.

# Get the value of the property.
propertyValue = uRL_var.protocol
"uRL_var" is a variable referencing a URL object.
#include <Core/Application/URL.h>

// Get the value of the property.
string propertyValue = uRL_var->protocol();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2023


URL.toString Method

Parent Object: URL
Defined in namespace "adsk::core" and the header file is <Core/Application/URL.h>

Description

Get the entire URL as string.

Syntax

  • Python
  • C++
"uRL_var" is a variable referencing a URL object.
returnValue = uRL_var.toString()
"uRL_var" is a variable referencing a URL object.

#include <Core/Application/URL.h>

returnValue = uRL_var->toString();

Return Value

Type | Description
string | Returns the entire URL as string.

Version

Introduced in version April 2023


USDExportOptions Object

Derived from: ExportOptions Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

Description

Defines that an USD export is to be done and specifies the various options.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ExportManager.createUSDExportOptions

Version

Introduced in version March 2022


USDExportOptions.classType Method

Parent Object: USDExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.USDExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/USDExportOptions.h>

returnValue = adsk::fusion::USDExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2022


USDExportOptions.filename Property

Parent Object: USDExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

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.

Syntax

  • Python
  • C++
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.

# Get the value of the property.
propertyValue = uSDExportOptions_var.filename

# Set the value of the property.
uSDExportOptions_var.filename = propertyValue
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.
#include <Fusion/Fusion/USDExportOptions.h>

// Get the value of the property.
string propertyValue = uSDExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = uSDExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2022


USDExportOptions.geometry Property

Parent Object: USDExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

Description

Specifies the geometry to export. This can be an Occurrence, or the root Component. For STL, OBJ, and 3MF export, it can be a BRepBody. For DXF export, it can be a sketch of flat pattern.

Syntax

  • Python
  • C++
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.

# Get the value of the property.
propertyValue = uSDExportOptions_var.geometry

# Set the value of the property.
uSDExportOptions_var.geometry = propertyValue
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.
#include <Fusion/Fusion/USDExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = uSDExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = uSDExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2022


USDExportOptions.isValid Property

Parent Object: USDExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.

# Get the value of the property.
propertyValue = uSDExportOptions_var.isValid
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.
#include <Fusion/Fusion/USDExportOptions.h>

// Get the value of the property.
boolean propertyValue = uSDExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2022


USDExportOptions.objectType Property

Parent Object: USDExportOptions
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/USDExportOptions.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.

# Get the value of the property.
propertyValue = uSDExportOptions_var.objectType
"uSDExportOptions_var" is a variable referencing a USDExportOptions object.
#include <Fusion/Fusion/USDExportOptions.h>

// Get the value of the property.
string propertyValue = uSDExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2022


User Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

A class that represents a Fusion User

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 UI)
email | Get the email associated with this users Fusion 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 user name associated with this user's Autodesk account

Accessed From

Application.currentUser, DataFile.createdBy, DataFile.inUseBy, DataFile.lastUpdatedBy, DesignDataFile.createdBy, DesignDataFile.inUseBy, DesignDataFile.lastUpdatedBy

Version

Introduced in version January 2016


User.classType Method

Parent Object: User
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

Returns display name of the user. (i.e. the name that shows up in the Fusion UI)

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

Get the email associated with this users Fusion account

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/User.h>

Description

Returns the user name associated with this user's Autodesk account

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Provides access to the user-interface related objects and functionality.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createCloudFileDialog | Creates a new CloudFileDialog object which provides the ability to show a file selection dialog to the user that allows them to choose a file from Fusion web client.
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.
getText | Get the localized text for a specific application text string. The strings used by Fusion are stored in localized XML files that are installed with Fusion. On Windows, you can find them here: %LocalAppData%\Autodesk\webdeploy\production\VERSION_CODE\StringTable And on Mac, you can find them here: ~/Library/Application Support/Autodesk/webdeploy/production/VERSION_CODE/Autodesk Fusion.app/Contents/Libraries/Neutron/StringTable There is a folder for each language that Fusion supports, and the strings for that language are defined in files within that folder. Fusion will use the language specified by the user in their preferences.
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 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.
activeToolbar | Retrieve the active Toolbar being displayed in the user interface.
activeToolbarTab | Retrieve the active ToolbarTab being displayed in the user interface. This may be null.
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.
isUIEnabled | Gets and sets if the Fusion user interface is enabled or not. By default it is enabled allowing the user to interact with Fusion. When set to false, the UI is disabled which blocks all interaction, including running commands, manipulating the view and interacting with the browser.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
palettes | Returns the collection object that provides access to all of the existing palettes and provides the functionality to create new custom palettes.
progressBar | Gets the ProgressBar object that can be used to display a progress bar in the lower-right corner of the Fusion window.
statusMessage Gets and sets the current message displayed in the lower-right corner of the Fusion window. This is useful when displaying progress information to the user for the current process. Set the value to an empty string to remove the message. The lifetime of your message is indeterminant because Fusion uses the same field to display messages.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.

The ProgressBar can also be used as a way to communicate to the user the current progress of a running process.
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
activeSelectionChanged | This event fires whenever the contents of the active selection changes. This occurs as the user selects or unselects entities while using the Fusion Select command. The Select command is the default command that is always running if no other command is active. Pressing Escape terminates the currently active command and starts the Select command. If the Select command is running and you press Escape, it terminates the current Select command and starts a new one. This event is only associated with the selection associated with the Select command and does not fire when any other command is running. The event fires when there is any change to the active selection, including when the selection is cleared when the Select command is terminated. It is also fired when the user clicks in an open area of the canvas to clear the current selection.
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. 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 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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>
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


UserInterface.activeCommand Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets the id of the command definition from the active command (the one that is currently running)

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.activeSelectionChanged Event

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

This event fires whenever the contents of the active selection changes. This occurs as the user selects or unselects entities while using the Fusion Select command. The Select command is the default command that is always running if no other command is active. Pressing Escape terminates the currently active command and starts the Select command. If the Select command is running and you press Escape, it terminates the current Select command and starts a new one.

This event is only associated with the selection associated with the Select command and does not fire when any other command is running. The event fires when there is any change to the active selection, including when the selection is cleared when the Select command is terminated. It is also fired when the user clicks in an open area of the canvas to clear the current selection.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_activeSelectionChanged" is the event handler function.
futil.add_handler(userInterface_var.activeSelectionChanged, userInterface_activeSelectionChanged, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the activeSelectionChanged event.
def userInterface_activeSelectionChanged(args: adsk.core.ActiveSelectionEventArgs):
    # Code to react to the event.
    app.log('In userInterface_activeSelectionChanged event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyActiveSelectionChangedHandler" is the name of the class that handles the event.
onActiveSelectionChanged = MyActiveSelectionChangedHandler()
userInterface_var.activeSelectionChanged.add(onActiveSelectionChanged)
handlers.append(onActiveSelectionChanged)

-------- Event handler class definition ---------
# Event handler for the activeSelectionChanged event.
class MyActiveSelectionChangedHandler(adsk.core.ActiveSelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ActiveSelectionEventArgs):
        # Code to react to the event.
        app.log('In MyActiveSelectionChangedHandler event handler.')
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ActiveSelectionEvent.h>
#include <Core/UserInterface/ActiveSelectionEventHandler.h>
#include <Core/UserInterface/ActiveSelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the activeSelectionChanged event.
class MyActiveSelectionChangedEventHandler : public adsk::core::ActiveSelectionEventHandler
{
public:
    void notify(const Ptr<ActiveSelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyActiveSelectionChangedEventHandler event handler.");
    }
} _activeSelectionChanged;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<ActiveSelectionEvent> activeSelectionChangedEvent = userInterface_var->activeSelectionChanged();
if (!activeSelectionChangedEvent)
    return;

bool isOk = activeSelectionChangedEvent->add(&_activeSelectionChanged);
if (!isOk)
    return;

Property Value

This is an event property that returns an ActiveSelectionEvent.

Version

Introduced in version August 2020


UserInterface.activeSelections Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets the current set of selected objects.

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.activeToolbar Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Retrieve the active Toolbar being displayed in the user interface.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.activeToolbar
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Toolbar> propertyValue = userInterface_var->activeToolbar();

Property Value

This is a read only property whose value is a Toolbar.

Version

Introduced in version May 2024


UserInterface.activeToolbarTab Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Retrieve the active ToolbarTab being displayed in the user interface. This may be null.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.activeToolbarTab
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<ToolbarTab> propertyValue = userInterface_var->activeToolbarTab();

Property Value

This is a read only property whose value is a ToolbarTab.

Version

Introduced in version May 2024


UserInterface.activeWorkspace Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the toolbar panels. This returns all of the panels available, regardless of which workspace or product they're associated with.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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 June 2015


UserInterface.allToolbarTabs Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the toolbar tabs. This returns all of the tabs available, regardless of which workspace or product they're associated with.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The commandCreated event fires immediately after the command is created.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_commandCreated" is the event handler function.
futil.add_handler(userInterface_var.commandCreated, userInterface_commandCreated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the commandCreated event.
def userInterface_commandCreated(args: adsk.core.ApplicationCommandEventArgs):
    # Code to react to the event.
    app.log('In userInterface_commandCreated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyCommandCreatedHandler" is the name of the class that handles the event.
onCommandCreated = MyCommandCreatedHandler()
userInterface_var.commandCreated.add(onCommandCreated)
handlers.append(onCommandCreated)

-------- Event handler class definition ---------
# Event handler for the commandCreated event.
class MyCommandCreatedHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ApplicationCommandEventArgs):
        # Code to react to the event.
        app.log('In MyCommandCreatedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the command definitions currently defined. This is all command definitions both internal and those defined through the API.

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. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


UserInterface.commandStarting Event

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

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.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_commandStarting" is the event handler function.
futil.add_handler(userInterface_var.commandStarting, userInterface_commandStarting, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the commandStarting event.
def userInterface_commandStarting(args: adsk.core.ApplicationCommandEventArgs):
    # Code to react to the event.
    app.log('In userInterface_commandStarting event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyCommandStartingHandler" is the name of the class that handles the event.
onCommandStarting = MyCommandStartingHandler()
userInterface_var.commandStarting.add(onCommandStarting)
handlers.append(onCommandStarting)

-------- Event handler class definition ---------
# Event handler for the commandStarting event.
class MyCommandStartingHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ApplicationCommandEventArgs):
        # Code to react to the event.
        app.log('In MyCommandStartingHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets an event that is fired when a command is terminated.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_commandTerminated" is the event handler function.
futil.add_handler(userInterface_var.commandTerminated, userInterface_commandTerminated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the commandTerminated event.
def userInterface_commandTerminated(args: adsk.core.ApplicationCommandEventArgs):
    # Code to react to the event.
    app.log('In userInterface_commandTerminated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyCommandTerminatedHandler" is the name of the class that handles the event.
onCommandTerminated = MyCommandTerminatedHandler()
userInterface_var.commandTerminated.add(onCommandTerminated)
handlers.append(onCommandTerminated)

-------- Event handler class definition ---------
# Event handler for the commandTerminated event.
class MyCommandTerminatedHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.ApplicationCommandEventArgs):
        # Code to react to the event.
        app.log('In MyCommandTerminatedHandler event handler.')
--------- 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.createCloudFileDialog Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Creates a new CloudFileDialog object which provides the ability to show a file selection dialog to the user that allows them to choose a file from Fusion web client.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.createCloudFileDialog()
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->createCloudFileDialog();

Return Value

Type | Description
CloudFileDialog | Returns the created CloudFileDialog object that you can use to define the contents of and display a standard file dialog.

Version

Introduced in version October 2022


UserInterface.createFileDialog Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Creates a new FileDialog object which provides the ability to show a standard file selection dialog to the user.

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.

Version

Introduced in version August 2014


UserInterface.createFolderDialog Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Creates a new FolderDialog object which provides the ability to show a standard folder selection dialog to the user.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Creates a new ProgressDialog object that you can use to display and control a progress dialog.

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 API Sample | 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.getText Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Get the localized text for a specific application text string. The strings used by Fusion are stored in localized XML files that are installed with Fusion. On Windows, you can find them here:

%LocalAppData%\Autodesk\webdeploy\production\VERSION_CODE\StringTable

And on Mac, you can find them here:

~/Library/Application Support/Autodesk/webdeploy/production/VERSION_CODE/Autodesk Fusion.app/Contents/Libraries/Neutron/StringTable

There is a folder for each language that Fusion supports, and the strings for that language are defined in files within that folder. Fusion will use the language specified by the user in their preferences.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.getText(module, id, defaultValue)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->getText(module, id, defaultValue);

Return Value

Type | Description
string | The localized string or the defaultValue if one is not found.

Parameters

Name | Type | Description
module | string | The module name. This is the same as the StringTable .xml filename without the .xml extension and without the version number. For example, the file NaFusionUI10.xml contains many of the strings used for Fusion's modeling commands. When specifying the module, this is specified as "NaFusionUI".
id | string | The id of the text. This is the same as the 'commandName' field in the StringTable .xml file.
defaultValue | string | A default string value to return if the module or string id is not found in the current locale.

Version

Introduced in version March 2021


UserInterface.inputBox Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Displays a modal dialog to get string input from the user.

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 canceled 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 canceled.
title | string | Sets the title for the dialog if specified, otherwise the script or add-in 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Returns true if Tabbed Toolbars are being used.

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.

Version

Introduced in version August 2019


UserInterface.isUIEnabled Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets and sets if the Fusion user interface is enabled or not. By default it is enabled allowing the user to interact with Fusion. When set to false, the UI is disabled which blocks all interaction, including running commands, manipulating the view and interacting with the browser.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.isUIEnabled

# Set the value of the property.
userInterface_var.isUIEnabled = propertyValue
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
boolean propertyValue = userInterface_var->isUIEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = userInterface_var->isUIEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2025


UserInterface.isValid Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

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. 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 will then display the marking and context menu that you've customized. If either one is empty it will not be displayed.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_markingMenuDisplaying" is the event handler function.
futil.add_handler(userInterface_var.markingMenuDisplaying, userInterface_markingMenuDisplaying, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the markingMenuDisplaying event.
def userInterface_markingMenuDisplaying(args: adsk.core.MarkingMenuEventArgs):
    # Code to react to the event.
    app.log('In userInterface_markingMenuDisplaying event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyMarkingMenuDisplayingHandler" is the name of the class that handles the event.
onMarkingMenuDisplaying = MyMarkingMenuDisplayingHandler()
userInterface_var.markingMenuDisplaying.add(onMarkingMenuDisplaying)
handlers.append(onMarkingMenuDisplaying)

-------- Event handler class definition ---------
# Event handler for the markingMenuDisplaying event.
class MyMarkingMenuDisplayingHandler(adsk.core.MarkingMenuEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.MarkingMenuEventArgs):
        # Code to react to the event.
        app.log('In MyMarkingMenuDisplayingHandler event handler.')
--------- 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 API Sample | Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Version

Introduced in version January 2017


UserInterface.messageBox Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Display a modal message box with the provided text.

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 script or add-in 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 MessageBoxButtonTypes.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 MessageBoxIconTypes.NoIconIconType.

Version

Introduced in version August 2014


UserInterface.objectType Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Returns the collection object that provides access to all of the existing palettes and provides the functionality to create new custom palettes.

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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
   <head>
   </head>
   <body>
       <p>Click the button below to send data to Fusion.</p>
       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
       <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
       <br /><br />

   </body>
   <script>
       function sendInfoToFusion(){
           var today = new Date();
           var dd = String(today.getDate()).padStart(2, '0');
           var mm = String(today.getMonth() + 1).padStart(2, '0');
           var yyyy = today.getFullYear();

           var hours = String(today.getHours()).padStart(2, '0');
           var minutes = String(today.getMinutes()).padStart(2, '0');
           var seconds = String(today.getSeconds()).padStart(2, '0');

           var date = dd + '/' + mm + '/' + yyyy;
           var time = hours + ':' + minutes + ':' + seconds;
           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.progressBar Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets the ProgressBar object that can be used to display a progress bar in the lower-right corner of the Fusion window.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.progressBar
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<ProgressBar> propertyValue = userInterface_var->progressBar();

Property Value

This is a read only property whose value is a ProgressBar.

Version

Introduced in version May 2024


UserInterface.selectEntity Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Supports the selection of a single entity. This provides a simple way to prompt the user for for a selection in a script. If you need more control over the selection a command should be created and a SelectionCommandInput used.

Remarks

The selectEntity method is not supported within any of the Command related events.

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. Asserts if the selection is 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.statusMessage Property

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets and sets the current message displayed in the lower-right corner of the Fusion window. This is useful when displaying progress information to the user for the current process. Set the value to an empty string to remove the message. The lifetime of your message is indeterminant because Fusion uses the same field to display messages.

If your process is running in the main thread of Fusion, you will need to call adsk.doEvents to give control back to Fusion, so it can update the UI.

The ProgressBar can also be used as a way to communicate to the user the current progress of a running process.

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.statusMessage

# Set the value of the property.
userInterface_var.statusMessage = propertyValue
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
string propertyValue = userInterface_var->statusMessage();

// Set the value of the property, where value_var is a string.
bool returnValue = userInterface_var->statusMessage(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2024


UserInterface.terminateActiveCommand Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Method that causes the currently active (running) command to be terminated

Remarks

The terminateActiveCommand method is not supported within any of the Command related events because it results in the termination of the current command, which is your running command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the toolbar panels associated with the specified product.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets a collection that provides access to the toolbars. This includes the left and right QAT, and the Navbar.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


UserInterface.toolbarTabsByProductType Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the toolbar tabs associated with the specified product.

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.

Version

Introduced in version August 2019


UserInterface.workspaceActivated Event

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The workspaceActivated event fires at the VERY end of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_workspaceActivated" is the event handler function.
futil.add_handler(userInterface_var.workspaceActivated, userInterface_workspaceActivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the workspaceActivated event.
def userInterface_workspaceActivated(args: adsk.core.WorkspaceEventArgs):
    # Code to react to the event.
    app.log('In userInterface_workspaceActivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyWorkspaceActivatedHandler" is the name of the class that handles the event.
onWorkspaceActivated = MyWorkspaceActivatedHandler()
userInterface_var.workspaceActivated.add(onWorkspaceActivated)
handlers.append(onWorkspaceActivated)

-------- Event handler class definition ---------
# Event handler for the workspaceActivated event.
class MyWorkspaceActivatedHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WorkspaceEventArgs):
        # Code to react to the event.
        app.log('In MyWorkspaceActivatedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The workspaceDeactivated event fires at the VERY end of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_workspaceDeactivated" is the event handler function.
futil.add_handler(userInterface_var.workspaceDeactivated, userInterface_workspaceDeactivated, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the workspaceDeactivated event.
def userInterface_workspaceDeactivated(args: adsk.core.WorkspaceEventArgs):
    # Code to react to the event.
    app.log('In userInterface_workspaceDeactivated event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyWorkspaceDeactivatedHandler" is the name of the class that handles the event.
onWorkspaceDeactivated = MyWorkspaceDeactivatedHandler()
userInterface_var.workspaceDeactivated.add(onWorkspaceDeactivated)
handlers.append(onWorkspaceDeactivated)

-------- Event handler class definition ---------
# Event handler for the workspaceDeactivated event.
class MyWorkspaceDeactivatedHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WorkspaceEventArgs):
        # Code to react to the event.
        app.log('In MyWorkspaceDeactivatedHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The workspacePreActivate event fires at the VERY start of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_workspacePreActivate" is the event handler function.
futil.add_handler(userInterface_var.workspacePreActivate, userInterface_workspacePreActivate, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the workspacePreActivate event.
def userInterface_workspacePreActivate(args: adsk.core.WorkspaceEventArgs):
    # Code to react to the event.
    app.log('In userInterface_workspacePreActivate event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyWorkspacePreActivateHandler" is the name of the class that handles the event.
onWorkspacePreActivate = MyWorkspacePreActivateHandler()
userInterface_var.workspacePreActivate.add(onWorkspacePreActivate)
handlers.append(onWorkspacePreActivate)

-------- Event handler class definition ---------
# Event handler for the workspacePreActivate event.
class MyWorkspacePreActivateHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WorkspaceEventArgs):
        # Code to react to the event.
        app.log('In MyWorkspacePreActivateHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

The workspacePreDeactivate event fires at the VERY start of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Syntax

  • Python Using fusion360utils
  • Python
  • C++
-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "userInterface_workspacePreDeactivate" is the event handler function.
futil.add_handler(userInterface_var.workspacePreDeactivate, userInterface_workspacePreDeactivate, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the workspacePreDeactivate event.
def userInterface_workspacePreDeactivate(args: adsk.core.WorkspaceEventArgs):
    # Code to react to the event.
    app.log('In userInterface_workspacePreDeactivate event handler.')
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
# "MyWorkspacePreDeactivateHandler" is the name of the class that handles the event.
onWorkspacePreDeactivate = MyWorkspacePreDeactivateHandler()
userInterface_var.workspacePreDeactivate.add(onWorkspacePreDeactivate)
handlers.append(onWorkspacePreDeactivate)

-------- Event handler class definition ---------
# Event handler for the workspacePreDeactivate event.
class MyWorkspacePreDeactivateHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.WorkspaceEventArgs):
        # Code to react to the event.
        app.log('In MyWorkspacePreDeactivateHandler event handler.')
--------- 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Gets all of the workspaces currently available.

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
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


UserInterface.workspacesByProductType Method

Parent Object: UserInterface
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterface.h>

Description

Returns all of the workspaces associated with the specified product.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

A UserInterfaceGeneralEvent is used for user-interface related events that don't require any additional information beyond getting the event itself.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

Add a handler to be notified when the event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

Description

The UserInterfaceGeneralEventArgs is passed when a UserInterfaceGeneralEvent is fired.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs.classType Method

Parent Object: UserInterfaceGeneralEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventHandler.h>

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.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version March 2017


UserInterfaceGeneralEventHandler.notify Method

Parent Object: UserInterfaceGeneralEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/UserInterfaceGeneralEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"userInterfaceGeneralEventHandler_var" is a variable referencing a UserInterfaceGeneralEventHandler object.
returnValue = userInterfaceGeneralEventHandler_var.notify(eventArgs)
"userInterfaceGeneralEventHandler_var" is a variable referencing a UserInterfaceGeneralEventHandler object.

#include <Core/UserInterface/UserInterfaceGeneralEventHandler.h>

returnValue = 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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Represents a User Parameter.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
dependencyParameters | Returns a list of parameters that this parameter is dependent on.
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.
entityToken Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
expression Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".
isDeletable | Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 of the parameter

Accessed From

UserParameters.add, UserParameters.asArray, UserParameters.item, UserParameters.itemByName

Version

Introduced in version August 2014


UserParameter.attributes Property

Parent Object: UserParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

The comment associated with this parameter

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Deletes the user parameter A parameter can only be deleted if it is a UserParameter and it is not referenced by other parameters.

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.dependencyParameters Property

Parent Object: UserParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns a list of parameters that this parameter is dependent on.

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.dependencyParameters
"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->dependencyParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version May 2022


UserParameter.dependentParameters Property

Parent Object: UserParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns the Design containing the UserParameter.

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.entityToken Property

Parent Object: UserParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns a token for the Parameter object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same parameter.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.entityToken
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


UserParameter.expression Property

Parent Object: UserParameter
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Gets and sets the expression used to calculate the value of the parameter. This is the equivalent of the "Expression" column in the Parameters dialog. Numeric parameters can be defined by a simple expression like "6.25", which will be interpreted based on whatever the default units are for the document. For example, if the units are set to millimeters, the value will be 6.25 mm; if the units are inches, it will be 6.25 inches. The expression can also contain the units so "6.25 in" will always be evaluated as inches regardless of the document units.

An expression can also contain references to other parameters and use equations. For example, the expression "Length / 2" is valid for a numeric parameter as long as there is a numeric parameter named "Length".

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Gets if this parameter can be deleted. Parameters that have dependents cannot be deleted, and model parameters typically cannot be deleted. However, there is the possibility in uncommon workflows where a model parameter no longer has any dependents, and it was not automatically deleted. In this case, this property will return true, and the deleteMe method can delete the parameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Returns the Collection containing the UserParameter.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameter.h>

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value of the parameter

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Provides access to the User Parameters within a design and provides methods to create new user parameters.

Methods

Name | Description
add | Adds a new user parameter to the collection.
asArray | Returns the user parameters in the design as an 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().
exportUserParameters | Function that exports a list of user parameters to a csv file.
importUserParameters | Function that imports a list of user parameters from a csv file. The format of the csv file is as follows: It must have at least two rows - Header followed by a row of parameter. It must be encoded in UTF8 format. It must contain at least six columns - name, unit, expression, value, comment, and favorite where favorite is either true or false. The columns must only have a comma delimiter. Any locale will work but no thousands. expression column support double quotes. comment can either be single line or multi line. If multi line, it must be in double quotes. Here is an example of a csv file with two rows Name,Unit,Expression,Value,Comments,Favorite p1,mm,32 mm,32,the first parameter,FALSE The function exportUserParameters could be used to see what a csv file looks like.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Design.userParameters, FlatPatternProduct.userParameters, UserParameter.userParameters, WorkingModel.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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Adds a new user parameter to the collection.

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 value of the parameter. 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 the "units" argument is any valid length unit, the value will be interpreted as 5 centimeters since centimeters is the internal unit for lengths. If the "units" argument is a valid angle unit 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 if there are units as part of the string it must evaluate to the same unit type as that specified by the "units" argument and if no units are 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 ValueInput was created with the string "5", any unit type can be used and the result will be 5 of that unit.

When using a ValueInput created using a string, it's the same as creating a parameter 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.
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.asArray Method

Parent Object: UserParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Returns the user parameters in the design as an array.

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.asArray()
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->asArray();

Return Value

Type | Description
UserParameter[] | Returns an array of the user parameters in the design.

Version

Introduced in version September 2024


UserParameters.classType Method

Parent Object: UserParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Returns the number of parameters in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Returns the design that owns the user parameters collection.

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.exportUserParameters Method

Parent Object: UserParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Function that exports a list of user parameters to a csv file.

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.exportUserParameters(userParameterArray, filename)
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->exportUserParameters(userParameterArray, filename);

Return Value

Type | Description
boolean | Returns whether the export was successful.

Parameters

Name | Type | Description
userParameterArray | UserParameter[] | The array of user parameters to export.
filename | string | The full filename (path and file) of the file to write the parameters to.

Version

Introduced in version September 2024


UserParameters.importUserParameters Method

Parent Object: UserParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Function that imports a list of user parameters from a csv file.

The format of the csv file is as follows: It must have at least two rows - Header followed by a row of parameter. It must be encoded in UTF8 format. It must contain at least six columns - name, unit, expression, value, comment, and favorite where favorite is either true or false. The columns must only have a comma delimiter. Any locale will work but no thousands. expression column support double quotes. comment can either be single line or multi line. If multi line, it must be in double quotes.

Here is an example of a csv file with two rows Name,Unit,Expression,Value,Comments,Favorite p1,mm,32 mm,32,the first parameter,FALSE

The function exportUserParameters could be used to see what a csv file looks like.

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.importUserParameters(filename)
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->importUserParameters(filename);

Return Value

Type | Description
boolean | Returns whether the import was successful.

Parameters

Name | Type | Description
filename | string | The full filename (path and file) of the file to read the parameters from.

Version

Introduced in version September 2024


UserParameters.isValid Property

Parent Object: UserParameters
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Function that returns the specified User Parameter using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

Function that returns the specified User Parameter using the name of the parameter as it is displayed in the parameters dialog.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/UserParameters.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

An event endpoint that supports the connection to client implemented ValidateInputsEventHandlers.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

Adds an event handler to this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

Removes a handler from this event endpoint.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

Provides a set of arguments from a firing ValidateInputsEvent to a ValidateInputsEventHandler's notify callback method.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 with AreInputsValid event to specify if the all of the inputs for the command are valid or not. If you set this to false, indicating they are not valid, the OK button for the dialog is disabled forcing the user to correct the inputs before continuing. If you set this to true the OK button will be enabled, as long as the inputs satisfy their own requirements. For example, if a SelectionCommandInput is defined to have at minimum number of entities selected, that requirement must be met, or if a ValueCommandInput has an invalid value specified, the OK button will still be disabled.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Version

Introduced in version August 2014


ValidateInputsEventArgs.areInputsValid Property

Parent Object: ValidateInputsEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

Used with AreInputsValid event to specify if the all of the inputs for the command are valid or not. If you set this to false, indicating they are not valid, the OK button for the dialog is disabled forcing the user to correct the inputs before continuing. If you set this to true the OK button will be enabled, as long as the inputs satisfy their own requirements. For example, if a SelectionCommandInput is defined to have at minimum number of entities selected, that requirement must be met, or if a ValueCommandInput has an invalid value specified, the OK button will still be disabled.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

Returns the collection of command inputs that are associated with the command this event is being fired for.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventHandler.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValidateInputsEventHandler.h>

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Syntax

  • Python
  • C++
"validateInputsEventHandler_var" is a variable referencing a ValidateInputsEventHandler object.
returnValue = validateInputsEventHandler_var.notify(eventArgs)
"validateInputsEventHandler_var" is a variable referencing a ValidateInputsEventHandler object.

#include <Core/UserInterface/ValidateInputsEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Provides a command input to get a unit based value from the user.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 input.

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.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.
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.
isMaximumInclusive Gets and sets if the maximum value can be equal to the value defined by the maximumValue property or if it must be less than the maximum.

When a new ValueCommandInput is created, this defaults to true.
isMaximumLimited Gets and sets whether the maximum value has a limit. The maximum limit is set using the maximumValue property, and the isMaximumInclusive property controls whether the maximum includes the maximum value or must be less than the maximum.

When a new ValueCommandInput is created this defaults to false so there is no limit.
isMinimumInclusive Gets and sets if the minimum value can be equal to the value defined by the minimumValue property or if it must be greater than.

When a new ValueCommandInput is created, this defaults to true.
isMinimumLimited Gets and sets whether the minimum value has a limit. The minimum limit is set using the minimumValue property, and the isMinimumInclusive property controls whether the minimum includes the minimum value or must be greater than the minimum.

When a new ValueCommandInput is created this defaults to false so there is no limit.
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.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.
maximumValue | Gets and sets the maximum value for the input. Setting this value will automatically set the isMaximumLimited property to true, enabling the use of the maximum value. Use the isMaximumInclusive property to control if the maximum can be equal to this value or must be less than the maximum.
minimumValue | Gets and sets the minimum value for the input. Setting this value will automatically set the isMinimumLimited property to true, enabling the use of the minimum value. Use the isMinimumInclusive property to control if the minimum can be equal to this value or must be greater than the minimum.
name | Gets the user visible name of this input.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there 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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

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.deleteMe Method

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Deletes this Command input.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
returnValue = valueCommandInput_var.deleteMe()
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

#include <Core/UserInterface/ValueCommandInput.h>

returnValue = valueCommandInput_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2020


ValueCommandInput.expression Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets the unique identifier for this input in the command's CommandInputs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Currently, the isEnabled property does not disable SelectionCommandInput objects but instead has the same effect as the SelectionCommandInput.hasFocus property.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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.isMaximumInclusive Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets if the maximum value can be equal to the value defined by the maximumValue property or if it must be less than the maximum.

When a new ValueCommandInput is created, this defaults to true.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isMaximumInclusive

# Set the value of the property.
valueCommandInput_var.isMaximumInclusive = 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->isMaximumInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isMaximumInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


ValueCommandInput.isMaximumLimited Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets whether the maximum value has a limit. The maximum limit is set using the maximumValue property, and the isMaximumInclusive property controls whether the maximum includes the maximum value or must be less than the maximum.

When a new ValueCommandInput is created this defaults to false so there is no limit.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isMaximumLimited

# Set the value of the property.
valueCommandInput_var.isMaximumLimited = 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->isMaximumLimited();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isMaximumLimited(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


ValueCommandInput.isMinimumInclusive Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets if the minimum value can be equal to the value defined by the minimumValue property or if it must be greater than.

When a new ValueCommandInput is created, this defaults to true.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isMinimumInclusive

# Set the value of the property.
valueCommandInput_var.isMinimumInclusive = 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->isMinimumInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isMinimumInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


ValueCommandInput.isMinimumLimited Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets whether the minimum value has a limit. The minimum limit is set using the minimumValue property, and the isMinimumInclusive property controls whether the minimum includes the minimum value or must be greater than the minimum.

When a new ValueCommandInput is created this defaults to false so there is no limit.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isMinimumLimited

# Set the value of the property.
valueCommandInput_var.isMinimumLimited = 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->isMinimumLimited();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isMinimumLimited(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2022


ValueCommandInput.isValid Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets or sets if this input will be visible to the user.

Setting a SelectionCommandInput to be invisible will clear any selections it currently has.

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.maximumValue Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets the maximum value for the input. Setting this value will automatically set the isMaximumLimited property to true, enabling the use of the maximum value. Use the isMaximumInclusive property to control if the maximum can be equal to this value or must be less than the maximum.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.maximumValue

# Set the value of the property.
valueCommandInput_var.maximumValue = 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->maximumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = valueCommandInput_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


ValueCommandInput.minimumValue Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets the minimum value for the input. Setting this value will automatically set the isMinimumLimited property to true, enabling the use of the minimum value. Use the isMinimumInclusive property to control if the minimum can be equal to this value or must be greater than the minimum.

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.minimumValue

# Set the value of the property.
valueCommandInput_var.minimumValue = 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->minimumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = valueCommandInput_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2022


ValueCommandInput.name Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets the user visible name of this input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets the parent Command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if there is no parent.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets and sets the unit type that is used when evaluating the user's input.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

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.

Remarks

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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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 diameter, etc.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 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 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 (i.e. "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 expression 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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

Arrange2DEnvelopeInput.frameWidth, Arrange2DEnvelopeInput.objectSpacing, Arrange2DEnvelopeInput.placementClearance, Arrange2DPlaneEnvelopeInput.envelopeSpacing, Arrange2DPlaneEnvelopeInput.frameWidth, Arrange2DPlaneEnvelopeInput.length, Arrange2DPlaneEnvelopeInput.objectSpacing, Arrange2DPlaneEnvelopeInput.originXOffset, Arrange2DPlaneEnvelopeInput.originYOffset, Arrange2DPlaneEnvelopeInput.placementClearance, Arrange2DPlaneEnvelopeInput.quantity, Arrange2DPlaneEnvelopeInput.width, Arrange2DProfileOrFaceEnvelopeInput.frameWidth, Arrange2DProfileOrFaceEnvelopeInput.objectSpacing, Arrange2DProfileOrFaceEnvelopeInput.placementClearance, Arrange3DEnvelopeInput.ceilingClearance, Arrange3DEnvelopeInput.frameWidth, Arrange3DEnvelopeInput.height, Arrange3DEnvelopeInput.length, Arrange3DEnvelopeInput.objectSpacing, Arrange3DEnvelopeInput.originXOffset, Arrange3DEnvelopeInput.originYOffset, Arrange3DEnvelopeInput.placementClearance, Arrange3DEnvelopeInput.width, ArrangeDefinition2DInput.globalQuantity, ArrangeDefinition2DInput.grainDirection, ArrangeEnvelopeInput.frameWidth, ArrangeEnvelopeInput.objectSpacing, ArrangeEnvelopeInput.placementClearance, BossFeatureInput.offset, BossFeatureSideInput.alignmentDepth, BossFeatureSideInput.alignmentDiameter, BossFeatureSideInput.alignmentDraftAngle, BossFeatureSideInput.alignmentRootRadius, BossFeatureSideInput.alignmentTipRadius, BossFeatureSideInput.diameter, BossFeatureSideInput.draftAngle, BossFeatureSideInput.holeCountersinkAngle, BossFeatureSideInput.holeDepth, BossFeatureSideInput.holeDiameter, BossFeatureSideInput.holeDraftAngle, BossFeatureSideInput.holeEndRadius, BossFeatureSideInput.holeMajorDepth, BossFeatureSideInput.holeMajorDiameter, BossFeatureSideInput.holeMajorDraftAngle, BossFeatureSideInput.holeMajorRootRadius, BossFeatureSideInput.holeMajorTipRadius, BossFeatureSideInput.holeStartRadius, BossFeatureSideInput.offsetClearance, BossFeatureSideInput.ribChamferAngle, BossFeatureSideInput.ribCount, BossFeatureSideInput.ribCutSize, BossFeatureSideInput.ribDraftAngle, BossFeatureSideInput.ribLength, BossFeatureSideInput.ribOffset, BossFeatureSideInput.ribOuterDraftAngle, BossFeatureSideInput.ribRootRadius, BossFeatureSideInput.ribRotation, BossFeatureSideInput.ribThickness, BossFeatureSideInput.ribTipRadius, BossFeatureSideInput.ribTotalAngle, BossFeatureSideInput.rootRadius, BossFeatureSideInput.tipRadius, ChordLengthFilletEdgeSetInput.chordLength, ChordLengthFilletEdgeSetInput.tangencyWeight, CircularPatternConstraintInput.quantity, CircularPatternConstraintInput.totalAngle, CircularPatternFeatureInput.quantity, CircularPatternFeatureInput.totalAngle, CoilFeatureInput.angle, CoilFeatureInput.diameter, CoilFeatureInput.height, CoilFeatureInput.pitch, CoilFeatureInput.revolutions, CoilFeatureInput.sectionSize, ConstantRadiusFilletEdgeSetInput.radius, ConstantRadiusFilletEdgeSetInput.tangencyWeight, DraftFeatureInput.angleOne, DraftFeatureInput.angleTwo, ExtendFeatureInput.distance, ExtrudeFeatureInput.taperAngle, ExtrudeFeatureInput.taperAngleOne, ExtrudeFeatureInput.taperAngleTwo, ExtrudeFeatureInput.thinExtrudeWallThicknessOne, ExtrudeFeatureInput.thinExtrudeWallThicknessTwo, FilletEdgeSetInput.tangencyWeight, GeometricRelationship.offsetOrAngleValue, HoleFeatureInput.tipAngle, JointInput.angle, JointInput.offset, JointOriginInput.angle, JointOriginInput.globalOrientParamOne, JointOriginInput.globalOrientParamTwo, JointOriginInput.offsetX, JointOriginInput.offsetY, JointOriginInput.offsetZ, MeshConvertFeatureInput.numberOfFaces, MeshGenerateFaceGroupsFeatureInput.angleThreshold, MeshGenerateFaceGroupsFeatureInput.boundaryTolerance, MeshGenerateFaceGroupsFeatureInput.minimumFaceGroupSize, MeshReduceFeatureInput.facecount, MeshReduceFeatureInput.maximumDeviation, MeshReduceFeatureInput.proportion, MeshRemeshFeatureInput.density, MeshRemeshFeatureInput.shapePreservation, MeshRepairFeatureInput.density, MeshRepairFeatureInput.offset, MeshShellFeatureInput.thickness, MeshSmoothFeatureInput.smoothness, MirrorFeatureInput.stitchTolerance, NamedValues.getByIndex, NamedValues.getValueByName, OffsetConstraintInput.offset, OffsetFeatureInput.distance, PathPatternFeatureInput.distance, PathPatternFeatureInput.quantity, PipeFeatureInput.distanceOne, PipeFeatureInput.distanceTwo, PipeFeatureInput.sectionSize, PipeFeatureInput.sectionThickness, RectangularPatternConstraintInput.distanceOne, RectangularPatternConstraintInput.distanceTwo, RectangularPatternConstraintInput.quantityOne, RectangularPatternConstraintInput.quantityTwo, RectangularPatternFeatureInput.distanceOne, RectangularPatternFeatureInput.distanceTwo, RectangularPatternFeatureInput.quantityOne, RectangularPatternFeatureInput.quantityTwo, RuledSurfaceFeatureInput.angle, RuledSurfaceFeatureInput.distance, ScaleFeatureInput.scaleFactor, ScaleFeatureInput.xScale, ScaleFeatureInput.yScale, ScaleFeatureInput.zScale, ShellFeatureInput.insideThickness, ShellFeatureInput.outsideThickness, StitchFeatureInput.tolerance, SweepFeatureInput.distanceOne, SweepFeatureInput.distanceTwo, SweepFeatureInput.taperAngle, SweepFeatureInput.twistAngle, TessellateFeatureInput.aspectRatio, TessellateFeatureInput.maximumEdgeLength, TessellateFeatureInput.normalDeviation, TessellateFeatureInput.surfaceDeviation, ThickenFeatureInput.thickness, ThreadFeatureInput.threadLength, ThreadFeatureInput.threadOffset, UntrimFeatureInput.extensionDistance, ValueInput.createByBoolean, ValueInput.createByObject, ValueInput.createByReal, ValueInput.createByString, VariableRadiusFilletEdgeSetInput.endRadius, VariableRadiusFilletEdgeSetInput.startRadius, VariableRadiusFilletEdgeSetInput.tangencyWeight, VolumetricModelToMeshFeatureInput.elementSize, VolumetricModelToMeshFeatureInput.smallShellThreshold

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

Creates a new ValueInput object that contains a boolean value.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

Creates a new ValueInput object that contains a reference to any Fusion object.

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 object that you want to create the ValueInput for.

Version

Introduced in version August 2016


ValueInput.createByReal Method

Parent Object: ValueInput
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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 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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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 (i.e. "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 expression to supply the value of an angle, it will fail because the units of the expression define a length.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/ValueInput.h>

Description

Returns the type of value this ValueInput currently represents.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Provides access to the edges and the parameters associated with a variable radius fillet.

Methods

Name | Description
addMidPosition | Creates a new mid position radius on the variable radius edge set. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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().
deleteMe | Deletes the fillet edge set from the fillet. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
deleteMidPosition | Deletes the specified mid position from the variable radius fillet. To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Properties

Name | Description
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.
edges Gets and sets an ObjectCollection containing the edges that are filleted.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.
isTangentChain | Gets and sets the Tangent chain for fillet. This enables tangent chain option for fillet.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
tangencyWeight | Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Accessed From

FilletEdgeSets.addVariableRadiusEdgeSet

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


VariableRadiusFilletEdgeSet.addMidPosition Method

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Creates a new mid position radius on the variable radius edge set.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


VariableRadiusFilletEdgeSet.classType Method

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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.continuity Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.continuity

# Set the value of the property.
variableRadiusFilletEdgeSet_var.continuity = propertyValue
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = variableRadiusFilletEdgeSet_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = variableRadiusFilletEdgeSet_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Samples

Name Description
Fillet Feature Edit API Sample

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2022


VariableRadiusFilletEdgeSet.deleteMe Method

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Deletes the fillet edge set from the fillet.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
returnValue = variableRadiusFilletEdgeSet_var.deleteMe()
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

returnValue = variableRadiusFilletEdgeSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSet.deleteMidPosition Method

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Deletes the specified mid position from the variable radius fillet.

To use this method, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


VariableRadiusFilletEdgeSet.edges Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Gets and sets an ObjectCollection containing the edges that are filleted.

To use this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


VariableRadiusFilletEdgeSet.endRadius Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


VariableRadiusFilletEdgeSet.isTangentChain Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Gets and sets the Tangent chain for fillet. This enables tangent chain option for fillet.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.isTangentChain

# Set the value of the property.
variableRadiusFilletEdgeSet_var.isTangentChain = propertyValue
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = variableRadiusFilletEdgeSet_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = variableRadiusFilletEdgeSet_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2021


VariableRadiusFilletEdgeSet.isValid Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


VariableRadiusFilletEdgeSet.midRadii Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2015


VariableRadiusFilletEdgeSet.objectType Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

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.

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

Demonstrates editing a fillet feature.
To successfully run this sample you can use this Version Introduced in version November 2014


VariableRadiusFilletEdgeSet.tangencyWeight Property

Parent Object: VariableRadiusFilletEdgeSet
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSet.h>

Description

Returns the model parameter that controls the G1 or G2 tangency weight of the fillet. It must be a real value between 0.1 and 2.0 inclusive. You can edit the tangency weight by using the properties on the returned ModelParameter object.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.tangencyWeight
"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->tangencyWeight();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput Object

Derived from: FilletEdgeSetInput Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Provides access to the edges and the parameters associated with a variable radius fillet.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setMidRadii | Defines any additional points along the fillet where a radius is specified.

Properties

Name | Description
continuity | Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.
endRadius Gets and sets 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") or if no units are specified it is interpreted using the current default units for length.
entities | Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
startRadius Gets and sets 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 start 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") or if no units are specified it is interpreted using the current default units for length.
tangencyWeight | Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Accessed From

FilletEdgeSetInputs.addVariableRadiusEdgeSet

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.classType Method

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VariableRadiusFilletEdgeSetInput.classType()
This is a static method.

#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

returnValue = adsk::fusion::VariableRadiusFilletEdgeSetInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.continuity Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Gets and sets the continuity of the fillet edge set. Valid values are TangentSurfaceContinuityType and CurvatureSurfaceContinuityType. The default is TangentSurfaceContinuityType.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.continuity

# Set the value of the property.
variableRadiusFilletEdgeSetInput_var.continuity = propertyValue
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = variableRadiusFilletEdgeSetInput_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = variableRadiusFilletEdgeSetInput_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.endRadius Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Gets and sets 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") or if no units are specified it is interpreted using the current default units for length.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.endRadius

# Set the value of the property.
variableRadiusFilletEdgeSetInput_var.endRadius = propertyValue
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = variableRadiusFilletEdgeSetInput_var->endRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = variableRadiusFilletEdgeSetInput_var->endRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.entities Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Gets and sets the entities associated with this fillet edge set. For constant radius and chord length edge sets, this can be edges, faces, and features. For variable radius edges sets, this must be edges.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.entities

# Set the value of the property.
variableRadiusFilletEdgeSetInput_var.entities = propertyValue
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = variableRadiusFilletEdgeSetInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = variableRadiusFilletEdgeSetInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.isValid Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.isValid
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
boolean propertyValue = variableRadiusFilletEdgeSetInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.objectType Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.objectType
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
string propertyValue = variableRadiusFilletEdgeSetInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.setMidRadii Method

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Defines any additional points along the fillet where a radius is specified.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
returnValue = variableRadiusFilletEdgeSetInput_var.setMidRadii(radii, positions)
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

returnValue = variableRadiusFilletEdgeSetInput_var->setMidRadii(radii, positions);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
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 positions argument. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the 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.
positions | ValueInput[] | An array of ValueInput objects that defines the positions of any additional 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. This array must have the same number of values as the radii argument. If the ValueInput uses a real then it is interpreted as a unitless number. If it is a string then the the string must evaluate to a unitless number.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.startRadius Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Gets and sets 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 start 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") or if no units are specified it is interpreted using the current default units for length.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.startRadius

# Set the value of the property.
variableRadiusFilletEdgeSetInput_var.startRadius = propertyValue
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = variableRadiusFilletEdgeSetInput_var->startRadius();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = variableRadiusFilletEdgeSetInput_var->startRadius(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


VariableRadiusFilletEdgeSetInput.tangencyWeight Property

Parent Object: VariableRadiusFilletEdgeSetInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

Description

Gets and sets the tangency weight for the given edge set. The tangency weight controls the influence of the continuity (G1 or G2) on the fillet. The ValueInput must be a real value between 0.1 and 2.0 inclusive, with no units. The default value is 1.0.

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSetInput_var.tangencyWeight

# Set the value of the property.
variableRadiusFilletEdgeSetInput_var.tangencyWeight = propertyValue
"variableRadiusFilletEdgeSetInput_var" is a variable referencing a VariableRadiusFilletEdgeSetInput object.
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = variableRadiusFilletEdgeSetInput_var->tangencyWeight();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = variableRadiusFilletEdgeSetInput_var->tangencyWeight(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2022


Vector2D Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Add a vector to this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Gets the angle between this vector and another vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Returns the vector values as an array [x, y].

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Return a point with the same x and y values as this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Creates and returns an independent copy of this Vector2D object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Creates a 2D vector object.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Calculates the Dot Product of this vector and an input vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Compare this vector with another to check for equality.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version August 2014


Vector2D.isParallelTo Method

Parent Object: Vector2D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Compare this vector with another to check for parallelism.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Compare this vector with another to check for perpendicularity.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Gets the length of the vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Normalizes the vector. Normalization makes the vector length equal to one. The vector should not be zero length.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Scales the vector by specifying a scaling factor.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Sets the definition of the vector by specifying an array containing the x and y coordinates.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Subtract a vector from this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Transforms the vector by specifying a 2D transformation matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Gets and sets the X coordinate of the vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector2D.h>

Description

Gets and sets the Y coordinate of the vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

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.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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, ArrangeComponent.upDirection, ArrangeComponent.zeroDirection, BallJointMotion.pitchDirectionVector, BallJointMotion.rollDirectionVector, BallJointMotion.yawDirectionVector, BossFeature.direction, 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, LinearMachineAxis.direction, LinearMachineAxisInput.direction, 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, RecognizedHole.axis, RecognizedHoleSegment.axis, 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, Vector3DGraphNodeProperty.value, Viewport.frontEyeDirection, Viewport.frontUpDirection, VolumetricVectorSample.value

Samples

Name | Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.
moveFeatures.add | Demonstrates the moveFeatures.add method.

Version

Introduced in version August 2014


Vector3D.add Method

Parent Object: Vector3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Adds a vector to this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Determines the angle between this vector and the specified vector.

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.

Samples

Name Description
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Version

Introduced in version August 2014


Vector3D.asArray Method

Parent Object: Vector3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Returns the vector coordinates as an array [x, y, z].

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Returns a new point with the same coordinate values as this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Creates a copy of this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Creates a 3D vector object. This object is created statically using the Vector3D.create method.

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.

Samples

Name | Description
moveFeatures.add | Demonstrates the moveFeatures.add method.

Version

Introduced in version August 2014


Vector3D.crossProduct Method

Parent Object: Vector3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Returns the cross product between this vector and the specified vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Returns the dot product between this vector and the specified vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Determines if this vector is equal to the specified vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Determines if the input vector is parallel with this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Determines if the input vector is perpendicular to this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Get the length of this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Makes this vector of unit length. This vector should not be zero length.

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.

Samples

Name Description
Create Setups From Hole Recognition API Sample

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Version

Introduced in version August 2014


Vector3D.objectType Property

Parent Object: Vector3D
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Scale this vector by the specified product.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Reset this vector with the coordinate values in an array [x, y, z].

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Subtract a vector from this vector.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

Transform this vector by the specified matrix.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

The x value.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

The y value.

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
Defined in namespace "adsk::core" and the header file is <Core/Geometry/Vector3D.h>

Description

The z value.

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


Vector3DGraphNodeProperty Object

Vector3DGraphNodeProperty Object Preview

Derived from: GraphNodeProperty Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A property value that is a 3D vector.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
description | Returns the description of this property. This description is localized and can change based on the current language.
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 internal name of the property.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
value | Get or set the value of the property.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.classType Method

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.Vector3DGraphNodeProperty.classType()
This is a static method.

#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

returnValue = adsk::volume::Vector3DGraphNodeProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.description Property

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

Returns the description of this property. This description is localized and can change based on the current language.

Syntax

  • Python
  • C++
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = vector3DGraphNodeProperty_var.description
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.
#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = vector3DGraphNodeProperty_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.isValid Property

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = vector3DGraphNodeProperty_var.isValid
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.
#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

// Get the value of the property.
boolean propertyValue = vector3DGraphNodeProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.name Property

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

Gets the internal name of the property.

Syntax

  • Python
  • C++
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = vector3DGraphNodeProperty_var.name
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.
#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = vector3DGraphNodeProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.objectType Property

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = vector3DGraphNodeProperty_var.objectType
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.
#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

// Get the value of the property.
string propertyValue = vector3DGraphNodeProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


Vector3DGraphNodeProperty.value Property

Parent Object: Vector3DGraphNodeProperty

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/Vector3DGraphNodeProperty.h>

Description

Get or set the value of the property.

Syntax

  • Python
  • C++
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.

# Get the value of the property.
propertyValue = vector3DGraphNodeProperty_var.value

# Set the value of the property.
vector3DGraphNodeProperty_var.value = propertyValue
"vector3DGraphNodeProperty_var" is a variable referencing a Vector3DGraphNodeProperty object.
#include <Volume/Volumetric/Vector3DGraphNodeProperty.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = vector3DGraphNodeProperty_var->value();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = vector3DGraphNodeProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version May 2025


VerticalConstraint Object

Derived from: GeometricConstraint Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

A vertical constraint in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: VerticalConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.entityToken
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
string propertyValue = verticalConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


VerticalConstraint.isDeletable Property

Parent Object: VerticalConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Returns the line being constrained.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

A vertical constraint between two points in a sketch.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
entityToken Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Returns the collection of attributes associated with this geometric constraint.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

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.entityToken Property

Parent Object: VerticalPointsConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Returns a token for the GeometricConstraint object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same geometric constraint.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.entityToken
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
string propertyValue = verticalPointsConstraint_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


VerticalPointsConstraint.isDeletable Property

Parent Object: VerticalPointsConstraint
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Indicates if this constraint is deletable.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Returns the parent sketch object.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Returns the first point.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/VerticalPointsConstraint.h>

Description

Returns the second point.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

A viewport within Fusion. A viewport is the window where the model is displayed.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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.
goHome | Sets the camera of the viewport to the defined "home" position.
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.
resetFront | Resets the front view to be the default front view orientation.
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.
saveAsImageFileWithOptions | 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.
setCurrentAsFront | Sets the "front" view to be the current view orientation.
setCurrentAsHome | Sets the "home" view to be the current view orientation.
setCurrentAsTop | Sets the "top" view to be the current view orientation.
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.
frontEyeDirection | Returns the direction of the front view as defined by the view cube. This vector defines the direction from the eye to the target for the front view.
frontUpDirection | Returns the up direction of the front view as defined by the view cube.
height | Returns the height of the viewport in pixels.
isFullScreen | Gets and sets if the view is in full screen mode.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
modelToViewSpaceTransform | Returns a transformation matrix that defines the transform from model to viewport space.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentDocument | Returns the parent document of this viewport.
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, RenderEventArgs.viewport

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.
Create Animation API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Rigid Group API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Viewport.camera Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

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.

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.
Rendering Sample

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Rigid Group API Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Viewport.classType Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Forces a camera change so that all of the graphics are visible in the viewport.

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.frontEyeDirection Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns the direction of the front view as defined by the view cube. This vector defines the direction from the eye to the target for the front view.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.frontEyeDirection
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = viewport_var->frontEyeDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version October 2022


Viewport.frontUpDirection Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns the up direction of the front view as defined by the view cube.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.frontUpDirection
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = viewport_var->frontUpDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version October 2022


Viewport.goHome Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Sets the camera of the viewport to the defined "home" position.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
# Uses no optional arguments.
returnValue = viewport_var.goHome()

# Uses optional arguments.
returnValue = viewport_var.goHome(transition)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

// Uses no optional arguments.
returnValue = viewport_var->goHome();

// Uses optional arguments.
returnValue = viewport_var->goHome(transition);

Return Value

Type | Description
boolean | Returns true if setting the view orientation was successful.

Parameters

Name | Type | Description
transition | boolean | If this is true it will do a smooth transition from the current camera position to the home position. If false, the view will jump to the home position with no intermediate steps. This is an optional argument whose default value is True.

Version

Introduced in version September 2022


Viewport.height Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns the height of the viewport in pixels.

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.isFullScreen Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Gets and sets if the view is in full screen mode.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.isFullScreen

# Set the value of the property.
viewport_var.isFullScreen = propertyValue
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
boolean propertyValue = viewport_var->isFullScreen();

// Set the value of the property, where value_var is a boolean.
bool returnValue = viewport_var->isFullScreen(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2021


Viewport.isValid Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

A specified point in model space returns the equivalent point in view space.

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.modelToViewSpaceTransform Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns a transformation matrix that defines the transform from model to viewport space.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.modelToViewSpaceTransform
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = viewport_var->modelToViewSpaceTransform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version October 2022


Viewport.objectType Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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.parentDocument Property

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns the parent document of this viewport.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.parentDocument
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
Ptr<Document> propertyValue = viewport_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version September 2022


Viewport.refresh Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

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.

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.resetFront Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Resets the front view to be the default front view orientation.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.resetFront()
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->resetFront();

Return Value

Type | Description
boolean | Returns true if resetting to front was successful.

Version

Introduced in version September 2022


Viewport.saveAsImageFile Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

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.

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 API Sample | 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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.

Version

Introduced in version August 2014


Viewport.saveAsImageFileWithOptions Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

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.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.saveAsImageFileWithOptions(options)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->saveAsImageFileWithOptions(options);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
options | SaveImageFileOptions | A SaveImageFileOptions object that defines the various options that define how the image should be created. The SaveImageFileOptions can be created by using the static create method on the SaveImageFileOptions class.

Version

Introduced in version May 2022


Viewport.screenToView Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Converts a 2D screen point into the equivalent viewport coordinate.

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.setCurrentAsFront Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Sets the "front" view to be the current view orientation.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.setCurrentAsFront()
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->setCurrentAsFront();

Return Value

Type | Description
boolean | Returns true if setting the view orientation was successful.

Version

Introduced in version September 2022


Viewport.setCurrentAsHome Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Sets the "home" view to be the current view orientation.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.setCurrentAsHome(isFitToView)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->setCurrentAsHome(isFitToView);

Return Value

Type | Description
boolean | Returns true if setting the view orientation was successful.

Parameters

Name | Type | Description
isFitToView | boolean | Specifies if when the view goes "home" if the view should be fit to the model or not. True indicates the view will be fit to the model.

Version

Introduced in version September 2022


Viewport.setCurrentAsTop Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Sets the "top" view to be the current view orientation.

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.setCurrentAsTop()
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->setCurrentAsTop();

Return Value

Type | Description
boolean | Returns true if setting the view orientation was successful.

Version

Introduced in version September 2022


Viewport.viewToModelSpace Method

Parent Object: Viewport
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Converts a 2D viewPort point into the equivalent screen coordinate.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Gets and sets the current visual style being used.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/Viewport.h>

Description

Returns the width of the viewport in pixels.

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


VolumetricColorSample Object

VolumetricColorSample Object Preview

Derived from: VolumetricSample Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The VolumetricColorSample object which contains the result of sampling a color value from the volumetric model at a point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Gets the location of the sample evalution.
value | Gets the color value at the sample point.

Accessed From

VolumetricSampler.evaluateColor

Version

Introduced in version May 2025


VolumetricColorSample.classType Method

Parent Object: VolumetricColorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricColorSample.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricColorSample.h>

returnValue = adsk::volume::VolumetricColorSample::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricColorSample.isValid Property

Parent Object: VolumetricColorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.

# Get the value of the property.
propertyValue = volumetricColorSample_var.isValid
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.
#include <Volume/Volumetric/VolumetricColorSample.h>

// Get the value of the property.
boolean propertyValue = volumetricColorSample_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricColorSample.objectType Property

Parent Object: VolumetricColorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.

# Get the value of the property.
propertyValue = volumetricColorSample_var.objectType
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.
#include <Volume/Volumetric/VolumetricColorSample.h>

// Get the value of the property.
string propertyValue = volumetricColorSample_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricColorSample.point Property

Parent Object: VolumetricColorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Description

Gets the location of the sample evalution.

Syntax

  • Python
  • C++
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.

# Get the value of the property.
propertyValue = volumetricColorSample_var.point
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.
#include <Volume/Volumetric/VolumetricColorSample.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = volumetricColorSample_var->point();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2025


VolumetricColorSample.value Property

Parent Object: VolumetricColorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricColorSample.h>

Description

Gets the color value at the sample point.

Syntax

  • Python
  • C++
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.

# Get the value of the property.
propertyValue = volumetricColorSample_var.value
"volumetricColorSample_var" is a variable referencing a VolumetricColorSample object.
#include <Volume/Volumetric/VolumetricColorSample.h>

// Get the value of the property.
Ptr<Color> propertyValue = volumetricColorSample_var->value();

Property Value

This is a read only property whose value is a Color.

Version

Introduced in version May 2025


VolumetricCustomFeature Object

VolumetricCustomFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Object that represents an existing volumetric custom feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
volumetricModel | Get the volumetric model object.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

Accessed From

VolumetricCustomFeature.createForAssemblyContext, VolumetricCustomFeature.nativeObject, VolumetricCustomFeatures.add, VolumetricCustomFeatures.item, VolumetricCustomFeatures.itemByName

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeature.assemblyContext Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.assemblyContext
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = volumetricCustomFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2025


VolumetricCustomFeature.attributes Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.attributes
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = volumetricCustomFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2025


VolumetricCustomFeature.baseFeature Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.baseFeature
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = volumetricCustomFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2025


VolumetricCustomFeature.bodies Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.bodies
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = volumetricCustomFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version May 2025


VolumetricCustomFeature.classType Method

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricCustomFeature.classType()
This is a static method.

#include <Fusion/Features/VolumetricCustomFeature.h>

returnValue = adsk::fusion::VolumetricCustomFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricCustomFeature.createForAssemblyContext Method

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
returnValue = volumetricCustomFeature_var.createForAssemblyContext(occurrence)
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

#include <Fusion/Features/VolumetricCustomFeature.h>

returnValue = volumetricCustomFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
VolumetricCustomFeature | 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 2025


VolumetricCustomFeature.deleteMe Method

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
returnValue = volumetricCustomFeature_var.deleteMe()
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

#include <Fusion/Features/VolumetricCustomFeature.h>

returnValue = volumetricCustomFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version May 2025


VolumetricCustomFeature.dissolve Method

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
returnValue = volumetricCustomFeature_var.dissolve()
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

#include <Fusion/Features/VolumetricCustomFeature.h>

returnValue = volumetricCustomFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version May 2025


VolumetricCustomFeature.entityToken Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.entityToken
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricCustomFeature.errorOrWarningMessage Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.errorOrWarningMessage
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricCustomFeature.faces Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.faces
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = volumetricCustomFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version May 2025


VolumetricCustomFeature.healthState Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.healthState
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = volumetricCustomFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version May 2025


VolumetricCustomFeature.isParametric Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.isParametric
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricCustomFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricCustomFeature.isSuppressed Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.isSuppressed

# Set the value of the property.
volumetricCustomFeature_var.isSuppressed = propertyValue
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricCustomFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricCustomFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricCustomFeature.isValid Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.isValid
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricCustomFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricCustomFeature.linkedFeatures Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.linkedFeatures
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = volumetricCustomFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version May 2025


VolumetricCustomFeature.name Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.name

# Set the value of the property.
volumetricCustomFeature_var.name = propertyValue
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = volumetricCustomFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2025


VolumetricCustomFeature.nativeObject Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.nativeObject
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<VolumetricCustomFeature> propertyValue = volumetricCustomFeature_var->nativeObject();

Property Value

This is a read only property whose value is a VolumetricCustomFeature.

Version

Introduced in version May 2025


VolumetricCustomFeature.objectType Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.objectType
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricCustomFeature.parentComponent Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.parentComponent
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = volumetricCustomFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version May 2025


VolumetricCustomFeature.timelineObject Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.timelineObject
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = volumetricCustomFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version May 2025


VolumetricCustomFeature.volumetricModel Property

Parent Object: VolumetricCustomFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeature.h>

Description

Get the volumetric model object.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

Syntax

  • Python
  • C++
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.

# Get the value of the property.
propertyValue = volumetricCustomFeature_var.volumetricModel
"volumetricCustomFeature_var" is a variable referencing a VolumetricCustomFeature object.
#include <Fusion/Features/VolumetricCustomFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = volumetricCustomFeature_var->volumetricModel();

Property Value

This is a read only property whose value is a Base.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeatureInput Object

VolumetricCustomFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A input object for creating a volumetric custom feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
boundaryBody | The boundary body of the volumetric model.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

VolumetricCustomFeatures.createInput

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeatureInput.boundaryBody Property

Parent Object: VolumetricCustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatureInput.h>

Description

The boundary body of the volumetric model.

Syntax

  • Python
  • C++
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.

# Get the value of the property.
propertyValue = volumetricCustomFeatureInput_var.boundaryBody

# Set the value of the property.
volumetricCustomFeatureInput_var.boundaryBody = propertyValue
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.
#include <Fusion/Features/VolumetricCustomFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = volumetricCustomFeatureInput_var->boundaryBody();

// Set the value of the property, where value_var is a Base.
bool returnValue = volumetricCustomFeatureInput_var->boundaryBody(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2025


VolumetricCustomFeatureInput.classType Method

Parent Object: VolumetricCustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricCustomFeatureInput.classType()
This is a static method.

#include <Fusion/Features/VolumetricCustomFeatureInput.h>

returnValue = adsk::fusion::VolumetricCustomFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricCustomFeatureInput.isValid Property

Parent Object: VolumetricCustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.

# Get the value of the property.
propertyValue = volumetricCustomFeatureInput_var.isValid
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.
#include <Fusion/Features/VolumetricCustomFeatureInput.h>

// Get the value of the property.
boolean propertyValue = volumetricCustomFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricCustomFeatureInput.objectType Property

Parent Object: VolumetricCustomFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.

# Get the value of the property.
propertyValue = volumetricCustomFeatureInput_var.objectType
"volumetricCustomFeatureInput_var" is a variable referencing a VolumetricCustomFeatureInput object.
#include <Fusion/Features/VolumetricCustomFeatureInput.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricCustomFeatures Object

VolumetricCustomFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing volumetric custom features in a component and supports the ability to create new Volumetric Custom features.

Methods

Name | Description
add | Add a new volumetric custom feature. To create a new volumetric custom feature use the createInput method to create a new input object and use the methods and properties on that object to define the required input for a volumetric custom feature. Once the information is defined on the input object you can pass it to the add method to create 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().
createInput | Create a new VolumetricCustomFeatureInput object.
item | Function that returns the specified item using an index into the collection.
itemByName | Returns the item with the specified internal name.

Properties

Name | Description
count | The number of 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.volumetricCustomFeatures

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeatures.add Method

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Add a new volumetric custom feature. To create a new volumetric custom feature use the createInput method to create a new input object and use the methods and properties on that object to define the required input for a volumetric custom feature. Once the information is defined on the input object you can pass it to the add method to create the feature.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
returnValue = volumetricCustomFeatures_var.add(input)
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

#include <Fusion/Features/VolumetricCustomFeatures.h>

returnValue = volumetricCustomFeatures_var->add(input);

Return Value

Type | Description
VolumetricCustomFeature | The newly added volumetric custom feature object or null if one cannot be added. Only one volumetric model can be added to each body.

Parameters

Name | Type | Description
input | VolumetricCustomFeatureInput | The input object for creating a volumetric custom feature.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeatures.classType Method

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricCustomFeatures.classType()
This is a static method.

#include <Fusion/Features/VolumetricCustomFeatures.h>

returnValue = adsk::fusion::VolumetricCustomFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricCustomFeatures.count Property

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

The number of features in the collection.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

# Get the value of the property.
propertyValue = volumetricCustomFeatures_var.count
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
#include <Fusion/Features/VolumetricCustomFeatures.h>

// Get the value of the property.
uinteger propertyValue = volumetricCustomFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


VolumetricCustomFeatures.createInput Method

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Create a new VolumetricCustomFeatureInput object.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
returnValue = volumetricCustomFeatures_var.createInput(boundaryBody)
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

#include <Fusion/Features/VolumetricCustomFeatures.h>

returnValue = volumetricCustomFeatures_var->createInput(boundaryBody);

Return Value

Type | Description
VolumetricCustomFeatureInput | Returns the newly created VolumetricCustomFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
boundaryBody | Base | The boundary body for the volumetric model. Must be a BRepBody or MeshBody. Must have the same parent component as the VolumetricCustomFeatures.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricCustomFeatures.isValid Property

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

# Get the value of the property.
propertyValue = volumetricCustomFeatures_var.isValid
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
#include <Fusion/Features/VolumetricCustomFeatures.h>

// Get the value of the property.
boolean propertyValue = volumetricCustomFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricCustomFeatures.item Method

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Function that returns the specified item using an index into the collection.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
returnValue = volumetricCustomFeatures_var.item(index)
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

#include <Fusion/Features/VolumetricCustomFeatures.h>

returnValue = volumetricCustomFeatures_var->item(index);

Return Value

Type | Description
VolumetricCustomFeature | 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 May 2025


VolumetricCustomFeatures.itemByName Method

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

Returns the item with the specified internal name.

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
returnValue = volumetricCustomFeatures_var.itemByName(name)
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

#include <Fusion/Features/VolumetricCustomFeatures.h>

returnValue = volumetricCustomFeatures_var->itemByName(name);

Return Value

Type | Description
VolumetricCustomFeature | 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 item.

Version

Introduced in version May 2025


VolumetricCustomFeatures.objectType Property

Parent Object: VolumetricCustomFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricCustomFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.

# Get the value of the property.
propertyValue = volumetricCustomFeatures_var.objectType
"volumetricCustomFeatures_var" is a variable referencing a VolumetricCustomFeatures object.
#include <Fusion/Features/VolumetricCustomFeatures.h>

// Get the value of the property.
string propertyValue = volumetricCustomFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModel Object

VolumetricModel Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The main volumetric graph object. It has a parent component and is defined in this parent component's space. It also contains the primary and cell graphs.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createSampler | Creates a VolumetricSampler object that can be used to sample the volumetric model.
getGraph | Returns a graph from the volumetric model.
registerCustomSDFCallback | Handling for custom Signed Distance Field callback events. These can be registered by the API client, they will provide a string ID and a handler object that implements the abstract methods. To use the callback, a GeometryGraphNodeProperty's customSDFCallbackID should be set to the same string ID. Register a custom Signed Distance Field callback handler with a given ID.
removeCustomSDFCallback | De-register the Signed Distance Field callback handler with the given ID.

Properties

Name | Description
boundaryBody | Get or set the main boundary body for this volumetric model. The volumetric model is bound by the axis aligned bounding box and will only be rendered within this body.
isLightBulbOn | Is the light bulb / eye (as displayed in the browser) controlling the model's visibility 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent Component.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModel.boundaryBody Property

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Get or set the main boundary body for this volumetric model. The volumetric model is bound by the axis aligned bounding box and will only be rendered within this body.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.

# Get the value of the property.
propertyValue = volumetricModel_var.boundaryBody
"volumetricModel_var" is a variable referencing a VolumetricModel object.
#include <Volume/Volumetric/VolumetricModel.h>

// Get the value of the property.
Ptr<Base> propertyValue = volumetricModel_var->boundaryBody();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2025


VolumetricModel.classType Method

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricModel.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricModel.h>

returnValue = adsk::volume::VolumetricModel::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricModel.createSampler Method

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Creates a VolumetricSampler object that can be used to sample the volumetric model.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.
returnValue = volumetricModel_var.createSampler()
"volumetricModel_var" is a variable referencing a VolumetricModel object.

#include <Volume/Volumetric/VolumetricModel.h>

returnValue = volumetricModel_var->createSampler();

Return Value

Type | Description
VolumetricSampler | Returns a VolumetricSampler object that will sample this VolumetricModel.

Version

Introduced in version May 2025


VolumetricModel.getGraph Method

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Returns a graph from the volumetric model.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.
returnValue = volumetricModel_var.getGraph(graphType)
"volumetricModel_var" is a variable referencing a VolumetricModel object.

#include <Volume/Volumetric/VolumetricModel.h>

returnValue = volumetricModel_var->getGraph(graphType);

Parameters

Name | Type | Description
graphType | GraphTypes | Which kind of graph to return.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModel.isLightBulbOn Property

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Is the light bulb / eye (as displayed in the browser) controlling the model's visibility on.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.

# Get the value of the property.
propertyValue = volumetricModel_var.isLightBulbOn

# Set the value of the property.
volumetricModel_var.isLightBulbOn = propertyValue
"volumetricModel_var" is a variable referencing a VolumetricModel object.
#include <Volume/Volumetric/VolumetricModel.h>

// Get the value of the property.
boolean propertyValue = volumetricModel_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModel_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModel.isValid Property

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.

# Get the value of the property.
propertyValue = volumetricModel_var.isValid
"volumetricModel_var" is a variable referencing a VolumetricModel object.
#include <Volume/Volumetric/VolumetricModel.h>

// Get the value of the property.
boolean propertyValue = volumetricModel_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModel.objectType Property

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.

# Get the value of the property.
propertyValue = volumetricModel_var.objectType
"volumetricModel_var" is a variable referencing a VolumetricModel object.
#include <Volume/Volumetric/VolumetricModel.h>

// Get the value of the property.
string propertyValue = volumetricModel_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModel.parentComponent Property

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Returns the parent Component.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.

# Get the value of the property.
propertyValue = volumetricModel_var.parentComponent
"volumetricModel_var" is a variable referencing a VolumetricModel object.
#include <Volume/Volumetric/VolumetricModel.h>

// Get the value of the property.
Ptr<Component> propertyValue = volumetricModel_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version May 2025


VolumetricModel.registerCustomSDFCallback Method

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

Handling for custom Signed Distance Field callback events. These can be registered by the API client, they will provide a string ID and a handler object that implements the abstract methods. To use the callback, a GeometryGraphNodeProperty's customSDFCallbackID should be set to the same string ID.

Register a custom Signed Distance Field callback handler with a given ID.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.
returnValue = volumetricModel_var.registerCustomSDFCallback(id, callback)
"volumetricModel_var" is a variable referencing a VolumetricModel object.

#include <Volume/Volumetric/VolumetricModel.h>

returnValue = volumetricModel_var->registerCustomSDFCallback(id, callback);

Return Value

Type | Description
boolean | True if registered successfully. False otherwise.

Parameters

Name | Type | Description
id | string | The ID to be used in a GeometryGraphNodeProperty's customSDFCallbackID.
callback | CustomSDFCallbackEventHandler | The callback object implemented by the client.

Version

Introduced in version May 2025


VolumetricModel.removeCustomSDFCallback Method

Parent Object: VolumetricModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricModel.h>

Description

De-register the Signed Distance Field callback handler with the given ID.

Syntax

  • Python
  • C++
"volumetricModel_var" is a variable referencing a VolumetricModel object.
returnValue = volumetricModel_var.removeCustomSDFCallback(id)
"volumetricModel_var" is a variable referencing a VolumetricModel object.

#include <Volume/Volumetric/VolumetricModel.h>

returnValue = volumetricModel_var->removeCustomSDFCallback(id);

Return Value

Type | Description
boolean | True if removed successfully. False otherwise.

Parameters

Name | Type | Description
id | string | The ID used in registerCustomSDFCallback()

Version

Introduced in version May 2025


VolumetricModelToMeshFeature Object

VolumetricModelToMeshFeature Object Preview

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
elementSize Gets the element size that will be used when creating the mesh. This value is only used when the refinement type is set to Custom. The value must be greater than 0.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
healthState | Returns the current health state of the feature.
isComputeSuspended Gets and sets if the feature compute should be suspended if a dependent entity changes. If true, the feature will need to be recomputed manually if a dependent entity changes.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
isParametric | Indicates if this feature is parametric or not.
isSmallShellsRemoved Gets and sets if small mesh shells should be removed after creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(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.
isVolumetricModelRemoved Gets and sets if the volumetric model should be removed after creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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.
meshBody | Get the mesh body created from the volumetric model.
meshingApproach Gets and sets the meshing approach to be used when creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
parentComponent | Returns the parent component that owns this feature.
refinementType Gets and sets the refinement type to be used when creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
smallShellThreshold Gets the small mesh threshold used to determine if a mesh shell is considered small. The value is a fraction of the total mesh area and must be between 0 and 1.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
timelineObject | Returns the timeline object associated with this feature.
volumetricModel Gets and sets the volumetric model to be converted to a mesh. The volumetric model must have the same parent component as the VolumetricModelToMeshFeature.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Accessed From

VolumetricModelToMeshFeature.createForAssemblyContext, VolumetricModelToMeshFeature.nativeObject, VolumetricModelToMeshFeatures.add, VolumetricModelToMeshFeatures.item, VolumetricModelToMeshFeatures.itemByName

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.assemblyContext Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.assemblyContext
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = volumetricModelToMeshFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.attributes Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the collection of attributes associated with this face.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.attributes
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = volumetricModelToMeshFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.baseFeature Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.baseFeature
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = volumetricModelToMeshFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.bodies Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.bodies
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = volumetricModelToMeshFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.classType Method

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricModelToMeshFeature.classType()
This is a static method.

#include <Fusion/Features/VolumetricModelToMeshFeature.h>

returnValue = adsk::fusion::VolumetricModelToMeshFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.createForAssemblyContext Method

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
returnValue = volumetricModelToMeshFeature_var.createForAssemblyContext(occurrence)
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

#include <Fusion/Features/VolumetricModelToMeshFeature.h>

returnValue = volumetricModelToMeshFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
VolumetricModelToMeshFeature | 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 2025


VolumetricModelToMeshFeature.deleteMe Method

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
returnValue = volumetricModelToMeshFeature_var.deleteMe()
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

#include <Fusion/Features/VolumetricModelToMeshFeature.h>

returnValue = volumetricModelToMeshFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.dissolve Method

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
returnValue = volumetricModelToMeshFeature_var.dissolve()
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

#include <Fusion/Features/VolumetricModelToMeshFeature.h>

returnValue = volumetricModelToMeshFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.elementSize Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets the element size that will be used when creating the mesh. This value is only used when the refinement type is set to Custom. The value must be greater than 0.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.elementSize
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = volumetricModelToMeshFeature_var->elementSize();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.entityToken Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.entityToken
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.errorOrWarningMessage Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.errorOrWarningMessage
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.faces Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.faces
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = volumetricModelToMeshFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.healthState Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the current health state of the feature.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.healthState
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = volumetricModelToMeshFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isComputeSuspended Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets if the feature compute should be suspended if a dependent entity changes. If true, the feature will need to be recomputed manually if a dependent entity changes.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isComputeSuspended

# Set the value of the property.
volumetricModelToMeshFeature_var.isComputeSuspended = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isComputeSuspended();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeature_var->isComputeSuspended(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isParametric Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Indicates if this feature is parametric or not.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isParametric
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isSmallShellsRemoved Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets if small mesh shells should be removed after creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isSmallShellsRemoved

# Set the value of the property.
volumetricModelToMeshFeature_var.isSmallShellsRemoved = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isSmallShellsRemoved();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeature_var->isSmallShellsRemoved(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isSuppressed Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isSuppressed

# Set the value of the property.
volumetricModelToMeshFeature_var.isSuppressed = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isValid Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isValid
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.isVolumetricModelRemoved Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets if the volumetric model should be removed after creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.isVolumetricModelRemoved

# Set the value of the property.
volumetricModelToMeshFeature_var.isVolumetricModelRemoved = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeature_var->isVolumetricModelRemoved();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeature_var->isVolumetricModelRemoved(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.linkedFeatures Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.linkedFeatures
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = volumetricModelToMeshFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.meshBody Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Get the mesh body created from the volumetric model.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.meshBody
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<MeshBody> propertyValue = volumetricModelToMeshFeature_var->meshBody();

Property Value

This is a read only property whose value is a MeshBody.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.meshingApproach Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets the meshing approach to be used when creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.meshingApproach

# Set the value of the property.
volumetricModelToMeshFeature_var.meshingApproach = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
VolumetricMeshingApproachTypes propertyValue = volumetricModelToMeshFeature_var->meshingApproach();

// Set the value of the property, where value_var is a VolumetricMeshingApproachTypes.
bool returnValue = volumetricModelToMeshFeature_var->meshingApproach(value_var);

Property Value

This is a read/write property whose value is a VolumetricMeshingApproachTypes.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.name Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.name

# Set the value of the property.
volumetricModelToMeshFeature_var.name = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = volumetricModelToMeshFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.nativeObject Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

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.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.nativeObject
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<VolumetricModelToMeshFeature> propertyValue = volumetricModelToMeshFeature_var->nativeObject();

Property Value

This is a read only property whose value is a VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.objectType Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.objectType
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.parentComponent Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the parent component that owns this feature.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.parentComponent
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = volumetricModelToMeshFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.refinementType Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets the refinement type to be used when creating the mesh.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.refinementType

# Set the value of the property.
volumetricModelToMeshFeature_var.refinementType = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
VolumetricMeshRefinementTypes propertyValue = volumetricModelToMeshFeature_var->refinementType();

// Set the value of the property, where value_var is a VolumetricMeshRefinementTypes.
bool returnValue = volumetricModelToMeshFeature_var->refinementType(value_var);

Property Value

This is a read/write property whose value is a VolumetricMeshRefinementTypes.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.smallShellThreshold Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets the small mesh threshold used to determine if a mesh shell is considered small. The value is a fraction of the total mesh area and must be between 0 and 1.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.smallShellThreshold
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = volumetricModelToMeshFeature_var->smallShellThreshold();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.timelineObject Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Returns the timeline object associated with this feature.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.timelineObject
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = volumetricModelToMeshFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version May 2025


VolumetricModelToMeshFeature.volumetricModel Property

Parent Object: VolumetricModelToMeshFeature

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeature.h>

Description

Gets and sets the volumetric model to be converted to a mesh. The volumetric model must have the same parent component as the VolumetricModelToMeshFeature.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

To set this property, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)

Syntax

  • Python
  • C++
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeature_var.volumetricModel

# Set the value of the property.
volumetricModelToMeshFeature_var.volumetricModel = propertyValue
"volumetricModelToMeshFeature_var" is a variable referencing a VolumetricModelToMeshFeature object.
#include <Fusion/Features/VolumetricModelToMeshFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = volumetricModelToMeshFeature_var->volumetricModel();

// Set the value of the property, where value_var is a Base.
bool returnValue = volumetricModelToMeshFeature_var->volumetricModel(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput Object

VolumetricModelToMeshFeatureInput Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

A input object for creating a volumetric model to mesh feature.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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
elementSize | Gets and sets the element size to be used when creating the mesh. This value is only used when the RefinementType is set to Custom. The value must be greater than 0. The default is equivalent to the Low refinement type and is dependent on the size of the model.
isComputeSuspended | Gets and sets if the feature compute should be suspended if a dependent entity changes. Default is false. If true, the feature will need to be recomputed manually if a dependent entity changes. The default is false.
isSmallShellsRemoved | Gets and sets if small mesh shells should be removed after creating the mesh. 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.
isVolumetricModelRemoved | Gets and sets if the volumetric model should be removed after creating the mesh. the default is true.
meshingApproach | Gets and sets the meshing approach to be used when creating the mesh. The default is VolumetricMeshingAdvancedType.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
refinementType | Gets and sets the refinement type to be used when creating the mesh. The default is Low.
smallShellThreshold | Gets and Sets the small mesh threshold used to determine if a mesh shell is considered small. The value is a fraction of the total mesh area and must be between 0 and 1. The default is 0.02.
volumetricModel | Gets and sets the volumetric model to be converted to a mesh. The volumetric model must have the same parent component as the VolumetricModelToMeshFeature.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

Accessed From

VolumetricModelToMeshFeatures.createInput

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.classType Method

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricModelToMeshFeatureInput.classType()
This is a static method.

#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

returnValue = adsk::fusion::VolumetricModelToMeshFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.elementSize Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets the element size to be used when creating the mesh. This value is only used when the RefinementType is set to Custom. The value must be greater than 0. The default is equivalent to the Low refinement type and is dependent on the size of the model.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.elementSize

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.elementSize = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = volumetricModelToMeshFeatureInput_var->elementSize();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = volumetricModelToMeshFeatureInput_var->elementSize(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.isComputeSuspended Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets if the feature compute should be suspended if a dependent entity changes. Default is false. If true, the feature will need to be recomputed manually if a dependent entity changes. The default is false.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.isComputeSuspended

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.isComputeSuspended = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeatureInput_var->isComputeSuspended();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeatureInput_var->isComputeSuspended(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.isSmallShellsRemoved Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets if small mesh shells should be removed after creating the mesh. The default is false.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.isSmallShellsRemoved

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.isSmallShellsRemoved = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeatureInput_var->isSmallShellsRemoved();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeatureInput_var->isSmallShellsRemoved(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.isValid Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.isValid
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.isVolumetricModelRemoved Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets if the volumetric model should be removed after creating the mesh. the default is true.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.isVolumetricModelRemoved

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.isVolumetricModelRemoved = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeatureInput_var->isVolumetricModelRemoved();

// Set the value of the property, where value_var is a boolean.
bool returnValue = volumetricModelToMeshFeatureInput_var->isVolumetricModelRemoved(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.meshingApproach Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets the meshing approach to be used when creating the mesh. The default is VolumetricMeshingAdvancedType.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.meshingApproach

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.meshingApproach = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
VolumetricMeshingApproachTypes propertyValue = volumetricModelToMeshFeatureInput_var->meshingApproach();

// Set the value of the property, where value_var is a VolumetricMeshingApproachTypes.
bool returnValue = volumetricModelToMeshFeatureInput_var->meshingApproach(value_var);

Property Value

This is a read/write property whose value is a VolumetricMeshingApproachTypes.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.objectType Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.objectType
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.refinementType Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets the refinement type to be used when creating the mesh. The default is Low.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.refinementType

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.refinementType = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
VolumetricMeshRefinementTypes propertyValue = volumetricModelToMeshFeatureInput_var->refinementType();

// Set the value of the property, where value_var is a VolumetricMeshRefinementTypes.
bool returnValue = volumetricModelToMeshFeatureInput_var->refinementType(value_var);

Property Value

This is a read/write property whose value is a VolumetricMeshRefinementTypes.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.smallShellThreshold Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and Sets the small mesh threshold used to determine if a mesh shell is considered small. The value is a fraction of the total mesh area and must be between 0 and 1. The default is 0.02.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.smallShellThreshold

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.smallShellThreshold = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = volumetricModelToMeshFeatureInput_var->smallShellThreshold();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = volumetricModelToMeshFeatureInput_var->smallShellThreshold(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatureInput.volumetricModel Property

Parent Object: VolumetricModelToMeshFeatureInput

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

Description

Gets and sets the volumetric model to be converted to a mesh. The volumetric model must have the same parent component as the VolumetricModelToMeshFeature.This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatureInput_var.volumetricModel

# Set the value of the property.
volumetricModelToMeshFeatureInput_var.volumetricModel = propertyValue
"volumetricModelToMeshFeatureInput_var" is a variable referencing a VolumetricModelToMeshFeatureInput object.
#include <Fusion/Features/VolumetricModelToMeshFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = volumetricModelToMeshFeatureInput_var->volumetricModel();

// Set the value of the property, where value_var is a Base.
bool returnValue = volumetricModelToMeshFeatureInput_var->volumetricModel(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures Object

VolumetricModelToMeshFeatures Object Preview

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Collection that provides access to all of the existing volumetric model to mesh features in a component and supports the ability to create new Volumetric Model To Mesh features.

Methods

Name | Description
add | Add a new volumetric model to mesh feature. To create a new volumetric model to mesh feature use the createInput function to create a new input object and use the methods and proprties on that object to define the required input for an volumetric model to mesh feature. Once the information is defined on the input object you can pass it to the Add method to create the Volumetric Model to Mesh.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 new VolumetricModelToMeshFeatureInput object.
item | Function that returns the specified item using an index into the collection.
itemByName | Returns the item with the specified name.

Properties

Name | Description
count | The number of 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.volumetricModelToMeshFeatures

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.add Method

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Add a new volumetric model to mesh feature. To create a new volumetric model to mesh feature use the createInput function to create a new input object and use the methods and proprties on that object to define the required input for an volumetric model to mesh feature. Once the information is defined on the input object you can pass it to the Add method to create the Volumetric Model to Mesh.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
returnValue = volumetricModelToMeshFeatures_var.add(input)
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

returnValue = volumetricModelToMeshFeatures_var->add(input);

Return Value

Type | Description
VolumetricModelToMeshFeature | The newly added volumetric model to mesh feature.

Parameters

Name | Type | Description
input | VolumetricModelToMeshFeatureInput | The input object for creating a volumetric model to mesh feature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.classType Method

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VolumetricModelToMeshFeatures.classType()
This is a static method.

#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

returnValue = adsk::fusion::VolumetricModelToMeshFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.count Property

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

The number of features in the collection.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatures_var.count
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

// Get the value of the property.
uinteger propertyValue = volumetricModelToMeshFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.createInput Method

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Create a new VolumetricModelToMeshFeatureInput object.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
returnValue = volumetricModelToMeshFeatures_var.createInput(volumetricModel)
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

returnValue = volumetricModelToMeshFeatures_var->createInput(volumetricModel);

Return Value

Type | Description
VolumetricModelToMeshFeatureInput | Returns the newly created VolumetricModelToMeshFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
volumetricModel | Base | The volumetric model to be converted to a mesh. Must have the same parent component as the VolumetricModelToMeshFeatures. This property is typed as core.Base because the adsk.fusion library does not reference the volume library where the VolumetricModel object is defined. At runtime, this property will return a VolumetricModel object.

Samples

Name Description
Volumetric Custom Feature API Sample

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.isValid Property

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatures_var.isValid
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

// Get the value of the property.
boolean propertyValue = volumetricModelToMeshFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.item Method

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Function that returns the specified item using an index into the collection.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
returnValue = volumetricModelToMeshFeatures_var.item(index)
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

returnValue = volumetricModelToMeshFeatures_var->item(index);

Return Value

Type | Description
VolumetricModelToMeshFeature | 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 May 2025


VolumetricModelToMeshFeatures.itemByName Method

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

Returns the item with the specified name.

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
returnValue = volumetricModelToMeshFeatures_var.itemByName(name)
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

returnValue = volumetricModelToMeshFeatures_var->itemByName(name);

Return Value

Type | Description
VolumetricModelToMeshFeature | 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 item.

Version

Introduced in version May 2025


VolumetricModelToMeshFeatures.objectType Property

Parent Object: VolumetricModelToMeshFeatures

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/VolumetricModelToMeshFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.

# Get the value of the property.
propertyValue = volumetricModelToMeshFeatures_var.objectType
"volumetricModelToMeshFeatures_var" is a variable referencing a VolumetricModelToMeshFeatures object.
#include <Fusion/Features/VolumetricModelToMeshFeatures.h>

// Get the value of the property.
string propertyValue = volumetricModelToMeshFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricSample Object

VolumetricSample Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSample.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The VolumetricSamples object which is a base class for containing the result of sampling the volumetric model an array of points.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Gets the location of the sample evalution.

Accessed From

VolumetricSampler.evaluate

Derived Classes

VolumetricColorSample, VolumetricScalarSample, VolumetricVectorSample

Version

Introduced in version May 2025


VolumetricSample.classType Method

Parent Object: VolumetricSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSample.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricSample.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricSample.h>

returnValue = adsk::volume::VolumetricSample::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricSample.isValid Property

Parent Object: VolumetricSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSample.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricSample_var" is a variable referencing a VolumetricSample object.

# Get the value of the property.
propertyValue = volumetricSample_var.isValid
"volumetricSample_var" is a variable referencing a VolumetricSample object.
#include <Volume/Volumetric/VolumetricSample.h>

// Get the value of the property.
boolean propertyValue = volumetricSample_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricSample.objectType Property

Parent Object: VolumetricSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSample.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricSample_var" is a variable referencing a VolumetricSample object.

# Get the value of the property.
propertyValue = volumetricSample_var.objectType
"volumetricSample_var" is a variable referencing a VolumetricSample object.
#include <Volume/Volumetric/VolumetricSample.h>

// Get the value of the property.
string propertyValue = volumetricSample_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricSample.point Property

Parent Object: VolumetricSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSample.h>

Description

Gets the location of the sample evalution.

Syntax

  • Python
  • C++
"volumetricSample_var" is a variable referencing a VolumetricSample object.

# Get the value of the property.
propertyValue = volumetricSample_var.point
"volumetricSample_var" is a variable referencing a VolumetricSample object.
#include <Volume/Volumetric/VolumetricSample.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = volumetricSample_var->point();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2025


VolumetricSampler Object

VolumetricSampler Object Preview

Derived from: Base Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The VolumetricSampler object which is used for controled sampling of the volumetric model.

Methods

Name | Description
addSamplePoints | Appends sample points to the existing sample points to be used for sampling the volumetric 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().
clearSamplePoints | Clears the sample points that have been set for sampling the volumetric model.
evaluate | Evaluates the volumetric model at the previously set sample points for the given node and returns the results.
evaluateColor | Evaluates the color of the model at the previously set sample points and returns the results.
evaluateDensity | Evaluates the density of the model at the previously set sample points and returns the results. This value is what is used to determine the level set of the model.
evaluateLevelSet | Evaluates the level set function of the model at the previously set sample points and returns the results.
samplePointCount | Gets the number of sample points that will be used for sampling the volumetric model.
setBoundingBoxSampling | Calculates and sets the sample points to be used for sampling the volumetric model for a given resolution throughout the bounding box provided. This will override any previously set sample points.
setPlaneSampling | Calculates and sets the sample points to be used for sampling the volumetric model for a given resolution, plane and primary axis. The points will be distributed in a grid pattern on the plane, starting at the plane origin and extend in the primary axis and secodary axis for the axis size arguments. The secondary axis is calculated from the cross product of the plane normal and the primary axis. This will override any previously set sample points.
setSamplePoints | Sets sample points to be used for sampling the volumetric model.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

VolumetricModel.createSampler

Version

Introduced in version May 2025


VolumetricSampler.addSamplePoints Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Appends sample points to the existing sample points to be used for sampling the volumetric model.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.addSamplePoints(samplePoints)
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->addSamplePoints(samplePoints);

Parameters

Name | Type | Description
samplePoints | Point3D[] | The sample points to be added to the sampler.

Version

Introduced in version May 2025


VolumetricSampler.classType Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricSampler.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = adsk::volume::VolumetricSampler::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricSampler.clearSamplePoints Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Clears the sample points that have been set for sampling the volumetric model.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.clearSamplePoints()
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->clearSamplePoints();

Return Value

Type | Description
boolean | True if the sample points were successfully cleared.

Version

Introduced in version May 2025


VolumetricSampler.evaluate Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Evaluates the volumetric model at the previously set sample points for the given node and returns the results.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
# Uses no optional arguments.
returnValue = volumetricSampler_var.evaluate(graphNode)

# Uses optional arguments.
returnValue = volumetricSampler_var.evaluate(graphNode, isOutput, index)
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

// Uses no optional arguments.
returnValue = volumetricSampler_var->evaluate(graphNode);

// Uses optional arguments.
returnValue = volumetricSampler_var->evaluate(graphNode, isOutput, index);

Return Value

Type | Description
VolumetricSample[] | An array of VolumetricSample objects that contain the results of sampling the volumetric model.

Parameters

Name | Type | Description
graphNode | GraphNode | The graph node to evaluate at the sample points.
isOutput | boolean | Optional argument that controls the sampling. If set to true samples an output pin, if set to false samples an input pin. Default is True. This is an optional argument whose default value is True.
index | integer | Optional argument that controls the index of the pin to sample. Default is 0 which is the first pin. This is an optional argument whose default value is 0.

Version

Introduced in version May 2025


VolumetricSampler.evaluateColor Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Evaluates the color of the model at the previously set sample points and returns the results.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.evaluateColor()
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->evaluateColor();

Return Value

Type | Description
VolumetricColorSample[] | An array of VolumetricColorSample objects that contain the results of sampling the volumetric model.

Version

Introduced in version May 2025


VolumetricSampler.evaluateDensity Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Evaluates the density of the model at the previously set sample points and returns the results. This value is what is used to determine the level set of the model.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.evaluateDensity()
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->evaluateDensity();

Return Value

Type | Description
VolumetricScalarSample[] | An array of VolumetricScalarSample objects that contain the results of sampling the volumetric model.

Version

Introduced in version May 2025


VolumetricSampler.evaluateLevelSet Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Evaluates the level set function of the model at the previously set sample points and returns the results.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.evaluateLevelSet()
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->evaluateLevelSet();

Return Value

Type | Description
VolumetricScalarSample[] | An array of VolumetricScalarSample objectst that contain the results of sampling the volumetric model.

Version

Introduced in version May 2025


VolumetricSampler.isValid Property

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

# Get the value of the property.
propertyValue = volumetricSampler_var.isValid
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
#include <Volume/Volumetric/VolumetricSampler.h>

// Get the value of the property.
boolean propertyValue = volumetricSampler_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricSampler.objectType Property

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

# Get the value of the property.
propertyValue = volumetricSampler_var.objectType
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
#include <Volume/Volumetric/VolumetricSampler.h>

// Get the value of the property.
string propertyValue = volumetricSampler_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricSampler.samplePointCount Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Gets the number of sample points that will be used for sampling the volumetric model.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.samplePointCount()
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->samplePointCount();

Return Value

Type | Description
uinteger | The number of sample points that will be used for sampling the volumetric model.

Version

Introduced in version May 2025


VolumetricSampler.setBoundingBoxSampling Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Calculates and sets the sample points to be used for sampling the volumetric model for a given resolution throughout the bounding box provided. This will override any previously set sample points.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.setBoundingBoxSampling(elementSize, boundingBox3d)
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->setBoundingBoxSampling(elementSize, boundingBox3d);

Return Value

Type | Description
boolean | True if the sample points were set successfully.

Parameters

Name | Type | Description
elementSize | double | The approximate spacing between sample points. The units used for the element size are centimeters.
boundingBox3d | BoundingBox3D | The bounding box in which the sample points will be distributed.

Version

Introduced in version May 2025


VolumetricSampler.setPlaneSampling Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Calculates and sets the sample points to be used for sampling the volumetric model for a given resolution, plane and primary axis. The points will be distributed in a grid pattern on the plane, starting at the plane origin and extend in the primary axis and secodary axis for the axis size arguments. The secondary axis is calculated from the cross product of the plane normal and the primary axis. This will override any previously set sample points.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.setPlaneSampling(elementSize, plane, primaryAxis, primaryAxisSize, secondaryAxisSize)
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->setPlaneSampling(elementSize, plane, primaryAxis, primaryAxisSize, secondaryAxisSize);

Return Value

Type | Description
boolean | True if the sample points were set successfully.

Parameters

Name | Type | Description
elementSize | double | The approximate spacing between sample points. The units used for the element size are centimeters.
plane | Plane | The plane on which the points will be distributed.
primaryAxis | Vector3D | The primary axis of the plane. This vector should be on the plane. The secondary axis of the plane is calculated as the cross-product of the plane normal and the primary axis
primaryAxisSize | double | The size of the plane in the primary axis direction.
secondaryAxisSize | double | The size of the plane in the secondary axis direction.

Version

Introduced in version May 2025


VolumetricSampler.setSamplePoints Method

Parent Object: VolumetricSampler

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricSampler.h>

Description

Sets sample points to be used for sampling the volumetric model.

Syntax

  • Python
  • C++
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.
returnValue = volumetricSampler_var.setSamplePoints(samplePoints)
"volumetricSampler_var" is a variable referencing a VolumetricSampler object.

#include <Volume/Volumetric/VolumetricSampler.h>

returnValue = volumetricSampler_var->setSamplePoints(samplePoints);

Return Value

Type | Description
boolean | True if the sample points were set successfully.

Parameters

Name | Type | Description
samplePoints | Point3D[] | The sample points to be used for sampling the volumetric model.

Version

Introduced in version May 2025


VolumetricScalarSample Object

VolumetricScalarSample Object Preview

Derived from: VolumetricSample Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The VolumetricScalarSample object which contains the result of sampling a scalar value from the volumetric model at a point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Gets the location of the sample evalution.
value | Gets the scalar value at the sample point.

Accessed From

VolumetricSampler.evaluateDensity, VolumetricSampler.evaluateLevelSet

Version

Introduced in version May 2025


VolumetricScalarSample.classType Method

Parent Object: VolumetricScalarSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricScalarSample.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricScalarSample.h>

returnValue = adsk::volume::VolumetricScalarSample::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricScalarSample.isValid Property

Parent Object: VolumetricScalarSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.

# Get the value of the property.
propertyValue = volumetricScalarSample_var.isValid
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.
#include <Volume/Volumetric/VolumetricScalarSample.h>

// Get the value of the property.
boolean propertyValue = volumetricScalarSample_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricScalarSample.objectType Property

Parent Object: VolumetricScalarSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.

# Get the value of the property.
propertyValue = volumetricScalarSample_var.objectType
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.
#include <Volume/Volumetric/VolumetricScalarSample.h>

// Get the value of the property.
string propertyValue = volumetricScalarSample_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricScalarSample.point Property

Parent Object: VolumetricScalarSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Description

Gets the location of the sample evalution.

Syntax

  • Python
  • C++
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.

# Get the value of the property.
propertyValue = volumetricScalarSample_var.point
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.
#include <Volume/Volumetric/VolumetricScalarSample.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = volumetricScalarSample_var->point();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2025


VolumetricScalarSample.value Property

Parent Object: VolumetricScalarSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricScalarSample.h>

Description

Gets the scalar value at the sample point.

Syntax

  • Python
  • C++
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.

# Get the value of the property.
propertyValue = volumetricScalarSample_var.value
"volumetricScalarSample_var" is a variable referencing a VolumetricScalarSample object.
#include <Volume/Volumetric/VolumetricScalarSample.h>

// Get the value of the property.
double propertyValue = volumetricScalarSample_var->value();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2025


VolumetricVectorSample Object

VolumetricVectorSample Object Preview

Derived from: VolumetricSample Object
Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

The VolumetricVectorSample object which contains the result of sampling a vector value from the volumetric model at a point.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
point | Gets the location of the sample evalution.
value | Gets the vector value at the sample point.

Version

Introduced in version May 2025


VolumetricVectorSample.classType Method

Parent Object: VolumetricVectorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.volume.VolumetricVectorSample.classType()
This is a static method.

#include <Volume/Volumetric/VolumetricVectorSample.h>

returnValue = adsk::volume::VolumetricVectorSample::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2025


VolumetricVectorSample.isValid Property

Parent Object: VolumetricVectorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.

# Get the value of the property.
propertyValue = volumetricVectorSample_var.isValid
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.
#include <Volume/Volumetric/VolumetricVectorSample.h>

// Get the value of the property.
boolean propertyValue = volumetricVectorSample_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2025


VolumetricVectorSample.objectType Property

Parent Object: VolumetricVectorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.

# Get the value of the property.
propertyValue = volumetricVectorSample_var.objectType
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.
#include <Volume/Volumetric/VolumetricVectorSample.h>

// Get the value of the property.
string propertyValue = volumetricVectorSample_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2025


VolumetricVectorSample.point Property

Parent Object: VolumetricVectorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Description

Gets the location of the sample evalution.

Syntax

  • Python
  • C++
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.

# Get the value of the property.
propertyValue = volumetricVectorSample_var.point
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.
#include <Volume/Volumetric/VolumetricVectorSample.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = volumetricVectorSample_var->point();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version May 2025


VolumetricVectorSample.value Property

Parent Object: VolumetricVectorSample

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::volume" and the header file is <Volume/Volumetric/VolumetricVectorSample.h>

Description

Gets the vector value at the sample point.

Syntax

  • Python
  • C++
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.

# Get the value of the property.
propertyValue = volumetricVectorSample_var.value
"volumetricVectorSample_var" is a variable referencing a VolumetricVectorSample object.
#include <Volume/Volumetric/VolumetricVectorSample.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = volumetricVectorSample_var->value();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version May 2025


WebFeature Object

Derived from: Feature Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Object that represents an existing web feature in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.
entityToken Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
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.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.
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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the collection of attributes associated with this face.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the bodies that were modified or created by this feature. This property works for both parametric and non-parametric features.

For a BaseFeature, this property has two different behaviors depending on if the BaseFeature is active for edit or not. When the base feature is active, this property returns the bodies owned by the base feature or the source bodies. When the base feature is not active, this property returns the result bodies.

When a body is added to a base feature, that body is owned by the base feature and is only seen in the UI when the base feature is active. This body is referred to as a "source body". Fusion creates a parametric copy of the body when you exit the base feature. This copy is referred to as the "result body," and it is used for subsequent modeling operations.

You can map between the source and result bodies by using their position within the bodies returned. To get a valid list of result bodies, you should roll the timeline to immediately after the base feature node in the timeline. Otherwise, subsequent operations could have done something to cause one or more bodies to no longer be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Deletes the feature. This works for both parametric and non-parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

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.

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.entityToken Property

Parent Object: WebFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns a token for the Feature object. This can be saved and used at a later time with the Design.findEntityByToken method to get back the same feature.

When using entity tokens it's important to understand that the token string returned for a specific entity can be different over time. However, even if you have two different token strings that were obtained from the same entity, when you use findEntityByToken they will both return the same entity. Because of that you should never compare entity tokens as way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.entityToken
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
string propertyValue = webFeature_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2020


WebFeature.errorOrWarningMessage Property

Parent Object: WebFeature
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Depending on the modifications made to the body after the feature was created, this may not return all of the faces. For example, when a component is created from a body, the original body and its faces no longer exist, so this won't return any faces. However, you can roll the timeline to immediately after the feature, and all the original faces will be available.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the current health state of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Indicates if this feature is parametric or not.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

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.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the parent component that owns this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeature.h>

Description

Returns the timeline object associated with this feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

Collection that provides access to all of the existing web features in a design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Features.webFeatures

Version

Introduced in version September 2015


WebFeatures.classType Method

Parent Object: WebFeatures
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

The number of web features in the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

Function that returns the specified web feature using an index into the collection.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

Function that returns the specified web feature using the name of the feature.

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
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/WebFeatures.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

A WebRequestEvent represents an event that occurs in reaction to a Fusion protocol handler in a web page. For example, insertedFromURL and openedFromURL

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

Add a handler to be notified when the event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

The WebRequestEventArgs provides information associated with a web request event. These are events fired as a result of a Fusion protocol handler being invoked from a web page. Note that some properties are not available on every event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

Returns the value specified as the "file" parameter in the URL.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

Description

Used during the insertedFromURL or openedFromURL events and returns the Document (openedFromURL) or Occurrence (insertedFromURL) that was just created.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventArgs.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventHandler.h>

Description

The WebRequestEventHandler is a client implemented class that can be added as a handler to an WebRequestEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version May 2016


WebRequestEventHandler.notify Method

Parent Object: WebRequestEventHandler
Defined in namespace "adsk::core" and the header file is <Core/Application/WebRequestEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"webRequestEventHandler_var" is a variable referencing a WebRequestEventHandler object.
returnValue = webRequestEventHandler_var.notify(eventArgs)
"webRequestEventHandler_var" is a variable referencing a WebRequestEventHandler object.

#include <Core/Application/WebRequestEventHandler.h>

returnValue = 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


WorkingModel Object

Derived from: Design Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

A type of product that utilizes the internal "Working Model" functionality within Fusion. This is used where a model is referenced into another product. For example, when you create a Manufacturing Model, you see a copy of the original design, but you can make isolated edits to it within the Manufacturing Model. This is using the internal Working Model functionality to create an associative reference to a specific component.

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().
computeAll | Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.
createConfiguredDesign | Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.
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 flexible 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.
findEntityByToken | Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.
modifyParameters | Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.
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.
analyses | Gets the collection of design analyses associated with this design.
appearances | Returns the appearances contained in this document.
attributes | Returns the collection of attributes associated with this product.
configurationRowId | Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.
configurationTopTable | If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.
contactSets | Returns the contact sets associated with this design.
designPlasticRules | Gets the collection of plastic rules in the design.
designSheetMetalRules | Gets the collection of sheet metal rules in the design.
designType | Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.
isConfiguration | Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.
isConfiguredDesign | Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.
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 component 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.
libraryPlasticRules | Gets the collection of plastic rules in the plastic rule library.
librarySheetMetalRules | Gets the collection of sheet metal rules in the sheet metal rule library.
materials | Returns the materials contained in this document.
namedViews | Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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.
renderManager | Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.
rootComponent | Returns the root Component.
rootDataComponent | Preview Get the root DataComponent in this design. This is only available for top level designs.
selectionSets | Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.
snapshots | Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.
sourceComponent | Returns the component being referenced by this working model.
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.

Version

Introduced in version January 2024


WorkingModel.activateRootComponent Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.activateRootComponent()
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_var->activateRootComponent();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version January 2024


WorkingModel.activeComponent Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the component that is current being edited. This can return the root component or another component within the design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.activeComponent
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Component> propertyValue = workingModel_var->activeComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2024


WorkingModel.activeEditObject Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.activeEditObject
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Base> propertyValue = workingModel_var->activeEditObject();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2024


WorkingModel.activeOccurrence Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.activeOccurrence
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = workingModel_var->activeOccurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2024


WorkingModel.allComponents Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the Components collection that provides access to existing components in a design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.allComponents
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Components> propertyValue = workingModel_var->allComponents();

Property Value

This is a read only property whose value is a Components.

Version

Introduced in version January 2024


WorkingModel.allParameters Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.allParameters
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = workingModel_var->allParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version January 2024


WorkingModel.analyses Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets the collection of design analyses associated with this design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.analyses
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Analyses> propertyValue = workingModel_var->analyses();

Property Value

This is a read only property whose value is an Analyses.

Version

Introduced in version January 2024


WorkingModel.analyzeInterference Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Calculates the interference between the input bodies and/or occurrences.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.analyzeInterference(input)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_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.

Version

Introduced in version January 2024


WorkingModel.appearances Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the appearances contained in this document.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.appearances
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Appearances> propertyValue = workingModel_var->appearances();

Property Value

This is a read only property whose value is an Appearances.

Version

Introduced in version January 2024


WorkingModel.areaProperties Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
# Uses no optional arguments.
returnValue = workingModel_var.areaProperties(inputs)

# Uses optional arguments.
returnValue = workingModel_var.areaProperties(inputs, accuracy)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

// Uses no optional arguments.
returnValue = workingModel_var->areaProperties(inputs);

// Uses optional arguments.
returnValue = workingModel_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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version January 2024


WorkingModel.attributes Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the collection of attributes associated with this product.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.attributes
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = workingModel_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2024


WorkingModel.classType Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.WorkingModel.classType()
This is a static method.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = adsk::fusion::WorkingModel::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2024


WorkingModel.computeAll Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Forces a recompute of the entire design. This is the equivalent of the "Compute All" command.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.computeAll()
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_var->computeAll();

Return Value

Type | Description
boolean | Returns true if the compute completed. This doesn't indicate if all the items in the timeline successfully computed or not. You need to check the health state of each item in the timeline to determine if everything successfully computed or not.

Version

Introduced in version January 2024


WorkingModel.configurationRowId Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the ID of the row that defines this configuration. Use the isCongiguration property to determine if this Design is a configuration or not. If this is not a configuration, this property returns an empty string.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.configurationRowId
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
string propertyValue = workingModel_var->configurationRowId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


WorkingModel.configurationTopTable Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

If this design is a configured design or a configuration, this property returns the associated ConfigurationTopTable object. If this is not a configured design or configuration, this property returns null.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.configurationTopTable
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<ConfigurationTopTable> propertyValue = workingModel_var->configurationTopTable();

Property Value

This is a read only property whose value is a ConfigurationTopTable.

Version

Introduced in version January 2024


WorkingModel.contactSets Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the contact sets associated with this design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.contactSets
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<ContactSets> propertyValue = workingModel_var->contactSets();

Property Value

This is a read only property whose value is a ContactSets.

Version

Introduced in version January 2024


WorkingModel.createConfiguredDesign Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Converts this design into a configured design. The returned ConfigurationTable has a single row and no columns. You can use it to add columns and rows to define the configuration.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.createConfiguredDesign()
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_var->createConfiguredDesign();

Return Value

Type | Description
ConfigurationTopTable | Returns the ConfigurationTable that defines the configurations for this design.

Version

Introduced in version January 2024


WorkingModel.createInterferenceInput Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.createInterferenceInput(entities)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_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.

Version

Introduced in version January 2024


WorkingModel.deleteEntities Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Deletes the specified set of entities that are associated with this product.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.deleteEntities(entities)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_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 2024


WorkingModel.designPlasticRules Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets the collection of plastic rules in the design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.designPlasticRules
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = workingModel_var->designPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


WorkingModel.designSheetMetalRules Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets the collection of sheet metal rules in the design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.designSheetMetalRules
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = workingModel_var->designSheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version January 2024


WorkingModel.designType Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an existing 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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.designType

# Set the value of the property.
workingModel_var.designType = propertyValue
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
DesignTypes propertyValue = workingModel_var->designType();

// Set the value of the property, where value_var is a DesignTypes.
bool returnValue = workingModel_var->designType(value_var);

Property Value

This is a read/write property whose value is a DesignTypes.

Version

Introduced in version January 2024


WorkingModel.exportManager Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the ExportManager for this design. You use the ExportManager to export the current design in various formats.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.exportManager
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<ExportManager> propertyValue = workingModel_var->exportManager();

Property Value

This is a read only property whose value is an ExportManager.

Version

Introduced in version January 2024


WorkingModel.findAttributes Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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 flexible 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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.findAttributes(groupName, attributeName)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_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 January 2024


WorkingModel.findEntityByToken Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the entities associated with the provided token. The return is an array of entities. In most cases an array containing a single entity will be returned but there are cases where more than one entity can be returned. An example of this is where a token is obtained from a face and subsequent modeling operations cause the face to be split into two or more pieces. All of the faces that represent the original face will be returned with the first face being the most logical match to the original face.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.findEntityByToken(entityToken)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_var->findEntityByToken(entityToken);

Return Value

Type | Description
Base[] | Returns an array of entities associated with the provided token, or an empty array in the case where there are no matches.

Parameters

Name | Type | Description
entityToken | string | The input entity token you want to find the matching entity for.

Version

Introduced in version January 2024


WorkingModel.fusionUnitsManager Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns a specialized UnitsManager that can set the default length units and work with parameters.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.fusionUnitsManager
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<FusionUnitsManager> propertyValue = workingModel_var->fusionUnitsManager();

Property Value

This is a read only property whose value is a FusionUnitsManager.

Version

Introduced in version January 2024


WorkingModel.isConfiguration Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets if this design is a configuration. If this returns true, the configurationRowId can be used to get the row used to define this configuration. Also, when this is true, the design is essentially read-only and edits are either blocked from taking place or cannot be saved.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isConfiguration
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isConfiguration();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.isConfiguredDesign Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets if this design is a configured design. A configured design contains a configuration table. Use the configurationTable property to get the associated table.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isConfiguredDesign
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isConfiguredDesign();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.isContactAnalysisEnabled Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isContactAnalysisEnabled

# Set the value of the property.
workingModel_var.isContactAnalysisEnabled = propertyValue
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isContactAnalysisEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = workingModel_var->isContactAnalysisEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.isContactSetAnalysis Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isContactSetAnalysis

# Set the value of the property.
workingModel_var.isContactSetAnalysis = propertyValue
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isContactSetAnalysis();

// Set the value of the property, where value_var is a boolean.
bool returnValue = workingModel_var->isContactSetAnalysis(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.isRootComponentActive Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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 component in the browser. To activate the root component use the ActivateRootComponent method.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isRootComponentActive
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isRootComponentActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.isValid Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.isValid
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
boolean propertyValue = workingModel_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2024


WorkingModel.libraryPlasticRules Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets the collection of plastic rules in the plastic rule library.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.libraryPlasticRules
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<PlasticRules> propertyValue = workingModel_var->libraryPlasticRules();

Property Value

This is a read only property whose value is a PlasticRules.

Version

Introduced in version January 2024


WorkingModel.librarySheetMetalRules Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Gets the collection of sheet metal rules in the sheet metal rule library.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.librarySheetMetalRules
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<SheetMetalRules> propertyValue = workingModel_var->librarySheetMetalRules();

Property Value

This is a read only property whose value is a SheetMetalRules.

Version

Introduced in version January 2024


WorkingModel.materials Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the materials contained in this document.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.materials
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Materials> propertyValue = workingModel_var->materials();

Property Value

This is a read only property whose value is a Materials.

Version

Introduced in version January 2024


WorkingModel.modifyParameters Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Modifies the values of many parameters all at once. Changing them all at once is more efficient than modifying them one at a time.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
returnValue = workingModel_var.modifyParameters(parameters, values)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

returnValue = workingModel_var->modifyParameters(parameters, values);

Return Value

Type | Description
boolean | Returns true if setting all of the parameters was successful. Setting multiple parameters is either all or none. If it fails to set any parameters, none of them are updated, and the method will return false.

Parameters

Name | Type | Description
parameters | Parameter[] | An array of UserParameter and ModelParameter objects that you want to change the value. The parameters must all exist within the Design object you're calling this method from. They can be in any component but must be local components owned by the Design.
values ValueInput[] An array of ValueInput objects that defines the new value for each parameter defined by the "parameters" argument. This array must be the same size as the array used for the "parameters" argument, and the items in the arrays are used in the order they exist within the arrays. For example, the parameter at index 0 will use the value at index 0.

If you use the createByString method to create the ValueInput, the expression of the parameter will be edited, and the effect is the same as interactively editing the expression.When you set the expression, you can include units, references to other parameters, and math operators and functions.For example, "(Length / 3) * cos(Angle)" is a valid expression for a distance parameter if the parameters "Length" and "Angle" already exist.

If you use the createByReal method, the value is assigned directly and is always in the internal units for the unit type associated with the parameter.For example, if the parameter is a length, the value will ALWAYS be used as centimeters. If the parameter is an angle, the value will ALWAYS be used as radians.This is because the default design unit types for length are ignored, and internal units are ALWAYS used.

Version

Introduced in version January 2024


WorkingModel.namedViews Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the NamedViews object associated with this product. The NamedViews collection provides access to the named views defined in this product and supports the creation of new named views.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.namedViews
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<NamedViews> propertyValue = workingModel_var->namedViews();

Property Value

This is a read only property whose value is a NamedViews.

Version

Introduced in version January 2024


WorkingModel.objectType Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.objectType
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
string propertyValue = workingModel_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


WorkingModel.parentDocument Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the parent Document object.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.parentDocument
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Document> propertyValue = workingModel_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version January 2024


WorkingModel.physicalProperties Method

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc for a collection of 3D solid objects.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.
# Uses no optional arguments.
returnValue = workingModel_var.physicalProperties(inputs)

# Uses optional arguments.
returnValue = workingModel_var.physicalProperties(inputs, accuracy)
"workingModel_var" is a variable referencing a WorkingModel object.

#include <Fusion/Fusion/WorkingModel.h>

// Uses no optional arguments.
returnValue = workingModel_var->physicalProperties(inputs);

// Uses optional arguments.
returnValue = workingModel_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 CalculationAccuracy.LowCalculationAccuracy.

Version

Introduced in version January 2024


WorkingModel.productType Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

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.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.productType
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
string propertyValue = workingModel_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2024


WorkingModel.renderManager Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the RenderManager object associated with this design. Using the RenderManager you can access the same functionality that is available in the Render workspace.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.renderManager
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<RenderManager> propertyValue = workingModel_var->renderManager();

Property Value

This is a read only property whose value is a RenderManager.

Version

Introduced in version January 2024


WorkingModel.rootComponent Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the root Component.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.rootComponent
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Component> propertyValue = workingModel_var->rootComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2024


WorkingModel.rootDataComponent Property

Parent Object: WorkingModel

Preview This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Get the root DataComponent in this design. This is only available for top level designs.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.rootDataComponent
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<DataComponent> propertyValue = workingModel_var->rootDataComponent();

Property Value

This is a read only property whose value is a DataComponent.

Version

Introduced in version July 2025


WorkingModel.selectionSets Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the SelectionSets object associated with this product. If the product does not support selection sets, null is returned. The SelectionSets object is used to create and access existing selection sets.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.selectionSets
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<SelectionSets> propertyValue = workingModel_var->selectionSets();

Property Value

This is a read only property whose value is a SelectionSets.

Version

Introduced in version January 2024


WorkingModel.snapshots Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.snapshots
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Snapshots> propertyValue = workingModel_var->snapshots();

Property Value

This is a read only property whose value is a Snapshots.

Version

Introduced in version January 2024


WorkingModel.sourceComponent Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the component being referenced by this working model.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.sourceComponent
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Component> propertyValue = workingModel_var->sourceComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2024


WorkingModel.timeline Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the timeline associated with this design.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.timeline
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<Timeline> propertyValue = workingModel_var->timeline();

Property Value

This is a read only property whose value is a Timeline.

Version

Introduced in version January 2024


WorkingModel.unitsManager Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the UnitsManager object associated with this product.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.unitsManager
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = workingModel_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Version

Introduced in version January 2024


WorkingModel.userParameters Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the collection of User Parameters in a design

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.userParameters
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<UserParameters> propertyValue = workingModel_var->userParameters();

Property Value

This is a read only property whose value is a UserParameters.

Version

Introduced in version January 2024


WorkingModel.workspaces Property

Parent Object: WorkingModel
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/WorkingModel.h>

Description

Returns the workspaces associated with this product.

Syntax

  • Python
  • C++
"workingModel_var" is a variable referencing a WorkingModel object.

# Get the value of the property.
propertyValue = workingModel_var.workspaces
"workingModel_var" is a variable referencing a WorkingModel object.
#include <Fusion/Fusion/WorkingModel.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = workingModel_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version January 2024


Workspace Object

Derived from: Base Object
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

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).

Methods

Name | Description
activate | Activate the workspace (assuming it is valid to do so - a SIM workspace can't be activated if Fusion 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 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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 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 toolbar drop-down. The pop-up dialog that appears contains the tooltip, the tooltip description, and the tool clip which is a picture.

Accessed From

UserInterface.activeWorkspace, WorkspaceEventArgs.workspace, WorkspaceList.item, WorkspaceList.itemById, Workspaces.item, Workspaces.itemById

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspace.activate Method

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Activate the workspace (assuming it is valid to do so - a SIM workspace can't be activated if Fusion is the active product).

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.

Samples

Name Description
Additive Manufacturing MJF API Sample

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Version

Introduced in version August 2014


Workspace.classType Method

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Deletes this workspace. Only a workspace added by the API can be deleted, (IsNative is false).

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

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.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspace.isActive Property

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets if the workspace is currently active - i.e. displayed

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets if this workspace is native to Fusion or was created via the API.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets the visible name of the workspace as seen in the user interface. This is the localized name.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspace.objectType Property

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Returns the name of the product this workspace is associated with.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets or sets the resource folder.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets the collection containing the panels associated with this workspace. It's through this collection that you can add new toolbar panels.

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.

Version

Introduced in version August 2014


Workspace.toolbarTabs Property

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

Description

Gets the collection containing the tabs associated with this workspace.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2019


Workspace.toolClipFilename Property

Parent Object: Workspace
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

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.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

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 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".

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspace.h>

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 toolbar drop-down. The pop-up dialog that appears contains the tooltip, the tooltip description, and the tool clip which is a picture.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

A WorkspaceEvent represents a workspace related event. For example, workspaceActivate or workspaceDeactivate.

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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

Add a handler to be notified when the event occurs.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

The name of the event - e.g. "DocumentOpening"

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

Removes a handler from the event.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEvent.h>

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

The WorkspaceEventArgs provides information associated with a workspace event.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
workspace | Provides access to the workspace.

Version

Introduced in version March 2015


WorkspaceEventArgs.classType Method

Parent Object: WorkspaceEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

The event that the firing is in response to.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventArgs.h>

Description

Provides access to the workspace.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventHandler.h>

Description

The WorkspaceEventHandler is a client implemented class that can be added as a handler to a WorkspaceEvent.

Methods

Name | Description
notify | The function called by Fusion when the associated event is fired.

Version

Introduced in version March 2015


WorkspaceEventHandler.notify Method

Parent Object: WorkspaceEventHandler
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceEventHandler.h>

Description

The function called by Fusion when the associated event is fired.

Syntax

  • Python
  • C++
"workspaceEventHandler_var" is a variable referencing a WorkspaceEventHandler object.
returnValue = workspaceEventHandler_var.notify(eventArgs)
"workspaceEventHandler_var" is a variable referencing a WorkspaceEventHandler object.

#include <Core/UserInterface/WorkspaceEventHandler.h>

returnValue = 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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

A WorkspaceList is a list of Workspaces - e.g. the Workspaces for a given product.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

CAM.workspaces, Design.workspaces, Drawing.workspaces, FlatPatternProduct.workspaces, Product.workspaces, UserInterface.workspacesByProductType, WorkingModel.workspaces

Version

Introduced in version August 2014


WorkspaceList.classType Method

Parent Object: WorkspaceList
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

Gets the number of workspaces in the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

Returns the specified work space using an index into the collection.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

Returns the Workspace of the specified ID.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/WorkspaceList.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Provides access to all of the existing workspaces.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

UserInterface.workspaces

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspaces.classType Method

Parent Object: Workspaces
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Gets the number of workspaces in the collection.

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 API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspaces.isValid Property

Parent Object: Workspaces
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

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
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Returns the specified work space using an index into the collection.

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.

Samples

Name | Description
Write user interface to a file API Sample | Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Version

Introduced in version August 2014


Workspaces.itemById Method

Parent Object: Workspaces
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

Returns the Workspace of the specified ID.

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.

Samples

Name | Description
Customizing the UI using the API Sample | Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Version

Introduced in version August 2014


Workspaces.objectType Property

Parent Object: Workspaces
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/Workspaces.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

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


ZebraAnalyses Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

Provides access to any zebra analyses results in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that returns the specified ZebraAnalysis object using an index into the collection.
itemByName | A method that returns the specified ZebraAnalysis object using the name of the analysis as it is displayed in the browser.

Properties

Name | Description
count | Returns the number of ZebraAnalysis 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 This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Analyses.zebraAnalyses

Version

Introduced in version January 2023


ZebraAnalyses.classType Method

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ZebraAnalyses.classType()
This is a static method.

#include <Fusion/Fusion/ZebraAnalyses.h>

returnValue = adsk::fusion::ZebraAnalyses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


ZebraAnalyses.count Property

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

Returns the number of ZebraAnalysis objects in the collection.

Syntax

  • Python
  • C++
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.

# Get the value of the property.
propertyValue = zebraAnalyses_var.count
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.
#include <Fusion/Fusion/ZebraAnalyses.h>

// Get the value of the property.
uinteger propertyValue = zebraAnalyses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2023


ZebraAnalyses.isValid Property

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.

# Get the value of the property.
propertyValue = zebraAnalyses_var.isValid
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.
#include <Fusion/Fusion/ZebraAnalyses.h>

// Get the value of the property.
boolean propertyValue = zebraAnalyses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


ZebraAnalyses.item Method

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

A method that returns the specified ZebraAnalysis object using an index into the collection.

Syntax

  • Python
  • C++
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.
returnValue = zebraAnalyses_var.item(index)
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.

#include <Fusion/Fusion/ZebraAnalyses.h>

returnValue = zebraAnalyses_var->item(index);

Return Value

Type | Description
ZebraAnalysis | 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 2023


ZebraAnalyses.itemByName Method

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

A method that returns the specified ZebraAnalysis object using the name of the analysis as it is displayed in the browser.

Syntax

  • Python
  • C++
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.
returnValue = zebraAnalyses_var.itemByName(name)
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.

#include <Fusion/Fusion/ZebraAnalyses.h>

returnValue = zebraAnalyses_var->itemByName(name);

Return Value

Type | Description
ZebraAnalysis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the ZebraAnalysis object as it is displayed in the browser.

Version

Introduced in version January 2023


ZebraAnalyses.objectType Property

Parent Object: ZebraAnalyses
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalyses.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.

# Get the value of the property.
propertyValue = zebraAnalyses_var.objectType
"zebraAnalyses_var" is a variable referencing a ZebraAnalyses object.
#include <Fusion/Fusion/ZebraAnalyses.h>

// Get the value of the property.
string propertyValue = zebraAnalyses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


ZebraAnalysis Object

Derived from: Analysis Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

Represent any existing Zebra Analysis that exist in the design.

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you 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 | A method that deletes this Analysis.

Properties

Name | Description
attributes | A property that returns the collection of attributes associated with this Analysis.
entityToken Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.
isLightBulbOn | A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.
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 Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.
name | A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

ZebraAnalyses.item, ZebraAnalyses.itemByName

Version

Introduced in version January 2023


ZebraAnalysis.attributes Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

A property that returns the collection of attributes associated with this Analysis.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.attributes
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = zebraAnalysis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version January 2023


ZebraAnalysis.classType Method

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ZebraAnalysis.classType()
This is a static method.

#include <Fusion/Fusion/ZebraAnalysis.h>

returnValue = adsk::fusion::ZebraAnalysis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2023


ZebraAnalysis.deleteMe Method

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

A method that deletes this Analysis.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
returnValue = zebraAnalysis_var.deleteMe()
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

#include <Fusion/Fusion/ZebraAnalysis.h>

returnValue = zebraAnalysis_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2023


ZebraAnalysis.entityToken Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

Returns a token for the Analysis object. The token can be saved and used later with the Design.findEntityByToken method to get back the same Analysis.

When using entity tokens, it's crucial to understand that the token string returned for a specific entity can be different over time. For example, you can have two different token strings obtained from the same entity at different times, and when you use findEntityByToken they will both return the same entity. Because of that, you should never compare entity tokens as a way to determine what the token represents. Instead, you need to use the findEntityByToken method to get the two entities identified by the tokens and then compare them.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.entityToken
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
string propertyValue = zebraAnalysis_var->entityToken();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


ZebraAnalysis.isLightBulbOn Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

A property that gets and sets if the display is enabled for this Analysis object. If false, this analysis will be hidden. If true and the IsLightBulbOn property of the Analyses object is True the Analysis will be visible.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.isLightBulbOn

# Set the value of the property.
zebraAnalysis_var.isLightBulbOn = propertyValue
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
boolean propertyValue = zebraAnalysis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = zebraAnalysis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2023


ZebraAnalysis.isValid Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.isValid
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
boolean propertyValue = zebraAnalysis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


ZebraAnalysis.isVisible Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

Gets if this Analysis is currently visible in the graphics window. The visibility is controlled by a combination of the isLightBulbOn properties of the Analyses collection object and the Analysis object. If both are true, the Analysis will be visible.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.isVisible
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
boolean propertyValue = zebraAnalysis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2023


ZebraAnalysis.name Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

A property that gets and sets the name of the analysis. If you use a name that is not unique, Fusion will automatically append a number to the name to make it unique.

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.name

# Set the value of the property.
zebraAnalysis_var.name = propertyValue
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
string propertyValue = zebraAnalysis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = zebraAnalysis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2023


ZebraAnalysis.objectType Property

Parent Object: ZebraAnalysis
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ZebraAnalysis.h>

Description

This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Syntax

  • Python
  • C++
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.

# Get the value of the property.
propertyValue = zebraAnalysis_var.objectType
"zebraAnalysis_var" is a variable referencing a ZebraAnalysis object.
#include <Fusion/Fusion/ZebraAnalysis.h>

// Get the value of the property.
string propertyValue = zebraAnalysis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2023


AdditiveTechnologies Enumerator

Description

List of technologies a additive machine could have
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
BinderJettingTechnology | 4 | Multi fusion jet additive manufacturing process
DEDTechnology | 1 | Directed energy deposition additive manufacturing process.
FFFTechnology | 0 | Fused filament fabrication additive manufacturing process.
MFJTechnology | 3 | Multi fusion jet additive manufacturing process
MPBFTechnology | 2 | Machine powder bed fusion additive manufacturing process.
NATechnology | 7 | Non Additive Technology, meaning this is not a additive machine
OtherTechnology | 8 | Every other additive manufacturing process not covered by the types above
SLATechnology | 5 | Stereo lithographic apparatus additive manufacturing process
SLSTechnology | 6 | Selective laser sintering additive manufacturing process

Version

Introduced in version April 2023


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


ArrangePriorities Enumerator

Description

Defines the different types of arrange priorities that are supported.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
HighArrangePriority | 3 | High arrange priority.
LowArrangePriority | 1 | Low arrange priority.
MediumArrangePriority | 2 | Medium arrange priority.
VeryHighArrangePriority | 4 | Very high arrange priority.
VeryLowArrangePriority | 0 | Very low arrange priority.

Version

Introduced in version January 2025


ArrangePriorityTypes Enumerator

Description

Enum for the types of priority for an arrange selection.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
HighArrangePriorityType | 1 | High arrange priority
LowArrangePriorityType | 3 | Low arrange priority
MediumArrangePriorityType | 2 | Medium arrange priority
VeryHighArrangePriorityType | 0 | Very high arrange priority
VeryLowArrangePriorityType | 4 | Very low arrange priority

Version

Introduced in version March 2024


ArrangeRotationTypes Enumerator

Description

Defines the different types of rotations supported.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AllRotationsArrangeRotationType | 1 | Specifies that all rotation types are allowed.
GlobalArrangeRotationType | 0 | Specifies that a component is using the global rotation type.
NoneArrangeRotationType | 2 | Specifies that no rotation is allowed.
Only180ArrangeRotationType | 3 | Specifies that only 180 deg rotation is allowed.
Only90And270ArrangeRotationType | 4 | Specifies that only 90 and 270 deg rotation is allowed.

Version

Introduced in version January 2025


ArrangeSolverTypes Enumerator

Description

Defines the different types of arrangement solvers that are supported.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
Arrange2DRectangularSolverType | 1 | Rectangular 2D arrangement solver. This is an arrangement type where the rectangular bounding box of the component is used to calculate the arrangement, not the actual shape of the part.
Arrange2DTrueShapeSolverType | 0 | True Shape 2D arrangement solver. This is an arrangement type where the components are arranged on a plane so they fit tightly together honoring the arrangement definition.
Arrange3DSolverType | 2 | 3D arrangement solver. This is an arrangement type where the parts are arranged within a 3D rectangular volume where the bounding box of the parts is used to determine the size of the part.

Version

Introduced in version January 2025


AutomaticGenerationModes Enumerator

Description

Defines the automatic generation during the creation of an operation using OperationInput or createFromCAMTemplate2.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
ForceGeneration | 0 | Generate newly created operations.
SkipGeneration | 1 | Do not generate newly created operations.
UserPreference | 2 | Generate operations based on the preference set in the options UI.

Version

Introduced in version April 2023


BendReliefShapes Enumerator

Description

The bend relief shapes used for a single bend.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
RoundBendReliefShape | 2 | Round shape for the bend relief.
StraightBendReliefShape | 0 | Straight shape for the bend relief.
TearBendReliefShape | 1 | Tear shape for the bend relief.

Version

Introduced in version November 2022


BooleanOptions Enumerator

Description

The different values that can be used when specifying whether an item should use a default, or be true or false.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
DefaultBooleanOption | 0 | Specifies that the default value should be used.
FalseBooleanOption | 2 | Specifies the value is False.
TrueBooleanOption | 1 | Specifies the value is True.

Version

Introduced in version March 2024


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


BossAlignmentTypes Enumerator

Description

List of different types of boss alignment shape types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BossAlignFlat | 0 | Boss flat alignment.
BossAlignStepIn | 2 | Boss with step in.
BossAlignStepOut | 1 | Boss with step out.

Version

Introduced in version October 2022


BossHoleExtentTypes Enumerator

Description

List of the different types of boss hole extent types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BossBlindDepth | 2 | Blind hole set by hole depth.
BossBlindFull | 1 | Blind hole of max depth with offset from bottom.
BossHoleThrough | 0 | Hole through all body.

Version

Introduced in version October 2022


BossRibExtentTypes Enumerator

Description

List of different types of boss rib extent type.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
RibSizeByLength | 0 | Boss rib has given shape and length as specified.
RibSizeToNext | 1 | Boss rib has shape of web and extents to next face.
RibSuppressed | 2 | Boss rib is suppressed.

Version

Introduced in version October 2022


BossRibShapeTypes Enumerator

Description

List of different types of boss rib shape.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BossRibShapeChamfer | 1 | Boss with chamfered ribs.
BossRibShapeFillet | 2 | Boss with filleted ribs
BossRibShapeNone | 0 | Boss with no ribs.

Version

Introduced in version October 2022


BossShapeTypes Enumerator

Description

List of different boss shank shape types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BossBlank | 0 | Blank boss with no hole and constant diameter.
BossConstDiameter | 1 | Boss with constant outer shank diameter.
BossConstThickness | 2 | Boss with constant shank thickness. Not supported yet.

Version

Introduced in version October 2022


BoundingBoxEntityTypes Enumerator

Description

Specifies the various types of entities that can be included in bounding box calculations. This is a bitwise friendly enum so types can be combined to specify more than one type.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AllEntitiesBoundingBoxEntityType | 0 | Will include all types of geometry in the calculation.
ConstructionBoundingBoxEntityType | 16 | Includes the visible portion of construction geometry in the bounding box calculation.
MeshBodyBoundingBoxEntityType | 4 | Includes mesh bodies in the bounding box calculation.
SketchBoundingBoxEntityType | 8 | Includes sketch geometry in the bounding box calculation.
SolidBRepBodyBoundingBoxEntityType | 1 | Includes Solid B-Rep bodies in the bounding box calculation.
SurfaceBodyBoundingBoxEntityType | 2 | Includes B-Rep bodies that are not watertight (surfaces) in the bounding box calculation.

Version

Introduced in version January 2024


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


CAM3MFSupportInclusionType Enumerator

Description

Sets how the support should be included into the 3mf Options are not to be included, as 3mf support object or as 3mf model object
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
IncludeAsModelType | 2 | Include the support as 3mf model object
IncludeAsSupportType | 1 | Include the support as 3mf support object
NotIncluded | 0 | Don't include the support.

Version

Introduced in version January 2024


CAMAdditiveContainerTypes Enumerator

Description

Enum specifying the types of additive containers available in Fusion. Some additive containers not listed here are available via other API classes, i.e. PrintSetting
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AdditiveProcessSimulationCAMAdditiveContainerType | 3 | Contains all additive process simulation studies. Containers of this type cannot be deleted.
BodyPresetCAMAdditiveContainerType | 2 | Contains all body presets used in the setup. Containers of this type cannot be deleted.
OptimizedOrientationCAMAdditiveContainerType | 1 | Contains all optimized orientation operations.
SupportCAMAdditiveContainerType | 0 | Contains all support operations.

Version

Introduced in version July 2024


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 determining 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 connected and tangent at the connection. This will work for both sketch curves and edges.

Version

Introduced in version August 2016


ChamferCornerTypes Enumerator

Description

Specifies the type of corner to model when multiple edges come together at a vertex.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BlendCornertype | 2 | A blend surface is created to define the corner.
ChamferCornerType | 0 | The default corner type, where a small patch is created at the corner.
MiterCornerType | 1 | The chamfer surfaces extend and intersect one another to create the corner.

Version

Introduced in version December 2020


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 canceled 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


ConfigurationClearanceHoleColumns Enumerator

Description

Enum that defines the valid combinations of clearance hole columns that can be configured.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
Size_ClearanceHoleColumns | 2 | Defines that the clearance hole size and fit will be used to partially define the clearance hole. The Hole feature controls the standard and fastener type, and the fit is defined separately.
Standard_Type_Size_ClearanceHoleColumns | 0 | Defines that the clearance hole standard, fastener type, and and size will be used to define the clearance hole. The fit is defined separately.
Type_Size_ClearanceHoleColumns | 1 | Defines that the clearance hole fastener type, and size will be used to partially define the clearance hole. The Hole feature controls the standard, and the fit is defined separately.

Version

Introduced in version January 2025


ConfigurationFeatureAspectTypes Enumerator

Description

Defines a list of all of the different aspects of a feature that can be configured.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
ClearanceHoleFitFeatureAspectType | 13 | A feature aspect that defines the fit of a clearance hole.
ClearanceHoleSizeFeatureAspectType | 12 | A feature aspect that defines the size of a clearance hole.
ClearanceHoleStandardFeatureAspectType | 10 | A feature aspect that defines the standard for a clearance hole.
ClearanceHoleTypeFeatureAspectType | 11 | A feature aspect that defines the fastener type of a clearance hole.
JointFlipFeatureAspectType | 7 | A feature aspect that controls if a joint is flipped.
JointSnapOneFeatureAspectType | 8 | A feature aspect that defines the snap to the first occurrence of a joint.
JointSnapTwoFeatureAspectType | 9 | A feature aspect that defines the snap to the second occurrence of a joint.
ThreadClassFeatureAspectType | 3 | A feature aspect that defines the thread class of a thread or tapped hole.
ThreadDesignationFeatureAspectType | 2 | A feature aspect that defines the thread designation of a thread or tapped hole.
ThreadFullLengthFeatureAspectType | 5 | A feature aspect that defines if the thread goes the full length of the cylinder.
ThreadIsRightHandedFeatureAspectType | 6 | A feature aspect that defines if the thread is right or left handed.
ThreadModeledFeatureAspectType | 4 | A feature aspect that defines if the thread is cosmetic or modeled.
ThreadSizeFeatureAspectType | 1 | A feature aspect that defines the thread size of a thread or tapped hole.
ThreadTypeFeatureAspectType | 0 | A feature aspect that defines the thread type of a thread or tapped hole.

Version

Introduced in version September 2024


ConfigurationThreadColumns Enumerator

Description

Enum that defines the valid combinations of thread columns that can be configured.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
TaperedDesignationColumns | 6 | Defines that the designation will be used to partially define a tapered tapped hole. The tapped hole controls thread type and size.
TaperedSize_DesignationColumns | 5 | Defines that the size and designation will be used to partially define a tapered tapped hole. The tapped hole controls the thread type.
TaperedThreadType_Size_DesignationColumns | 4 | Defines that the thread type, size, and designation will fully define a tapered tapped hole.
ThreadClassColumns | 3 | Defines that the thread class will be used to partially define the thread. The Thread feature or tapped hole controls the thread type, size, and designation.
ThreadDesignation_ClassColumns | 2 | Defines that the thread designation and class will be used to partially define the thread. The Thread feature or tapped hole controls the thread type and size.
ThreadSize_Designation_ClassColumns | 1 | Defines that the thread size, designation, and class will be used to partially define the thread. The Thread feature or tapped hole controls the thread type.
ThreadType_Size_Designation_ClassColumns | 0 | Defines that the thread type, size, designation, and class will fully define the thread on the thread feature or tapped hole.

Version

Introduced in version September 2024


ControlPointInterpolators Enumerator

Description

Types of interpolation functions for the control point maps.
Defined in namespace "adsk::volume" and the header file is <Volume\VolumeTypeDefs.h>

Methods

Name | Value | Description
CubicInterpolator | 2 | Point are interpolated using a cubic function.
LinearInterpolator | 0 | The point values are interpolated linearly.
NearestInterpolator | 1 | The value is set to the value of whichever point is nearest.
SmoothInterpolator | 3 | Points are interpolated with smooth tangent transitions.

Version

Introduced in version May 2025


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.
Polyline2DCurveType | 7 | Transient 2D polyline.

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.
Polyline3DCurveType | 7 | Transient 3D polyline.

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 default modeling 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


DefaultGroupType Enumerator

Description

Types of default groups. Used to specify which default group to be retrieved by defaultGroup method.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
Adjacent_GroupType | 5 | Group containing Adjacent surfaces.
Drive_GroupType | 2 | Group containing Drive surfaces.
Fixture_GroupType | 0 | Group containing surfaces belonging to the fixture. Some of these may have been defined in the setup.
Floor_GroupType | 3 | Group containing Floor surfaces.
Model_GroupType | 1 | Group containing surfaces belonging to the model. These have been defined in the setup or using the model override selector.
Wall_GroupType | 4 | Group containing Wall surfaces.

Version

Introduced in version September 2024


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 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
HectometerDistanceUnits | 7 | Hectometer
InchDistanceUnits | 3 | Inch
MeterDistanceUnits | 2 | Meter
MicronDistanceUnits | 6 | Micron
MilDistanceUnits | 9 | Mil (One thousandth of an inch)
MileDistanceUnits | 8 | Mile
MillimeterDistanceUnits | 0 | Millimeter
NauticalMileDistanceUnits | 10 | Nautical Mile
YardDistanceUnits | 5 | Yard

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 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


ExtensionMethods Enumerator

Description

Enum for the types of extension methods for a chain selection. It defines how open curves are extended on their open end.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
ClosestBoundaryExtensionMethod | 1 | Closest boundary type of extension.
ParallelExtensionMethod | 2 | Parallel type of extension.
TangentExtensionMethod | 0 | Tangent type of extension.

Version

Introduced in version April 2023


ExtensionTypes Enumerator

Description

Enum for types of extension capping.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
BoundaryExtensionType | 0 | Caps the extended curves at the stock.
DistanceExtensionType | 1 | Caps the extended curves depending on the startExtensionLength and endExtensionLength properties.

Version

Introduced in version April 2023


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


FloatParameterValueTypes Enumerator

Description

Defines the type of a FloatParameterValue.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AngleValueType | 2 | Angle in radians (rad)
AreaValueType | 9 | Area in square centimeters (cm²)
FlowRateValueType | 8 | Flow rate in liters/minute (l/min)
LengthValueType | 1 | Length in centimeters (cm)
LinearVelocityValueType | 3 | Linear velocity in millimeters/minute (mm/min)
PowerValueType | 7 | Power in Watts (W)
RotationalVelocityValueType | 4 | Rotational velocity in revolutions per minute (rpm)
TemperatureValueType | 11 | Temperature in degrees Celsius (C)
TimeValueType | 5 | Time in seconds (s)
UnspecifiedValueType | 0 | Unspecified type can reprecent any type
VolumeValueType | 10 | Volume in cubic centimeters (cm³)
WeightValueType | 6 | Weight in kilograms (kg)

Version

Introduced in version May 2023


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


FusionHubExecutionBehaviors Enumerator

Description

Enum to define the behavior when posting to Fusion hub.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
FusionHubExecutionBehavior_ExportWithRelationship | 2 | Post to Fusion Hub while setting the parent document as a relationship. In the UI this will raise a "save document" dialog if the parent document's save state is not up to date. Cancelling the dialog, or if none is shown, will result in the document not being saved and the post result being exported without setting the relationship in Fusion Hub. This is the default value.
FusionHubExecutionBehavior_ForceExportWithRelationship | 0 | Post to Fusion Hub while setting the parent document as a relationship. In the UI this will raise a "save document" dialog if the parent document's save state is not up to date. Cancelling the dialog, or if none is shown, will result in the document not being saved and the post result not being exported.
FusionHubExecutionBehavior_SilentForceExportWithRelationship | 1 | Post to Fusion Hub while setting the parent document as a relationship. The document and post result are both saved in the Fusion Hub folder specified. If the document has not been saved before, then a new document named "NCProgramPostProcess_YYYYMMDD_HH:MM:SS" will be created with YYYYMMDD_HH:MM:SS being substituted with the current date time.
FusionHubExecutionBehavior_SkipRelationship | 3 | Post to Fusion Hub without setting the parent document as a relationship. The parent document does not need to be saved to post to Fusion Hub.

Version

Introduced in version July 2024


FutureStates Enumerator

Description

The different states of a future.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
FailedFutureState | 2 | The process associated with the future has failed.
FinishedFutureState | 1 | The process associated with the future has successfully finished.
ProcessingFutureState | 0 | The process associated with the future is still processing.

Version

Introduced in version September 2024


GeneratedDataType Enumerator

Description

Enum for the identifiers of generated results an OperationBase object can have
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
OptimizedOrientationGeneratedDataType | 0 | Optimized orientation identifier

Version

Introduced in version July 2023


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 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


GraphicsPresets Enumerator

Description

Defines the different options for preset graphic setting definitions.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
CustomGraphicsPreset | 2 | Allows setting the graphics settings with any values.
PerformanceGraphicsPreset | 0 | Sets the graphics settings to get the best performance.
QualityGraphicsPreset | 1 | Sets the graphics settings to get the best quality.

Version

Introduced in version May 2025


GraphOutputNodeTypes Enumerator

Description

Types of graph output nodes for the main graph.
Defined in namespace "adsk::volume" and the header file is <Volume\VolumeTypeDefs.h>

Methods

Name | Value | Description
BoundarySDFOutputNodeType | 0 | Scalar. Distance field of the boundary object of the model. Only used in the primary graph.
CellLatticeShapeOutputNodeType | 6 | Scalar. Defines the shape of the volumetric lattice cell. Only used in the cell graph.
CellTextureShapeOutputNodeType | 7 | Scalar. Defines the shape of the volumetric texture cell. Only used in the cell graph.
ColorOutputNodeType | 2 | RGBA. The color of the model at all points within it. Only used in the primary graph.
LatticeCoordinatesOutputNodeType | 3 | Vector3. The coordinate system for the lattice cells. Mapping from the global xyz coordinates to lattice cell coordinates. Only used in the primary graph.
LatticeDensityOutputNodeType | 1 | Scalar. Density/solidity of the volumetric model lattice at all points within it. Only used in the primary graph.
TextureCoordinatesOutputNodeType | 5 | Vector3. The coordinate system for the volumetric texture cells. Mapping from the global xyz coordinates to texture cell coordinates. Only used in the primary graph.
TextureDensityOutputNodeType | 4 | Scalar. Strength of the volumetric model texture at all points within it. Only used in the primary graph.

Version

Introduced in version May 2025


GraphTypes Enumerator

Description

Graph types for a volumetric model.
Defined in namespace "adsk::volume" and the header file is <Volume\VolumeTypeDefs.h>

Methods

Name | Value | Description
CellGraphType | 1 | The graph for the cell that is repeated across the volume.
PrimaryGraphType | 0 | The main graph containing the boundary, density, colour and UVW mapping subgraphs.

Version

Introduced in version May 2025


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


HoleSegmentType Enumerator

Description

Represents the recognized geometric shape of a hole segment.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
HoleSegmentTypeCone | 1 | Hole segment is conical in shape.
HoleSegmentTypeCylinder | 0 | Hole segment is cylindrical in shape.
HoleSegmentTypeFlat | 2 | Hole segment is flat in shape, i.e. planar and perpendicular to the hole axis.
HoleSegmentTypeTorus | 3 | Hole segment is toroidal in shape.

Version

Introduced in version May 2023


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


HorizontalAlignments Enumerator

Description

Defines the different horizontal alignments that can be applied to text.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
CenterHorizontalAlignment | 1 | Aligned along the center.
LeftHorizontalAlignment | 0 | Aligned to the left.
RightHorizontalAlignment | 2 | Aligned to the right.

Version

Introduced in version December 2020


HttpMethods Enumerator

Description

The HTTP methods supported by the HttpRequest object.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
DeleteMethod | 3 | DELETE HTTP method.
GetMethod | 0 | GET HTTP method.
PatchMethod | 4 | PATCH HTTP method.
PostMethod | 1 | POST HTTP method.
PutMethod | 2 | PUT HTTP method.

Version

Introduced in version January 2024


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.
JointByTwoEdgeIntersectionGeometry | 9 | Joint geometry defined by two edge intersection.
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.
JointTangentBRepFaceEdgeGeometry | 11 | Joint geometry defined by tangent face and edge.
JointTangentBRepFaceGeometry | 10 | Joint geometry defined by tangent faces: cylinder or cone, sphere, torus and spline

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


JointQuadrantAngleTypes Enumerator

Description

List of the various angle types of geometry that can be used when defining joint geometry on cylinder or cone, sphere and torus
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
MiddleJointQuadrantAngleType | 2 | Specifies the angle at the half point of a circle
QuarterJointQuadrantAngleType | 1 | Specifies the angle at the quarter point of a circle
StartJointQuadrantAngleType | 0 | Specifies the angle at the start point of a circle
ThirdQuarterJointQuadrantAngleType | 3 | Specifies the angle at the third quarter point of a circle

Version

Introduced in version May 2025


JointTangentFaceEdgePointTypes Enumerator

Description

List of the tangent face types, including cylinder or cone, sphere, torus and spline.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
EndJointTangentFaceEdgePointType | 4 | Specifies the end point of the edge.
MiddleJointTangentFaceEdgePointType | 2 | Specifies the middle point of the edge.
QuarterJointTangentFaceEdgePointType | 1 | Specifies the point at the quarter of whole length of the edge.
StartJointTangentFaceEdgePointType | 0 | Specifies the start point of the edge.
ThirdQuarterJointTangentFaceEdgePointType | 3 | Specifies the point at third quarter of whole length of the edge.

Version

Introduced in version May 2025


JointTangentFaceTypes Enumerator

Description

List of the tangent face types, including cylinder or cone, sphere, torus and spline.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CylinderOrConeJointTangentFaceType | 1 | Specifies the tangent face type for cyliner or cone
NoneJointTangentFaceType | 0 | Specifies the tangent face type for cyliner or cone
SphereJointTangentFaceType | 2 | Specifies the tangent face type for sphere
SplineJointTangentFaceType | 4 | Specifies the tangent face type for spline
TorusJointTangentFaceType | 3 | Specifies the tangent face type for torus

Version

Introduced in version May 2025


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.
InferredJointType | 7 | Specifies a joint that is inferred from the input geometry.
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


LibraryLocations Enumerator

Description

List of locations representing folders in the library dialogs.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
CloudLibraryLocation | 1 | Represents the cloud folder in the library.
ExternalLibraryLocation | 4 | Represents an external folder that is not in the library.
Fusion360LibraryLocation | 5 | Represents the fusion 360 folder in the library.
LocalLibraryLocation | 0 | Represents the local folder in the library.
NetworkLibraryLocation | 2 | Represents the network folder in the library. For internal use only.
OnlineSamplesLibraryLocation | 3 | Represents the online samples folder in the library. For internal use only.

Version

Introduced in version April 2023


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


LocalRenderStates Enumerator

Description

The different states of a local rendering.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FailedLocalRenderState | 3 | Indicates the rendering has failed and is no longer processing.
FinishedLocalRenderState | 2 | Indicates the rendering has finished.
ProcessingLocalRenderState | 1 | Indicates the rendering is processing.
QueuedLocalRenderState | 0 | Indicates the rendering is queued, waiting to start.

Version

Introduced in version May 2023


LoftEdgeAlignments Enumerator

Description

List of Loft Edge Alignment Options
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AlignEdgesLoftEdgeAlignment | 1 | Specifies the edges of the loft are aligned with the edges of the face the loft starts or ends at.
AlignToSurfaceLoftEdgeAlignment | 2 | Specifies the edges of the loft are aligned with the face the loft starts or ends at.
FreeEdgesLoftEdgeAlignment | 0 | Specifies the loft edges are not influenced by edges or faces the loft starts or ends at.

Version

Introduced in version September 2024


LoftRailEdgeConditions Enumerator

Description

Defines the different conditions that can be applied to a loft rail when the rail entity is defined by BRepEdge objects.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
G0LoftRailEdgeCondition | 0 | Defines a G0 or connected edge condition.
G1LoftRailEdgeCondition | 1 | Defines a G1 or tangent edge condition.
G2LoftRailEdgeCondition | 2 | Defines a G2 or curvature continuous edge condition.

Version

Introduced in version November 2022


LogLevels Enumerator

Description

Log message level
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
ErrorLogLevel | 0 | Use this type to log error message.
InfoLogLevel | 2 | Use this type to log info message.
WarningLogLevel | 1 | Use this type to log warning message.

Version

Introduced in version July 2021


LogTypes Enumerator

Description

Location where messages should be logged.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
ConsoleLogType | 1 | Log information to Fusion text command window. This logs only the provided message string.
FileLogType | 0 | Log information to the Fusion app log file.

Version

Introduced in version July 2021


LoopTypes Enumerator

Description

Enum to define the type of loop for a face contour selection.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AllLoops | 0 | Specifies inside and outside loops of the selected geometry.
OnlyInsideLoops | 2 | Specifies only the inner contours. There can be none or any number of inner contours per entity.
OnlyOutsideLoops | 1 | Specifies only the outer contours of the loop. There is only one outer contour per entity.

Version

Introduced in version April 2023


MachineAnglePreferences Enumerator

Description

Preference for rotary axis starting angles.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
MachineAngleNoPreference | 0 | No preference, use any solution.
MachineAnglePreferNegative | 1 | Prefer starting rotary axis with a negative tilt.
MachineAnglePreferPositive | 2 | Prefer starting rotary axis with a positive tilt.

Version

Introduced in version April 2023


MachineAxisCoordinates Enumerator

Description

Options to control which coordinate is used for post processing, independent of the axis direction. Instructs the post processor to treat the axis as X, Y, or Z for linear and A, B, or C for rotary.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
MachineCoordinate_None | 0 | Axis has no coordinate set.
MachineCoordinate_X_A | 1 | Axis coordinate Linear X, Rotary A
MachineCoordinate_Y_B | 2 | Axis coordinate Linear Y, Rotary B
MachineCoordinate_Z_C | 3 | Axis coordinate Linear X, Rotary C

Version

Introduced in version April 2023


MachineAxisTypes Enumerator

Description

List of machine axis types for MachineAxis
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
LinearMachineAxisType | 0 | An axis that moves in a straight line
RotaryMachineAxisType | 1 | An axis that rotates about a point

Version

Introduced in version April 2023


MachineCoolant Enumerator

Description

Enumeration of possible coolants that a machine can use.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
MachineCoolant_AIR | 3 |
MachineCoolant_AIR_THROUGH_TOOL | 4 |
MachineCoolant_FLOOD | 0 |
MachineCoolant_FLOOD_MIST | 6 |
MachineCoolant_FLOOD_THROUGH_TOOL | 7 |
MachineCoolant_MIST | 1 |
MachineCoolant_SUCTION | 5 |
MachineCoolant_THROUGH_TOOL | 2 |

Version

Introduced in version July 2025


MachinePartTypes Enumerator

Description

List of part types for MachinePart
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AxisMachinePartType | 1 | Part type for a part that represents a machine axis.
BasicMachinePartType | 0 | Basic type for machine parts. Can be used to represent non-moving elements of the machine such as the machine's base or an enclosure.
FixtureAttachmentMachinePartType | 3 | Part type for a part that represents the attachment point and orientation for work holding.
ToolAttachmentMachinePartType | 2 | Part type for a part that represents the attachment point and orientation for a tool or tool holder.

Version

Introduced in version April 2023


MachineResetOptions Enumerator

Description

Axis reset preference options for MachineAxisConfiguration.whenToReset.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
MachineResetBeforeEveryOperation | 1 | Reset axis to zero before each operation begins.
MachineResetBeforeOpAndOnRewind | 3 | Reset axis to zero before each operation begins and during automated rewinds.
MachineResetNever | 0 | Remember axis position from previous operation
MachineResetOnRewind | 2 | Reset axis to zero during automated rewinds.

Version

Introduced in version April 2023


MachineTemplate Enumerator

Description

List of the machine templates to create a machine from.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
Generic3Axis | 1 | Represents a generic 3 axis machine with 3 linear axes.
Generic4Axis | 2 | Represents a generic 4 axis machine with 3 linear axes and 1 rotary. Default rotary axis is A.
Generic5AxisHeadHead | 3 | Represents a generic 5 axis machine with 3 linear axes and 2 rotary. Default rotary axes are A and C in a Head-Head configuration.
Generic5AxisHeadTable | 4 | Represents a generic 5 axis machine with 3 linear axes and 2 rotary. Default rotary axes are A and C in a Head-Table configuration.
Generic5AxisTableTable | 5 | Represents a generic 5 axis machine with 3 linear axes and 2 rotary. Default rotary axes are A and C in a Table-Table configuration.
GenericFFF | 6 | Represents a generic FFF machine with two extruders. The default build room dimension is 300mm by 300mm by 300mm.
GenericLathe | 0 | Represents a generic 2 axis turning machine.

Version

Introduced in version April 2023


MachiningMode Enumerator

Description

Specifies how to treat a surface group
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
Avoid_MachiningMode | 0 | The tool avoids these surfaces while it machines nearby surfaces. The tool stays clear from the avoid surfaces by the specified clearances.
Fixture_MachiningMode | 3 | The tool avoids these surfaces by the specified clearances.
Gouge_MachiningMode | 2 | The tool does not actively avoid or machine these surfaces. However, if these surfaces are on the path of the tool then it may gouge and cut through them.
Machine_MachiningMode | 1 | The tool machines the selected surfaces leaving stock on them according to the stock to leave value.

Version

Introduced in version September 2024


MassUnits Enumerator

Description

Valid unit types for mass.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
GramMassUnits | 0 | Grams
KilogramMassUnits | 1 | Kilograms
OunceMassUnits | 3 | Ounces
PoundMassUnits | 2 | Pounds
SlugMassUnits | 5 | Slugs
TonMassUnits | 4 | Tons

Version

Introduced in version May 2025


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


MeshCombineOperationTypes Enumerator

Description

Specify the combine method for the mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CutMeshCombineType | 1 | Removes overlapping areas from target body.
IntersectMeshCombineType | 2 | Combines overlapping areas into a mesh body.
JoinMeshCombineType | 0 | Combines multiple mesh bodies into a single mesh body by enclosing their volumes.
MergeMeshCombineType | 3 | Combines multiple mesh bodies into a single mesh body without altering the faces of the original mesh.

Version

Introduced in version January 2025


MeshConvertAccuracyTypes Enumerator

Description

Specify the resolution for the organic mesh conversion if ByAccuracyMeshConvertResolutionType is selected
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
HighMeshConvertAccuracyType | 2 | Converts the body with high accuracy compared to the original mesh body. (Average)
LowMeshConvertAccuracyType | 0 | Converts the body with low accuracy compared to the original mesh body. (Fastest)
MediumMeshConvertAccuracyType | 1 | Converts the body with medium accuracy compared to the original mesh body. (Fast)
PreciseMeshConvertAccuracyType | 3 | Converts the body with the highest possible accuracy compared to the original mesh body. (Slowest)

Version

Introduced in version July 2025


MeshConvertMethodTypes Enumerator

Description

Specify the convert method for the mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FacetedMeshConvertMethodType | 0 | Converts individual faces on the mesh body to individual faces on the new solid or surface body.
OrganicMeshConvertMethodType | 2 | This converts the mesh body to an organically shaped solid or surface body. Only accessible if the product design extension is active.
PrismaticMeshConvertMethodType | 1 | Merges groups of faces in prismatic features into singular faces on the new solid or surface body. Face groups are used to infer prismatic features.

Version

Introduced in version July 2025


MeshConvertOperationTypes Enumerator

Description

Specify the operation method for the mesh conversion.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BaseFeatureMeshConvertOperationType | 1 | A base feature is created after the operation.
ParametricFeatureMeshConvertOperationType | 0 | A parametric MeshConvert feature is created after the operation.

Version

Introduced in version July 2025


MeshConvertResolutionTypes Enumerator

Description

Specify the resolution method for the organic mesh conversion.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
ByAccuracyMeshConvertResolutionType | 0 | Creates a solid or surface body that matches the shape of the original mesh body more or less accurately, based on the resolution you select.
ByFacetNumberMeshConvertResolutionType | 1 | Creates solid or surface body with a specific number of faces.

Version

Introduced in version July 2025


MeshGenerateFaceGroupsMethodTypes Enumerator

Description

Specify the generate face group method for the mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AccurateGenerateFaceGroupsType | 1 | Generates face groups by matching mesh faces to simple geometric primitives. Prioritizes accuracy over speed.
FastGenerateFaceGroupsType | 0 | Generates face groups based on an angle threshold between faces. Prioritizes speed over accuracy.

Version

Introduced in version January 2025


MeshReduceMethodTypes Enumerator

Description

Specify the reduce method for the mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AdaptiveReduceType | 0 | Creates smaller(larger) faces in areas of high (low) detail.
UniformReduceType | 1 | Creates faces of similar size in all areas.

Version

Introduced in version March 2024


MeshReduceTargetTypes Enumerator

Description

Specify what the target criteria for the reduction should be.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FaceCountMeshReduceTargetType | 2 | Reduces mesh to a given specific number of faces.
MaximumDeviationMeshReduceTargetType | 0 | Reduces mesh by merging faces within a maximum deviation from the original mesh shape. If this criteria type is used, the reduce method type is ignored and the adaptive method is always applied.
ProportionMeshReduceTargetType | 1 | Reduces mesh to a given proportion of the number of faces on the original mesh.

Version

Introduced in version March 2024


MeshRefinementSettings Enumerator

Description

The different refinement settings supported when exporting the design as an STL or 3MF 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


MeshRemeshMethodTypes Enumerator

Description

Specify the re-mesh method for the mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AdaptiveRemeshType | 0 | Creates smaller(larger) faces in areas of high (low) detail.
UniformRemeshType | 1 | Creates faces of similar size in all areas.

Version

Introduced in version March 2024


MeshRepairRebuildTypes Enumerator

Description

Specify the method for the rebuild type of mesh repair. If AccurateMeshRepairRebuildType is chosen, an offset can be set.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AccurateMeshRepairRebuildType | 2 | Rebuilds mesh body as accurately as possible.
BlockyMeshRepairRebuildType | 3 | The mesh will be rebuild in a blocky style.
FastMeshRepairRebuildType | 0 | Rebuilds mesh body quickly, but not accurately.
PreserveSharpEdgesMeshRepairRebuildType | 1 | Rebuilding the mesh, while preserving sharp edges.

Version

Introduced in version March 2024


MeshRepairTypes Enumerator

Description

Specify the main repair type for the mesh. If RebuildMeshRepairType is chosen, other parameters can be set.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CloseHolesMeshRepairType | 0 | Simplest and fastest type of repair, only close holes and fix flipped triangles are used to fix the part.
RebuildMeshRepairType | 3 | Reconstructs the mesh body using one of 4 MeshRepairRebuildTypes. All inner structures are destroyed.
StitchAndRemoveMeshRepairType | 1 | Makes the same changes as CloseHolesMeshRepairType, and also stitches triangles, removes double triangles, removes degenerated faces, and removes tiny shells.
WrapMeshRepairType | 2 | Uses in addition to the methods in StitchAndRemoveMeshRepairType also the wrapped method. This methods takes time and removes internal structure.

Version

Introduced in version March 2024


MeshSeparateTypes Enumerator

Description

Specifies the output options for separating a mesh body. Only valid if the input is a mesh body.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FaceGroupMeshSeparateType | 1 | Separates all face groups into independent mesh bodies.
ShellMeshSeparateType | 0 | Separates all mesh shells into independent mesh bodies.

Version

Introduced in version July 2025


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


ModifyUtilityTypes Enumerator

Description

Types of provided ModifyUtility.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AdditiveSetupModifyUtility | 0 | Utility for modifications of additive setups. Corresponds to AdditiveSetupUtility.

Version

Introduced in version September 2023


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


NodePinTypes Enumerator

Description

Different types that graph nodes input and output types can be.
Defined in namespace "adsk::volume" and the header file is <Volume\VolumeTypeDefs.h>

Methods

Name | Value | Description
ColorNodePinType | 3 |
NoNodePinType | 0 |
ScalarNodePinType | 1 |
VectorNodePinType | 2 |

Version

Introduced in version May 2025


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. These settings are used when the curves are offset outwards, which creates a gap at the corner. These represent the three ways the gap is filled.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CircularOffsetCornerType | 0 | Creates an arc at the corner to fill the gap. This is similar to filleting the corner with a fillet that is the same radius as the offset.
ExtendedOffsetCornerType | 2 | Extends the offset curves so the connect at the corner.
LinearOffsetCornerType | 1 | Creates lines that are tangent to the offset curves and connect at the corner.

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


OperatingSystems Enumerator

Description

Defines the various operating systems that a script or add-in can run on.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
MacOperatingSystem | 1 | Specifies the script or add-in will only run on Mac.
WindowsAndMacOperatingSystem | 2 | Specifies the script or add-in will run on Windows and Mac.
WindowsOperatingSystem | 0 | Specifies the script or add-in will only run on Windows.

Version

Introduced in version October 2023


OperationStates Enumerator

Description

The possible states of an operation. Some operations do not generate toolpaths, their state ignores the potential toolpath states.
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 or its toolpath is invalid.
IsValidOperationState | 0 | Indicates the state where the operation is valid and is up to date and the toolpath exists if applicable.
NoToolpathOperationState | 3 | Indicates the state where the toolpath does not exist for an operation. Not applicable for operations that do not generate toolpaths.
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.
Chamfer2D | 36 | A 2D machining strategy that machines along contours creating a chamfered surface.
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.
Flow | 33 | A 3D finishing strategy which follows the isocurves of a surface to machine parts with curved surfaces. Flow is a 3-Axis toolpath by default but can be used in multi-axis modes.
Flow2 | 34 | A 3D finishing strategy which follows the isocurves of a surface to machine parts with curved surfaces. Flow is a 3-Axis toolpath by default but can be used in multi-axis modes.
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.
ManualInspection | 43 | Manual inspection.
ManualMeasure | 48 | Recorded results of a manual inspection.
Morph | 37 | A 3D finishing strategy for machining shallow areas between selected contours with a consistent cutting direction.
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.
MultiAxisContour | 38 | A multi-axis strategy for machining with the tip of the tool along a given contact curve.
MultiAxisMorph | 39 | A multi-axis strategy for machining shallow areas between selected contours with a consistent cutting direction.
Parallel | 12 | A 3D finishing strategy. The passes are parallel in the XY-plane and follow the surface in the Z-direction.
PartAlignment | 46 | Part alignment.
PathMeasure | 47 | A surface inspection measurement with a results folder.
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.
ProbeGeometry | 45 | Probe Geometry operation
ProbeWCS | 44 | Probe WCS operation
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.
RestFinishing | 40 | A finishing operation to machine any remaining stock left from previous operations.
RotaryFinishing | 35 | A multi-axis machining strategy that lets you machine along and around a rotating axis. Rotary Finishing can be used for parts that are machined most efficiently when utilizing the 4th Machine Axis.
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.
SteepAndShallow | 32 | A 3D finishing strategy that uses Contour passes for steep areas and Parallel or Scallop passes for shallow areas.
SurfaceInspection | 42 | A strategy for the inspection of geometry using probe.
Swarf | 41 | A multi-axis strategy for machining with the side of the tool.
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
AdditiveOperation | 3 | Specifies an additive type operation
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 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 main window area.
PaletteDockOptionsToHorizontalOnly | 2 | Specifies that the palette can only be docked to the top and bottom of the Fusion main window area.
PaletteDockOptionsToVerticalAndHorizontal | 3 | Specifies that the palette can be docked to the sides, top, or bottom of the Fusion main window area.
PaletteDockOptionsToVerticalOnly | 1 | Specifies that the palette can only be docked to the sides of the Fusion 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


PanZoomOrbitShortcuts Enumerator

Description

A list of the different predefined keyboard shortcuts for pan, zoom, and orbit.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
AliasPanZoomOrbitShortcut | 1 | Use Alias pan, zoom, and orbit keyboard shortcuts.
Fusion360PanZoomOrbitShortcut | 0 | Use Fusion pan, zoom, and orbit keyboard shortcuts.
InventorPanZoomOrbitShortcut | 2 | Use Inventor pan, zoom, and orbit keyboard shortcuts.
PowerMillPanZoomOrbitShortcut | 5 | Use PowerMill pan, zoom, and orbit keyboard shortcuts.
SolidWorksPanZoomOrbitShortcut | 3 | Use SolidWorks pan, zoom, and orbit keyboard shortcuts.
TinkercadPanZoomOrbitShortcut | 4 | Use Tinkercad pan, zoom, and orbit keyboard shortcuts.

Version

Introduced in version May 2022


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


PDFSheetsExport Enumerator

Description

The various options that define which sheets to print.
Defined in namespace "adsk::drawing" and the header file is <Drawing\DrawingTypeDefs.h>

Methods

Name | Value | Description
AllPDFSheetsExport | 0 | Exports all of the sheets in the drawing as a single PDF file.
CurrentPDFSheetExport | 2 | Exports the current active sheet.
RangePDFSheetsExport | 3 | Exports a defined range of sheets.
SelectedPDFSheetsExport | 1 | Exports all of the current selected sheets in the drawing. The active sheet is always selected but the user can also select additional sheets.

Version

Introduced in version December 2020


PipeSectionTypes Enumerator

Description

List of the different section types of a Pipe.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CircularPipeSectionType | 0 | Pipe section has a circular shape.
SquarePipeSectionType | 1 | Pipe section has a square shape.
TriangularPipeSectionType | 2 | Pipe section has a triangular shape.

Version

Introduced in version October 2023


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 containment relationship is unknown.

Version

Introduced in version August 2014


PostCapabilities Enumerator

Description

List of capabilities a post configuration can support. These capabilities represent either a class of operations (milling, turning, etc.) or some additional functionality (e.g. machine simulation).
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
Additive | 64 | Post supports additive operations.
Cascading | 32 | Post configuration is intended to run as a complement to another post that produces NC code to pass additional data to an external application.
Inspection | 128 | Post supports surface inspection operations.
Intermediate | 8 | Post outputs data in an intermediate format intended for processing by another application rather than NC code for a machine.
Jet | 16 | Post supports jet cutting operations (e.g. water jet, plasma, or laser).
MachineSimulation | 256 | Post configuration provides additional data to support machine simulation.
Milling | 1 | Post supports milling operations.
SetupSheet | 4 | Post creates a setup sheet rather than NC code.
Turning | 2 | Post supports turning operations.
Undefined | 0 | Undefined, default when query is created.

Version

Introduced in version April 2023


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


PostProcessExecutionBehaviors Enumerator

Description

Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
PostProcessExecutionBehavior_Fail | 1 | If any issue with an operation arises, the post processing should throw an exception.
PostProcessExecutionBehavior_OmitInvalidAndEmptyOperations | 0 | Default value, post process only valid operations containing toolpath data.
PostProcessExecutionBehavior_PostAll | 2 | Post process all operations disregarding their state.

Version

Introduced in version May 2023


PrintSettingItemTypes Enumerator

Description

Enum that represents the types of CAMParameters. Represents the General and Exporter parameters type in PrintSetting.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
EXPORTER | 1 |
GENERAL | 0 |

Version

Introduced in version April 2023


ProgrammingLanguages Enumerator

Description

Defines the various languages supported for Fusion scripts and add-ins.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
CPPProgramminglanguage | 2 | Specifies a script or add-in written using the C++ programming language.
PromptForLanguage | 0 | Used with the APIPreferences object to specify the user should be prompted when creating a new script or add-in.
PythonProgrammingLanguage | 1 | Specifies a script or add-in written using the Python programming language.

Version

Introduced in version October 2023


ProjectedTextureMapTypes Enumerator

Description

The different types of projected texture maps.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
AutomaticTextureMapProjection | 0 | The default projection that is determined automatically.
BoxTextureMapProjection | 2 | A texture map that is projected from six orthogonal planes as if the body was in a box and each plane of the box is projected onto the body.
CylindricalTextureMapProjection | 4 | A texture map that is projected as a cylinder onto the body.
PlanarTextureMapProjection | 1 | A texture map that is projected onto the body along a single direction.
SphericalTextureMapProjection | 3 | A texture map that is projected as a sphere onto the body.

Version

Introduced in version March 2022


RecognizedPocketBottomType Enumerator

Description

Types of pocket bottoms that can exist. Flat represents a standard flat bottom with sharp edges at the walls. (Flat may also have some portions that are through, but may not have any portions that are chamfered or filleted.) Through represents a pocket with no bottom anywhere along the boundary and sharp edges at the walls. Chamfer and fillet represent pockets where that type of feature goes around all edges of the boundary and islands, between the bottom and the walls. Other represents any other cases, such as a mix of different bottom types for different edges.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
RecognizedPocketBottomTypeChamfer | 2 |
RecognizedPocketBottomTypeFillet | 3 |
RecognizedPocketBottomTypeFlat | 0 |
RecognizedPocketBottomTypeOther | 4 |
RecognizedPocketBottomTypeThrough | 1 |

Version

Introduced in version July 2023


RenderAspectRatios Enumerator

Description

Types that indicate the output aspect ratio when rendering a scene. This is used with in-canvas rendering, to allow you to define a different aspect ratio than the current active viewport.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CurrentViewportRenderAspectRatio | 0 | Specifies that the Current Viewport aspect ratio is used.
CustomRenderAspectRatio | 6 | Specifies that a custom aspect ratio is used.
Landscape5to4RenderAspectRatio | 4 | Specifies a 5:4 landscape aspect ratio.
Portrait4to5RenderAspectRatio | 5 | Specifies a 4:5 portrait aspect ratio.
Presentation4to3RenderAspectRatio | 2 | Specifies a 4:3 presentation aspect ratio.
Square1to1RenderAspectRatio | 1 | Specifies a 1:1 square aspect ratio.
Widescreen16to9RenderAspectRatio | 3 | Specifies a 16:9 wide screen aspect ratio.

Version

Introduced in version May 2023


RenderResolutions Enumerator

Description

The different standard resolutions supported when rendering.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CustomRenderResolution | 17 | Custom resolution.
Mobile1136x640RenderResolution | 6 | 1136x640 resolution. Commonly used for images shown on a mobile device.
Mobile1334x750RenderResolution | 7 | 1334x750 resolution. Commonly used for images shown on a mobile device.
Mobile1920x1080RenderResolution | 8 | 1920x1080 resolution. Commonly used for images shown on a mobile device.
Mobile2048x1536RenderResolution | 9 | 2048x1536 resolution. Commonly used for images shown on a mobile device.
Mobile960x640RenderResolution | 5 | 960x640 resolution. Commonly used for images shown on a mobile device.
Print1800x1200RenderResolution | 10 | 1800x1200 resolution. Commonly used for images that will be printed.
Print2100x1500RenderResolution | 11 | 2100x1500 resolution. Commonly used for images that will be printed.
Print3000x2400RenderResolution | 12 | 3000x2400 resolution. Commonly used for images that will be printed.
Print3300x2550RenderResolution | 13 | 3300x2550 resolution. Commonly used for images that will be printed.
Video1280x720RenderResolution | 15 | 1280x720 resolution. Commonly used for images that will be used for video.
Video1920x1080RenderResolution | 16 | 1920x1080 resolution. Commonly used for images that will be used for video.
Video854x480RenderResolution | 14 | 854x480 resolution. Commonly used for images that will be used for video.
Web1024x768RenderResolution | 1 | 1024x768 resolution. Commonly used for images shown in a browser.
Web1152x864RenderResolution | 2 | 1152x864 resolution. Commonly used for images shown in a browser.
Web1280x1024RenderResolution | 3 | 1280x1024 resolution. Commonly used for images shown in a browser.
Web1600x1200RenderResolution | 4 | 1600x1200 resolution. Commonly used for images shown in a browser.
Web800x600RenderResolution | 0 | 800x600 resolution. Commonly used for low-res images shown in a browser.

Version

Introduced in version May 2023


RenderSceneBackgroundTypes Enumerator

Description

Types that indicate the type of background being used to render the scene.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
EnvironmentRenderSceneBackgroundType | 0 | Specifies that an environment is being used as the background of the scene.
SolidColorRenderSceneBackgroundType | 1 | Specifies that a solid color is being used as the background of the scene.

Version

Introduced in version May 2023


RipFeatureDefinitionTypes Enumerator

Description

Specifies the different ways a Rip feature can be defined.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AlongEdgeRipFeatureDefinitionType | 2 | Rips along an edge.
BetweenPointsRipFeatureDefinitionType | 3 | Rips between two points on a face. The points may be defined either by vertices, or by an edge and an offset along that edge.
FaceRipFeatureDefinitionType | 1 | Rips an entire face.
UndefinedRipFeatureDefinitionType | 0 | The rip type is undefined. This occurs when a new RipFeatureInput is created and before a specific type has been defined.

Version

Introduced in version September 2023


RuledSurfaceCornerTypes Enumerator

Description

List of Ruled Surface corner types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
MiteredRuledSurfaceCornerType | 1 | The corners will be mitered.
RoundedRuledSurfaceCornerType | 0 | The corners will be rounded.

Version

Introduced in version August 2021


RuledSurfaceTypes Enumerator

Description

List of Ruled Surface Types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
DirectionRuledSurfaceType | 2 | Creates new faces perpendicular to the current faces.
NormalRuledSurfaceType | 1 | Creates new faces tangent to the current faces.
TangentRuledSurfaceType | 0 | Create Ruled Surface from edges or sketch curves

Version

Introduced in version August 2020


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


ScriptSourceLocations Enumerator

Description

Defines the different locations where Fusion looks for scripts and add-ins.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
AppStoreScriptSourceLocation | 0 | The location where add-ins are installed from the Autodesk App Store. Windows - %appdata%\Autodesk\ApplicationPlugins Mac - ~/Library/Application Support/Autodesk/ApplicationPlugins
InternalScriptSourceLocation | 3 | One of the internal folders where add-ins are installed with Fusion.
LinkedScriptSourceLocation | 5 | The script or add-in can be located anywhere and has been manually added to the known list of scripts and add-ins as a link.
OtherInstalledScriptSourceLocation | 1 | The folder where non-App Store add-ins are installed. Windows - %appdata%\Autodesk\FusionAddins Mac - ~/Library/Application Support/Autodesk/FusionAddins
SamplesScriptSourceLocation | 4 | One of the sample folders where sample scripts and add-ins are installed with Fusion.
UserDefinedScriptSourceLocation | 2 | The folder defined in the API tab of the Preferences dialog.

Version

Introduced in version January 2025


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


SetupChangeEventType Enumerator

Description

List of setup change event types.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
Arbitrary | 0 | Arbitrary change
PrintSettingSelection | 1 | Selection of print setting

Version

Introduced in version August 2020


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


SetupStockModes Enumerator

Description

List of setup stock modes.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
FixedBoxStock | 0 | Fixed Size Box
FixedCylinderStock | 2 | Fixed Size Cylinder
FixedTubeStock | 4 | Fixed Size Tube
PreviousSetupStock | 7 | From Preceding Setup
RelativeBoxStock | 1 | Relative Size Box
RelativeCylinderStock | 3 | Relative Size Cylinder
RelativeTubeStock | 5 | Relative Size Tube
SolidStock | 6 | From Solid

Version

Introduced in version April 2023


ShellTypes Enumerator

Description

List of Shell Types
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
RoundedOffsetShellType | 1 | Use rounded corners when creating the shell.
SharpOffsetShellType | 0 | Use sharp corners when creating the shell. (Legacy)

Version

Introduced in version May 2024


SideTypes Enumerator

Description

Enum for the order of loops.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
AlwaysInsideSideType | 1 | AlwaysInside
AlwaysOutsideSideType | 0 | AlwaysOutside
StartInsideSideType | 3 | StartInside has the order inside - outside - inside ...
StartOutsideSideType | 2 | StartOutside has the order outside - inside - outside ...

Version

Introduced in version April 2023


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


SketchCurveConstructionStates Enumerator

Description

Used by the Sketch.setConstructionState method setting the construction state on sketch curves.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
ConstructionSketchCurveConstructionState | 1 | Specifies that the construction state should be set to construction.
NormalSketchCurveConstructionState | 2 | Specifies that the construction state should be set to normal.
ToggleSketchCurveConstructionState | 0 | Specifies that the construction state should be toggled from its current state.

Version

Introduced in version March 2024


SketchLineCenterlineStates Enumerator

Description

Used by the Sketch.setCenterlineState method setting the centerline state on sketch lines.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CenterlineSketchLineCenterlineState | 1 | Specifies that the centerline state should be set to centerline.
NormalSketchLineCenterlineState | 2 | Specifies that the centerline state should be set to normal.
ToggleSketchLineCenterlineState | 0 | Specifies that the centerline state should be toggled from its current state.

Version

Introduced in version March 2024


SplineDegrees Enumerator

Description

Defines the options used when specifying the degree of a spline.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
SplineDegreeEight | 8 | Defines a degree 8 spline.
SplineDegreeFive | 5 | Defines a degree 5 spline.
SplineDegreeFour | 4 | Defines a degree 4 spline.
SplineDegreeNine | 9 | Defines a degree 9 spline.
SplineDegreeOne | 1 | Defines a degree 1 spline.
SplineDegreeSeven | 7 | Defines a degree 7 spline.
SplineDegreeSix | 6 | Defines a degree 6 spline.
SplineDegreeThree | 3 | Defines a degree 3 spline.
SplineDegreeTwo | 2 | Defines a degree 2 spline.

Version

Introduced in version July 2022


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


SplitSupportTypes Enumerator

Description

Split support behavior depending on the type of support.
Defined in namespace "adsk::cam" and the header file is <Cam\CamTypeDefs.h>

Methods

Name | Value | Description
SolidOpenMergedSplitSupportType | 0 | Solid and open support into one single mesh body.
SolidOpenSeparateSplitSupportType | 1 | Solid and open support into two separate mesh bodies.

Version

Introduced in version September 2023


StatusMessageTypes Enumerator

Description

The different types of status messages that can be used with the StatusCode object.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
StatusMessageErrorType | 1 | An error that prevents the operation from succeeding.
StatusMessageNoneType | 0 | No error or warning is associated with the status code.
StatusMessageWarningType | 2 | A warning that the operation has succeeded but without expected results.

Version

Introduced in version July 2021


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


SurfaceExtendAlignment Enumerator

Description

List of Surface Extend Alignments
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AlignEdges | 1 | The extended edges are aligned with the natural direction of the existing surface edges.
FreeEdges | 0 | The extended edges are not aligned with the existing surface edges.

Version

Introduced in version August 2020


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


SweepExtentTypes Enumerator

Description

List of the types of sweep extent.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FullExtentsExtentType | 1 | Full extents extent type.
PerpendicularToPathExtentType | 0 | Perpendicular to Path extent type.

Version

Introduced in version December 2020


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


SweepSolidOrientationTypes Enumerator

Description

The various orientation types when doing a solid sweep.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AlignedSolidOrientationType | 2 | Keep the orientation of the tool body aligned to a direction vector. The tool may rotate around this vector as it is swept along the path.
PerpendicularSolidOrientationType | 0 | Maintain the orientation of the tool body relative to the sweep path. As the tool body sweeps along the path, it will rotate to maintain the same relative angle to the path.
RigidSolidOrientationType | 1 | The orientation of the tool body does not change as it is swept along the path. The tool will be translated but not rotated.

Version

Introduced in version May 2024


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


TessellateRefinementTypes Enumerator

Description

Specify the refinement setting type for the tessellation process.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CustomTessellateRefinementType | 3 | Applies custom refinement settings to tessellate the body.
HighTessellateRefinementType | 0 | Applies a preset with high refinement settings to tessellate the body.
LowTessellateRefinementType | 2 | Applies a preset with low refinement settings to tessellate the body.
MediumTessellateRefinementType | 1 | Applies a preset with medium refinement settings to tessellate the body.

Version

Introduced in version January 2025


TextBoxKeyPoints Enumerator

Description

Defines the nine key points that exist for a sketch text box and can be used as the origin when rotating the text. The named positions are with respect to the text box. For example when the text box has not been rotated the top-left key point will be the point in the upper-left corner of the text box. If the text box has been rotated 180 degrees, the top-left key point will be the point in the lower-right corner of the text box.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
BottomLeftTextBoxKeyPoint | 6 | The key point at the bottom-left corner of the text box.
BottomMiddleTextBoxKeyPoint | 7 | The key point at the midpoint of the bottom line of the text box.
BottomRightTextBoxKeyPoint | 8 | The key point at the bottom-right corner of the text box.
MiddleLeftTextBoxKeyPoint | 3 | The key point at the midpoint of the left line of the text box.
MiddleRightTextBoxKeyPoint | 5 | The key point at the midpoint of the right line of the text box.
MiddleTextBoxKeyPoint | 4 | The key point in the center of the text box.
TopLeftTextBoxKeyPoint | 0 | The key point in the upper-left corner of the text box.
TopMiddleTextBoxKeyPoint | 1 | The key point at the midpoint of the upper line of the text box.
TopRightTextBoxKeyPoint | 2 | The key point in the upper-right corner of the text box.

Version

Introduced in version December 2020


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. Not currently supported.

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


ThinExtrudeWallLocation Enumerator

Description

List of Thin Extrude Wall Locations
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
Center | 1 | The wall location type where the thin extrude is centered on the profile
Side1 | 0 | The wall location type where the thin extrude is offset towards one side of the profile
Side2 | 2 | The wall location type where the thin extrude is offset towards one side of the profile

Version

Introduced in version April 2021


ThreadLocations Enumerator

Description

List of the positions of a thread feature when it is not full length.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
HighEndThreadLocation | 0 | Position thread at the high end of the cylinder. You can determine the high end in the model by using the geometry property of the cylindrical BRepFace object, which will return a Cylinder object. The axis property of the Cylinder is a vector and the high end of the cylinder is at the far end of the cylinder with respect to the axis vector.
LowEndThreadLocation | 1 | Position thread at the low end of the cylinder. You can determine the low end in the model by using the geometry property of the cylindrical BRepFace object, which will return a Cylinder object. The axis property of the Cylinder is a vector and the low end of the cylinder is at the near end of the cylinder with respect to the axis vector.

Version

Introduced in version January 2015


ThreeBendReliefShapes Enumerator

Description

The bend relief shapes used when three bends intersect.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
FullRoundThreeBendReliefShape | 2 | Full round bend relief.
IntersectionThreeBendReliefShape | 1 | Intersection bend relief.
NoReplacementThreeBendReliefShape | 0 | No replacement for the bend relief.
RoundWithRadiusThreeBendReliefShape | 3 | Round radius bend relief.

Version

Introduced in version November 2022


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


TriadChanges Enumerator

Description

Defines the different types of edits that can be applied by the user to a triad command input.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
TriadChangeHorizontalFlip | 18 | Defines a horizontal (around the around the Y-Z plane) flip of the triad.
TriadChangeUnknown | 0 | Defines an unknown change.
TriadChangeVerticalFlip | 19 | Defines a vertical (around the around the X-Z plane) flip of the triad.
TriadChangeXRotation | 8 | Defines a rotation around the X axis of the triad.
TriadChangeXScale | 11 | Defines a change in scale along the X axis of the triad.
TriadChangeXTranslation | 1 | Defines a translation in the X direction of the triad.
TriadChangeXYScale | 14 | Defines a uniform change in scale along the X and Y axes of the triad.
TriadChangeXYTranslation | 4 | Defines a translation on the X-Y plane of the triad.
TriadChangeXYZScale | 17 | Defines a uniform change in scale along the X, Y, and Z axes of the triad.
TriadChangeXYZTranslation | 7 | Defines a translation in the X, Y, and Z directions of the triad.
TriadChangeXZScale | 16 | Defines a uniform change in scale along the X and Z axes of the triad.
TriadChangeXZTranslation | 6 | Defines a translation on the X-Z plane of the triad.
TriadChangeYRotation | 9 | Defines a rotation around the Y axis of the triad.
TriadChangeYScale | 12 | Defines a change in scale along the Y axis of the triad.
TriadChangeYTranslation | 2 | Defines a translation in the Y direction of the triad.
TriadChangeYZScale | 15 | Defines a uniform change in scale along the Y and Z axes of the triad.
TriadChangeYZTranslation | 5 | Defines a translation on the Y-Z plane of the triad.
TriadChangeZRotation | 10 | Defines a rotation around the Z axis of the triad.
TriadChangeZScale | 13 | Defines a change in scale along the Z axis of the triad.
TriadChangeZTranslation | 3 | Defines a translation in the Z direction of the triad.

Version

Introduced in version May 2022


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


TwoBendReliefPlacements Enumerator

Description

The placement options for a two bend relief.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
IntersectionTwoBendReliefPlacement | 1 | Specifies that the center point of the two bend relief shape is located at the intersection of the bend center lines. This is the only valid placement option for square two bend relief shapes. For round shapes, this and tangent placement is valid.
NoTwoBendReliefPlacement | 0 | Specifies that no two bend relief placement is defined. This is returned for all two bend relief shapes except for round and square shapes.
TangentTwoBendReliefPlacement | 2 | Specifies that the shape of the two bend relief is tangential to the flange sides. This is only used for round to bend relief shapes where this or intersection placement is valid.

Version

Introduced in version November 2022


TwoBendReliefShapes Enumerator

Description

The bend relief shapes used when two bends intersect.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
ArcWeldTwoBendReliefShape | 5 | Arc weld for the bend relief.
LinearWeldTwoBendReliefShape | 4 | Linear weld for the bend relief.
RoundTwoBendReliefShape | 0 | Round shape for the bend relief.
SquareTwoBendReliefShape | 1 | Square shape for the bend relief.
TearTwoBendReliefShape | 2 | Tear shape for the bend relief.
TrimToBendTwoBendReliefShape | 3 | Trim to the bends for the bend relief.

Version

Introduced in version November 2022


UnitSystems Enumerator

Description

Predefined combinations of length and mass units used for units in the design.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
CentimeterGramUnitSystem | 2 | Specifies centimeters as the default distance units and grams as the default mass units of the design.
CustomUnitSystem | 0 | A custom unit system that supports any combination of distance and mass units as the default units of the design.
FootPoundUnitSystem | 5 | Specifies feet as the default distance units and pounds as the default mass units of the design.
InchOunceUnitSystem | 4 | Specifies inches as the default distance units and ounces as the default mass units of the design.
MeterKilogramUnitSystem | 3 | Specifies meters as the default distance units and kilograms as the default mass units of the design.
MillimeterGramUnitSystem | 1 | Specifies millimeters as the default distance units and grams as the default mass units of the design.

Version

Introduced in version May 2025


UntrimLoopTypes Enumerator

Description

List of Untrim Loop Types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
AllLoopsUntrimType | 0 | Untrim all loops of faces
ExternalLoopsUntrimType | 1 | Untrim external loops of faces
InternalLoopsUntrimType | 2 | Untrim internal loops of faces
ManualLoopsUntrimType | 3 | Untrim manually selected loops

Version

Introduced in version January 2021


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


UserInterfaceThemes Enumerator

Description

Defines the different color themes used by the user interface.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
ClassicUserInterfaceTheme | 0 | The Fusion classic user interface theme.
DarkBlueUserInterfaceTheme | 2 | The dark blue user interface theme.
DarkGrayUserInterfaceTheme | 3 | The dark gray user interface theme.
LightGrayUserInterfaceTheme | 1 | The light gray user interface theme.

Version

Introduced in version January 2025


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
TurkishLanguage | 14 | Turkish

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


VerticalAlignments Enumerator

Description

Defines the different vertical alignments that can be applied to text.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
BottomVerticalAlignment | 2 | Aligned to the bottom.
MiddleVerticalAlignment | 1 | Aligned along the middle.
TopVerticalAlignment | 0 | Aligned to the top.

Version

Introduced in version December 2020


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 uses when rendering the model.
Defined in namespace "adsk::core" and the header file is <Core\CoreTypeDefs.h>

Methods

Name | Value | Description
ShadedVisualStyle | 0 | Shaded display style.
ShadedWithHiddenEdgesVisualStyle | 1 | Shaded with hidden edges displayed.
ShadedWithVisibleEdgesOnlyVisualStyle | 2 | Shaded with only the visible edges displayed.
WireframeVisualStyle | 3 | Wireframe display style.
WireframeWithHiddenEdgesVisualStyle | 4 | Wireframe with hidden edges displayed.
WireframeWithVisibleEdgesOnlyVisualStyle | 5 | Wireframe with only the visible edges displayed.

Version

Introduced in version August 2014


VolumetricMeshingApproachTypes Enumerator

Description

List of Meshing Approaches for converting a volumetric model to a mesh.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
VolumetricMeshingAdvancedType | 0 | Mesh the volumetric model using advanced techniques that preserve sharp features on the boundary of the model.
VolumetricMeshingOriginalType | 1 | Mesh the volumetric model using the original meshing techniques.

Version

Introduced in version May 2025


VolumetricMeshRefinementTypes Enumerator

Description

List of Volumetric Model to Mesh Refinement Types.
Defined in namespace "adsk::fusion" and the header file is <Fusion\FusionTypeDefs.h>

Methods

Name | Value | Description
VolumetricMeshRefinementCustomType | 3 | Creates a custom resolution mesh from the volumetric model.
VolumetricMeshRefinementHighType | 0 | Creates a high resolution mesh from the volumetric model.
VolumetricMeshRefinementLowType | 2 | Creates a low resolution mesh from the volumetric model.
VolumetricMeshRefinementMediumType | 1 | Creates a medium resolution mesh from the volumetric model.

Version

Introduced in version May 2025


API Samples

Assemblies

General

Break Link API Sample
Delete Empty Components

Occurrences

Assembly traversal using recursion API Sample

Joints

As-Built Joint Sample
BallJointMotion API Sample
CylindricalJointMotion API Sample
Joint Origin Between Two Faces Sample
Joint Origin Sample
Joint API Sample
Pin Slot Joint Motion API Sample
Planar Joint Motion API Sample
RevoluteJointMotion API Sample
Rigid Group API Sample
SliderJointMotion API Sample

B-Rep and Geometry

B-Rep Query

Get Physical Properties API Sample
Get Volume of Active Design API Sample

Geometry

Get Circle and Arc Data from Edge API Sample

General

Miscellaneous

Analyze Interference API Sample
Application Event API Sample
API Sample for AreaProperties
Create Animation API Sample
Custom Event for Command Dialog
Custom Event Sample
Custom Graphics Sample
ExportManager API Sample
Export to other formats API Sample
Import Manager API Sample
Use inputBox to get value and evaluateExpression to validate it
Measure Sample
Rendering Sample
Save and Insert File API Sample
STLExport API Sample

Parameters

Set parameters from a csv file and export to STEP

MFGDM

Gets all properties using GraphQL New
Get part number using GraphQL New
Set part number using GraphQL New

Materials and Appearances

Appearances

Material API Sample

Modeling

Sketches

Create circle by center and radius API Sample
Create Circle By 3 Tangents API Sample
API Sample that demonstrates creating sketch lines in various ways.
Project To Surface API Sample
Sketch Chamfer API Sample
Sketch fillet and offset API Sample
Sketch Intersect API Sample
Sketch Point API Sample
Sketch Sample API Sample
Sketch spline through points creation and relative functions API Sample
Sketch Text API Sample

Features

BaseFeature Sample
Boss Feature Sample
Boundary Fill Feature API Sample
CircularPattern Feature API Sample
Constant Radius Fillet API Sample
Copy Paste Bodies API Sample
Cut Paste Bodies API Sample
DeleteFace Feature API Sample
Draft Feature API Sample
Equal Distance Chamfer Feature API Sample
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 Feature API Sample
Manage Participant Bodies API Sample
Patch Feature API Sample
Path Pattern Feature API Sample
RectangularPattern Feature
Remove Feature
ReplaceFace Feature
Reverse Normal Feature
Rip Feature Sample
Ruled Surface 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
Untrim Feature API Sample

General

BRep Body definition Sample
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
TemporaryBRepManager API Sample

Volumetric

Volumetric Custom Feature API Sample

User Interface

Commands

Command Inputs API Sample

General

File Dialog Sample
Marking Menu API Sample
Palette Sample
Progress Dialog API Sample
Customizing the UI using the API Sample
Write user interface to a file API Sample

CAM

Additive

Additive Manufacturing FFF API Sample
Additive Manufacturing MJF API Sample
Additive Manufacturing SLA API Sample

General

Avoid Machine Surface Settings API Sample
Basic Milling Workflow Sample
CAM Parameter Modification API Sample
Create Engravings Selection Sets API Sample
Create Setups From Hole Recognition API Sample
Generate Setup Sheets API Sample
Generate Toolpaths API Sample
Hole and Pocket Recognition API Sample Updated
Library Item API Sample
Manufacturing Workflow API Sample
Create CAM Operation From Template API Sample
Post Toolpaths API Sample
Set Vise Origin As Setup WCS Origin API Sample
Wood Routing Workflow Sample

© Copyright Autodesk, Inc.


Break Link API Sample

Description

Iterates over all top-level occurrences and if it's a referenced component, it will break the link.

Code Samples

  • C++
  • Python
#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 occurrences from the root component.
    Ptr<Occurrences> occurrences = rootComp->occurrences();
    if (!occurrences)
        return false;

    // Build an array of occurrences because breaking a link will cause the
    // collection to be modified and causes a problem iterating over the colection.
    std::vector<Ptr<Occurrence>> occs;
    for (int i = 0; i < occurrences->count(); ++i)
    {
        if (Ptr<Occurrence> occ = occurrences->item(i))
            occs.push_back(occ);
    }

    // Iterate through the top-level occurrences to see if any of them are external references.
    for (Ptr<Occurrence> occ : occs)
    {
        if (occ->isReferencedComponent())
        {
            occ->breakLink();
        }
    }

    return true;
}
# 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

        # Build a list of occurrences because breaking a link will cause the
        # collection to be modified and causes a problem iterating over the colection.
        occs = []
        for occ in rootComp.occurrences:
            occs.append(occ)

        # Iterate through the top-level occurrences to see if any of them are external references.
        occ: adsk.fusion.Occurrence
        for occ in occs:
            if occ.isReferencedComponent:
                occ.breakLink()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Delete Empty Components

Description

Deletes empty components from the active design.

Code Samples

  • Python
#Author-Autodesk Inc.
#Description-Delete empty components from an assembly.

import adsk, adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Get all components in the active design.
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        title = 'Delete Empty Components'
        if not design:
            ui.messageBox('No active Fusion design', title)
            return

        components = design.allComponents

        # Find all of the empty components.
        # It is empty if it has no occurrences, bodies, featres, sketches, or construction.
        root = design.rootComponent
        componentsToDelete = []

        for component in components:

            # Skip the root component.
            if root == component:
                continue

            if component.occurrences.count == 0 \
                and component.bRepBodies.count == 0 \
                and component.features.count == 0 \
                and component.sketches.count == 0 \
                and component.constructionPlanes.count == 0 \
                and component.constructionAxes.count == 0 \
                and component.constructionPoints.count == 0:

                componentsToDelete.append(component)

        # Delete all immediate occurrences of the empty components.
        deletedComponents = []
        for component in componentsToDelete:

            # Get the name first because deleting the final Occurrence will delete the Component.
            name = component.name

            # Build a list of unique immediate occurrences of the component.
            occurrences = root.allOccurrencesByComponent(component)
            uniqueOccurrences = []
            for occurrence in occurrences:
                index = 0
                for k in range(0, len(uniqueOccurrences)):
                    if occurrence is uniqueOccurrences[k]:
                        break
                    index = k+1
                if index == len(uniqueOccurrences):
                    uniqueOccurrences.append(occurrence)

            # Delete them.
            for uniqueOccurrencesI in uniqueOccurrences:
                uniqueOccurrencesI.deleteMe()

            deletedComponents.append(name)

        if len(deletedComponents) == 0:
            msg = 'No empty components found.'
        else:
            if len(deletedComponents) > 1:
                msg = str(len(deletedComponents)) + ' empty component' + 's'
            else:
                msg = str(len(deletedComponents)) + ' empty component' + ' deleted'
            msg += '\n\n'
            for deletedComponentI in deletedComponents:
                msg += '\n' + deletedComponentI

        ui.messageBox(msg, title)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


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) + 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 = 'Root (' + 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.
        # Write the results to the TEXT COMMANDS window.
        textPalette = ui.palettes.itemById('TextCommands')
        if not textPalette.isVisible:
            textPalette.isVisible = True
        textPalette.writeText(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 <Core/UserInterface/Palettes.h>
#include <Core/UserInterface/TextCommandPalette.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) + 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<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;
    //  Create the title for the output.
    std::string resultString = "Root (" + design->parentDocument()->name() + ")\n";

    // Call the recursive function to traverse the assembly and build the output string.
    resultString = traverseAssembly(occurrences->asList(), 1, resultString);

        // Write the results to the TEXT COMMANDS window.
        Ptr<TextCommandPalette> textPalette = ui->palettes()->itemById("TextCommands");
        if (!textPalette->isVisible())
             textPalette->isVisible(true);
        textPalette->writeText(resultString);
    return true;
}


As-Built Joint 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;
}


BallJointMotion 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;
}


CylindricalJointMotion 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;
}


Joint Origin Between Two Faces 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;
}


Joint Origin 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;
}


Joint 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.setAsRevoluteJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        # Lock the joint
        joint.isLocked = True

        # 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->setAsRevoluteJointMotion(adsk::fusion::JointDirections::ZAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if (!joint)
        return false;
    // Lock the joint
    joint->isLocked(true);
    // 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;
}


Pin Slot Joint Motion 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;
}


Planar Joint Motion 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;
}


RevoluteJointMotion 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;
}


Rigid Group 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;
}


SliderJointMotion 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;
}


Get Physical Properties API Sample

Description

Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model.

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;
}


Get 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.formatValue(totalVolume, design.unitsManager.defaultLengthUnits + '^3')
        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->formatValue(totalVolume, unitMgr->defaultLengthUnits() + "^3");
     ui->messageBox("The volume of the entire asembly is: " + result);

    return true;
}


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;
}
} // namespace

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;
}


Analyze Interference 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

  • C++
  • Python
#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;
}
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()))


Application Event API Sample

Description

Add-In that demonstrates application events. To use this sample, create a new folder using the name you want to use for the new add-in. Inside the folder, create a new file that is the same name as the folder but has a .py extension. Copy the code below into the .py file. Create another file that is the same name as the folder but has a .manifest extension and copy the JSON data below into that file. { "autodeskProduct": "Fusion360", "type": "addin", "author": "", "description": { "": "" }, "supportedOS": "windows|mac", "editEnabled": true } Run the "Scripts and Add-Ins" command and click the green plus button near the top of the dialog. Browse to the location where you created the folder and select the folder. The add-in should now be displayed in the list of add-ins on the "Add-Ins" tab of the dialog. Select the add-in and click the "Run" button. This will load the add-in and when any of the application events occurr that it is watching for it will report them in the TEXT COMMAND window.

Code Samples

  • C++
  • Python
#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;
}
import adsk.core, traceback

# global set of event handlers to keep them referenced
handlers = []
app = adsk.core.Application.get()

# 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.
        app.log('In MyDocumentOpenedHandler event handler.')

# 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.
        app.log('In MyDocumentOpeningHandler event handler.')

# Event handler for the startupCompleted event.
class StartupCompletedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
           app.log('Startup completed')
        except:
           app.log('Startup completed event failed: {}'.format(traceback.format_exc()))

# Event handler for the onlineStatusChanged event.
class OnlineStatusChangedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
           status = 'Online'
           if args.isOffLine:
               status = 'Offline'
           app.log('Online status changed: ' + status)
        except:
           app.log('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.
        app.log('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.
        app.log('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.
        app.log('In MyDocumentSavingHandler event handler.')

# 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.
        app.log('In MyDocumentClosingHandler event handler.')

# 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.
        app.log('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.
        app.log('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.
        app.log('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.
        app.log('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.
        app.log('In MyDocumentActivatingHandler event handler.\ndocument: {}'.format(eventArgs.document.name))

def run(context):
    try:
        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:
        app.log('AddIn Start Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        pass
    except:
        app.log('AddIn Stop Failed: {}'.format(traceback.format_exc()))


API Sample for AreaProperties

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(15, 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;
}


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. To run this sample, have a part open that contains a parameter named "Length". The parameter should be able to be successfully modified from 10 to 15 centimeters. Run the sample and choose or create a directory for the output. After running you should have a folder full of images that are snapshots of each parameter value.

Code Samples

  • C++
  • Python
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/FolderDialog.h>
#include <Core/Application/Viewport.h>
#include <Core/Utils.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/Parameter.h>
#include <Fusion/Fusion/ParameterList.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;

    // Get the output folder.
    Ptr<FolderDialog> fd = ui->createFolderDialog();
    fd->title("Specify Output Folder");
    if (fd->showDialog() != adsk::core::DialogResults::DialogOK)
        return false;

    std::string resultFolder = fd->folder() + "/";

    Ptr<Parameter> param = des->allParameters()->itemByName(paramName);
    if (!param)
    {
        ui->messageBox("The parameter \"" + paramName + "\" must exist.");
        return false;
    }

    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;
}
import adsk.core, adsk.fusion, traceback
import os

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

        # Get the output folder.
        fd = ui.createFolderDialog()
        fd.title = "Specify Output Folder"
        if fd.showDialog() != adsk.core.DialogResults.DialogOK:
            return

        resultFolder = fd.folder

        param = des.allParameters.itemByName(paramName)
        if not param:
            ui.messageBox('The parameter "' + paramName + '" must exist.')
            return

        currentValue = startValue
        param.value = currentValue

        # Iterate from the start to end values, capturing a screen
        # for each one.
        cnt = 0
        while param.value < endValue:
            param.value = currentValue
            currentValue += increment
            adsk.doEvents()
            filename = os.path.join(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()))


Custom Event for Command Dialog

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 Event Sample

Description

Demonstrates the ability to call into the main thread from a worker thread. This sample is an add-in. To use it, use the Scripts and Add-Ins command to create a new add-in. Delete all of the code in the newly created add-in and replace it with the code below. Have a model open that has a parameter named "Length". Load the add-in. The add-in will change the value of the parameter every two seconds using a random value between 1 and 10.

Code Samples

  • C++
  • Python
#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(1000, 10000);

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();
            }

            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("Length");
            if (!param)
                return;

            // Get the value that was passed in from other thread and set the paraemter value.
            std::string info = eventArgs->additionalInfo();
            param->value(std::stod(info));
        }
    }
} onCustomEvent_;

void myThreadRun()
{
    while (!stopFlag)
    {
        double randVal = distribution(generator);
        std::string additionalInfo = std::to_string(randVal / 1000.0);
        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;
}
#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['Value'])

            # Set the parameter value.
            design = adsk.fusion.Design.cast(app.activeProduct)
            param = design.rootComponent.modelParameters.itemByName('Length')
            param.value = newValue
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
            adsk.autoTerminate(False)

# 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(2):
            args = {'Value': random.randint(1000, 10000)/1000}
            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()))


Custom Graphics 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

  • C++
  • Python
#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;
}
#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):
    global coordNumber
    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)

    coordNumber = coordNumber + 1

def addLineStrip(tableInput):
    global stripNumber
    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)

    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


ExportManager 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)

             export the component with USD (Universal Scene Description) format
            usdOptions = exportMgr.createUSDExportOptions(fileName, comp)
            exportMgr.execute(usdOptions)
    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;
}

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 API Sample

Description

Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats. To run this sample, have a design open and run the script. It will write out the translated files to a temp directory, which will it show in a message box.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback, tempfile

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)
        ui.messageBox(f'Design exported to: {tmpDir}')
    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;
}

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 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)

        dxfOptions = importManager.createDXF2DImportOptions(dxfFileName, rootComp.xZConstructionPlane)
        dxfOptions.isViewFit = False
        # Set the flag true to merge all the layers of DXF into single sketch.
        dxfOptions.isSingleSketchResult = True

        # 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);

    Ptr<DXF2DImportOptions> dxfOptions =
        importManager->createDXF2DImportOptions(dxfFileName, rootComp->xZConstructionPlane());
    if (!dxfOptions)
        return false;
    dxfOptions->isViewFit(false);
    // Set the flag true to merge all the layers of DXF into single sketch.
    dxfOptions->isSingleSketchResult(true);

    // 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;
}


Use inputBox to get value and evaluateExpression to validate it

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

  • C++
  • Python
#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;
}
#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()))


Measure Sample

Description

Measure related functions

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

def validate(discription, result, baseline):
    if type(result) is str:
        if result != baseline:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + result + '\n'
                           + 'Baseline is ' + baseline + '\n'
                           )
    elif type(result) is float:
        if abs(result - baseline) > 10e-6:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + str(result) + '\n'
                           + 'Baseline is ' + str(baseline) + '\n'
                           )
    elif type(result) is bool:
        if result != baseline:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + str(result) + '\n'
                           + 'Baseline is ' + str(baseline) + '\n'
                           )
    else:
        raise Exception('Validaion is not support the data type ' + discription)
#endTest

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;
}


Rendering Sample

Description

Demonstrates using the Rendering capabilities in the API. This starts a series of local renderings to generate a series of frames, where the camera is repositioned and a parameter is modified for each frame to create a dynamic animation. To use the sample, have a design open that contains a parameter named "Length". It can be a user or model parameter. The sample will modify this parameter from a value of 0.1 cm to 15 cm, but you can change these values by editing the values of the paramStartVal and paramEndVal variables on lines 90 and 91 of the sample. It expects a folder named "C:\Temp\RenderSample" to exist, and will fail if it doesn't. The rendered frames will be written to that folder.

An example rendering is shown below where this file was used. The parameter is modifying a move feature which results in changing the shape of an extrusion. The parameter could be driving anything and you could modify the code to edit more than one parameter. The result of this sample is a folder containing all of the rendered frames. You can process these to create an animation. The sample animation was created using GIMP.

Render Animation Sample

Code Samples

  • Python
import adsk.core
import adsk.fusion
import traceback
import threading
import math

app = None
ui = adsk.core.UserInterface.cast(None)
handlers = []
stopFlag = None
checkProgress = 'RenderProgress'
customEvent = None
renderFutures = []
checkCount = 0

app = adsk.core.Application.get()
ui  = app.userInterface

# 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:
            # Display a seperator line, with a counter so it's easy to see it's processing.
            global checkCount
            checkCount += 1
            app.log(f'== {checkCount} ================================================')

            # Iterate through the render futures to display the status in the TEXT COMMAND window
            # and check to see if it's finished.
            stillProcessing = False
            future: adsk.fusion.RenderFuture
            for future in renderFutures:
                if future.renderState == adsk.fusion.LocalRenderStates.QueuedLocalRenderState:
                    app.log(f'Queued: {future.filename}')
                    stillProcessing = True
                elif future.renderState == adsk.fusion.LocalRenderStates.ProcessingLocalRenderState:
                    app.log(f'Processing: {future.filename}, Percent: {future.progress * 100}%')
                    stillProcessing = True

            if(not stillProcessing):
                # All jobs have been processed, so terminate the script. This will result
                # in the stop function being called where the final cleanup is done.
                app.log("Finished!")
                adsk.terminate()
        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 to check the rendering progress.
        while not self.stopped.wait(5):
            app.fireCustomEvent(checkProgress)

def run(context):
    try:
        # Get the active Design
        des: adsk.fusion.Design = app.activeProduct

        # Get information from the current camera.
        cam = app.activeViewport.camera
        upVector = GetUpVector(cam)
        eye = cam.eye

        # Use the center of the bounding box as the target.
        boundBox = des.rootComponent.boundingBox
        target = adsk.core.Point3D.create((boundBox.minPoint.x + boundBox.maxPoint.x) / 2,
                                          (boundBox.minPoint.y + boundBox.maxPoint.y) / 2,
                                          (boundBox.minPoint.z + boundBox.maxPoint.z) / 2)

        # Get the RenderManager from the Design and set the resolution of the output image.
        rm = des.renderManager
        render = rm.rendering
        render.resolution = adsk.fusion.RenderResolutions.Mobile960x640RenderResolution

        # Specify the number of frames to render.
        frames = 10

        # Define the parameter that will be modified and the start and end values.
        paramName = 'Length'
        paramStartVal = .1
        paramEndVal = 15
        param = des.allParameters.itemByName(paramName)

        # Create the rotation matrix that will be used for the eye point to rotate
        # around the model.
        rotMatrix = adsk.core.Matrix3D.create()
        angle = (math.pi * 2) / frames
        rotMatrix.setToRotation(angle, upVector, target)

        # Start a rendering for each frame.
        for i in range(frames):
            # Set the camera for the current frame.
            cam.target = target
            cam.upVector = upVector
            cam.eye = eye

            # Set the parameter value for this frame.
            paramVal = ((paramEndVal - paramStartVal) / (frames - 1)) * i + paramStartVal
            param.value = paramVal
            #adsk.doEvents()

            # Define the filename for this frame.
            filename = f'C:/Temp/RenderSample/Frame{i:05d}.png'

            # Start the render.
            renderFutures.append(render.startLocalRender(filename, cam))
            app.log(f'Started frame {i}')
            app.log(f'   Parameter Value: {paramVal}')
            app.log(f'   Progress: {renderFutures[len(renderFutures)-1].progress}')
            app.log(f'   RenderState: {renderFutures[len(renderFutures)-1].renderState}')
            app.log(f'   imageWidth: {renderFutures[len(renderFutures)-1].imageWidth}')
            app.log(f'   imageHeight: {renderFutures[len(renderFutures)-1].imageHeight}')
            app.log(f'   fileName: {renderFutures[len(renderFutures)-1].filename}')

            # Transform the eye point for the next frame.
            eye.transformBy(rotMatrix)

        # Create a new thread that is used to watch the progress of the renders.
        # This is done in a seperate thread, so the Fusion main thread isn't blocked.
        global stopFlag
        stopFlag = threading.Event()
        myThread = MyThread(stopFlag)
        myThread.start()

        # Register the custom event and connect the handler.
        # This is done so the monitoring thread can trigger this
        # event to allow work to happen on Fusion's main thread.
        global customEvent
        customEvent = app.registerCustomEvent(checkProgress)
        onThreadEvent = ThreadEventHandler()
        customEvent.add(onThreadEvent)
        handlers.append(onThreadEvent)

        # Don't terminate the script, but allow it to keep running.
        adsk.autoTerminate(False)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        # Clean up the events.
        if handlers.count:
            customEvent.remove(handlers[0])
        stopFlag.set()
        app.unregisterCustomEvent(checkProgress)

        ui.messageBox('Rendering is complete')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Given a camera, this determines in which of the primary axis
# directions, the up vector is closest to and return that vector.
def GetUpVector(camera: adsk.core.Camera) -> adsk.core.Vector3D:
    # Determine which of the primary directions the current up vector is closest to.
    upVector = adsk.core.Vector3D.create(1, 0, 0)
    angle = upVector.angleTo(camera.upVector)
    if adsk.core.Vector3D.create(-1, 0, 0).angleTo(camera.upVector) < angle:
        upVector = adsk.core.Vector3D.create(-1, 0, 0)
        angle = upVector.angleTo(camera.upVector)

    if adsk.core.Vector3D.create(0, 1, 0).angleTo(camera.upVector) < angle:
        upVector = adsk.core.Vector3D.create(0, 1, 0)
        angle = upVector.angleTo(camera.upVector)

    if adsk.core.Vector3D.create(0, -1, 0).angleTo(camera.upVector) < angle:
        upVector = adsk.core.Vector3D.create(0, -1, 0)
        angle = upVector.angleTo(camera.upVector)

    if adsk.core.Vector3D.create(0, 0, 1).angleTo(camera.upVector) < angle:
        upVector = adsk.core.Vector3D.create(0, 0, 1)
        angle = upVector.angleTo(camera.upVector)

    if adsk.core.Vector3D.create(0, 0, -1).angleTo(camera.upVector) < angle:
        upVector = adsk.core.Vector3D.create(0, 0, -1)
        angle = upVector.angleTo(camera.upVector)

    return upVector


Save and Insert File API Sample

Description

Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Code Samples

  • Python
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

# Global variable used to maintain a reference to all event handlers.
handlers = []

_app = adsk.core.Application.get()
_ui  = _app.userInterface

newFilename = 'SampleSave'
_docId = ''

def run(context):
    try:
        # Check that the active document has been saved.
        doc = _app.activeDocument
        if not doc.isSaved:
            _ui.messageBox('The active document must be saved before running this script.')
            return

        parentFolder = doc.dataFile.parentFolder

        # Connect to the dataFileComplete event, to watch for when the file has been fully saved on Fusion Team.
        onDataFileComplete = MyDataFileCompleteHandler()
        _app.dataFileComplete.add(onDataFileComplete)
        handlers.append(onDataFileComplete)

        # Create a new design with a cylinder.
        newDoc = CreateCylinderDesign(parentFolder, newFilename)

        adsk.autoTerminate(False)
    except:
        _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the dataFileComplete event.
class MyDataFileCompleteHandler(adsk.core.DataEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: adsk.core.DataEventArgs):
        try:
            # Check to see if the document we care about is the one that saved.
            if args.file.name == newFilename:
                cylinderDoc = args.file

                topDoc = _app.activeDocument

                # Insert the saved document into the activate document.
                des: adsk.fusion.Design = topDoc.products.itemByProductType('DesignProductType')
                root = des.rootComponent

                cylOcc = root.occurrences.addByInsert(args.file, adsk.core.Matrix3D.create(), True)

                adsk.terminate()
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def CreateCylinderDesign(folder, filename):
    try:
        # Create a new document and have it be invisible.
        cylinderDoc: adsk.fusion.FusionDocument = _app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType, True)

        # Get the Design and root component from the document.
        des: adsk.fusion.Design = cylinderDoc.products.itemByProductType('DesignProductType')
        root = des.rootComponent

        # Create a sketch with a single circle.
        sk: adsk.fusion.Sketch = root.sketches.add(root.yZConstructionPlane)
        sk.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(3,2,0), 4)
        prof = sk.profiles[0]

        # Create an extrusion, using the circle.
        root.features.extrudeFeatures.addSimple(prof, adsk.core.ValueInput.createByReal(12), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Save the document.
        cylinderDoc.saveAs(filename, folder, 'Sample demonstrating watching for the save to complete.', '')

        global _docId
        _docId = cylinderDoc.creationId
        cylinderDoc.close(False)
    except:
        _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


STLExport API Sample

Description

Demonstrates how to export f3d to STL format.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback
import os.path

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;
}

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

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;
}


Gets all properties using GraphQL

Description

Fetches bulk component properties of the root component and from occurrences via single GraphQL query.

Code Samples

  • Python
"""This file acts as the main module for this script."""

import traceback
import adsk.core
import adsk.fusion
import json

'''
Overview of the steps demonstrated.
1. Register the mfgdmDataReady event.
   Before accessing cloud metadata such as mfgdmModelId, ensure the data is ready.
   Register the MFGDMDataReadyEventHandler at the beginning of your script execution
   in the mfgdm_data_ready() method.
2. Implement the MFGDMDataReadyEventHandler
   This event fires when the cloud model data is fully initialized and accessible.
   Use the notify method to access mfgdmModelId from the design or component level.
3. Access Model IDs and Timestamps
   Inside the event handler, the script retrieves rootDataComponent from the design.
   If the mfgdmModelId is available, it stores the model ID and timestamp pair in modelIdsWithTime.
4. Fetch Bulk Properties Using GraphQL
   The bulkCompProps function constructs and sends a GraphQL request to the MFGDM
   service using the collected modelIdsWithTime. It retrieves properties like part
   numbers and descriptions and logs them.
'''

# Initialize the global variables for the Application and UserInterface objects.
app = adsk.core.Application.get()
ui  = app.userInterface
mfgdm_url = 'mfgdm://v3'

def run(_context: str):
    """This function is called by Fusion when the script is run."""

    try:
        mfgdm_data_ready()
        adsk.autoTerminate(False)
    except:  #pylint:disable=bare-except
        app.log(f'Failed:\n{traceback.format_exc()}')

mfgdmDataReadyHandler: adsk.core.MFGDMDataEventHandler = None

class MFGDMDataReadyEventHandler(adsk.core.MFGDMDataEventHandler):
    """This class handles the mfgdm data ready event."""

    def notify(self, args: adsk.core.MFGDMDataEventArgs):
        """This method is called when the mfgdmDataReady event occurs."""

        modelIdsWithTime = set()

        # Get the active design from the document provided by the event.
        design: adsk.fusion.Design = args.document.products.itemByProductType('DesignProductType')

        # Get the DataComponent from the root component and add its MFGDM ID and timestamp to the set.
        data = design.rootDataComponent
        if data.mfgdmModelId:
            modelIdsWithTime.add((data.mfgdmModelId, data.timestamp))

        # Add the MFGDM ID and timestamp of each occurrence.
        for occ in design.rootComponent.allOccurrences:
            if data := occ.dataComponent:
                modelIdsWithTime.add((data.mfgdmModelId, data.timestamp))

        # Check if modelIdsWithTime is empty before proceeding to fetch comp properties
        if not modelIdsWithTime:
            app.log('No model ID to fetch component ID.')
        else:
            # Call the function to get the properties.
            bulkCompProps(list(modelIdsWithTime))

# Connect to the mfgdmDataReady event.
def mfgdm_data_ready():
    global mfgdmDataReadyHandler
    mfgdmDataReadyHandler = MFGDMDataReadyEventHandler()
    app.mfgdmDataReady.add(mfgdmDataReadyHandler)

# Divide the query into chunks.
def divide_into_chunks(lst, n=50):
    """Divides a list into chunks of size n (default is 50) as bulk models has limit of 50 models per request."""
    for i in range(0, len(lst), n):
        yield lst[i:i + n ]

def bulkCompProps(componentIdsAtTime):
    """Fetches component properties from the GraphQL endpoint using modelId and time."""

    for chunk in divide_into_chunks(componentIdsAtTime):
        # Use HTTP Request to query for the properties of each chunk.
        request = adsk.core.HttpRequest.create(mfgdm_url, adsk.core.HttpMethods.PostMethod)
        request.setHeader('Content-type', 'application/json; charset=utf-8')

        # Define the GraphQL query as a string
        graphql_query = '''
            query ($input:[BulkModelsQueryInput!]!) {
                bulkModels(input: $input) {
                    model {
                        component {
                            description {
                                value
                            }
                            partNumber {
                                value
                            }
                        }
                    }
                }
            }
        '''

        inputArr = [{'modelId': modelId} if not time else {'modelId': modelId, 'time': time} for modelId, time in chunk]

        # Convert the payload to a JSON string
        payload = {
            'query': graphql_query,
            'variables': {'input': inputArr}
        }

        request.data = json.dumps(payload)
        app.log(f'json_payload: {request.data}')

        headers = request.headers()
        app.log(f'headers: {str(headers)}')
        response = request.executeSync()
        app.log(f'Response Code: {response.statusCode}')

        if response.statusCode == 200:
            # Write the result to the TEXT COMMAND window.
            response_json = json.loads(response.data)
            app.log(f'Response JSON:\n{json.dumps(response_json)}')
        else:
            app.log(f'Failed to fetch properties with status code {response.statusCode}')


Get part number using GraphQL

Description

Fetches part number of root component and from occurrences via GQL query.

Code Samples

  • Python
"""This file acts as the main module for this script."""

import traceback
import adsk.core
import adsk.fusion
import json

'''
Overview of the steps demonstrated:
1. Register the mfgdmDataReady event.
   Before accessing cloud metadata such as mfgdmModelId, ensure the data is ready.
   Register the MFGDMDataReadyEventHandler at the beginning of your script execution
   in the mfgdm_data_ready() method.
2. Implement the MFGDMDataReadyEventHandler
   This event fires when the cloud model data is fully initialized and accessible.
   Use the notify method to access mfgdmModelId from the design or component level.
3. Access Model IDs and Timestamps
   Inside the event handler, the script retrieves rootDataComponent from the design.
   If the mfgdmModelId is available, it stores the model ID and timestamp pair in modelIdsWithTime.
4. Fetch Part Numbers Using GraphQL
   The fetchPNFromGql function constructs and sends a GraphQL request to the MFGDM
   service using the collected modelIdsWithTime. It retrieves part numbers and logs them.
'''

# Initialize the global variables for the Application and UserInterface objects.
app = adsk.core.Application.get()
ui  = app.userInterface
mfgdm_url = 'mfgdm://v3'

def run(_context: str):
    """This function is called by Fusion when the script is run."""

    try:
        mfgdm_data_ready()
        adsk.autoTerminate(False)
    except:  #pylint:disable=bare-except
        app.log(f'Failed:\n{traceback.format_exc()}')

mfgdmDataReadyHandler: adsk.core.MFGDMDataEventHandler = None

class MFGDMDataReadyEventHandler(adsk.core.MFGDMDataEventHandler):
    """This class handles the mfgdm data ready event."""

    def notify(self, args: adsk.core.MFGDMDataEventArgs):
        """This method is called when the mfgdm data ready event occurs."""

        # Empty set to collect unique modelId and time pairs.
        modelIdsWithTime = set()

        # Get the active design from the document provided by the event.
        design: adsk.fusion.Design = args.document.products.itemByProductType('DesignProductType')

        # Get the DataComponent from the root component and add its MFGDM ID and timestamp to the set.
        data = design.rootDataComponent
        app.log(f'root model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')
        if data.mfgdmModelId:
            modelIdsWithTime.add((data.mfgdmModelId, data.timestamp))
        else:
            app.log(f'Root Component does not have a valid mfgdmModelId.')

        # Add the MFGDM ID and timestamp of each occurrence.
        for occ in design.rootComponent.allOccurrences:
            if data := occ.dataComponent:
                app.log(f'occurrence: {occ.fullPathName}, model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')
                modelIdsWithTime.add((data.mfgdmModelId, data.timestamp))
            else:
                app.log(f'Occurrence does not have DataComponent')

        # Log information for all components
        for comp in design.allComponents:
            app.log(f'comp: {comp.name}, model id: {comp.mfgdmModelId}')

        # Check if modelIdsWithTime is empty before proceeding to fetch part numbers.
        if not modelIdsWithTime:
            app.log('No model ID to fetch part number.')
        else:
            # Call the function to get the part numbers.
            for modelId, time in modelIdsWithTime:
                fetchPNFromGql(modelId, time)

# Connect to the mfgdmDataReady event.
def mfgdm_data_ready():
    """Register the MFGDMData ready event handler."""
    global mfgdmDataReadyHandler
    mfgdmDataReadyHandler = MFGDMDataReadyEventHandler()
    app.mfgdmDataReady.add(mfgdmDataReadyHandler)

def fetchPNFromGql(modelId, time):
    """Fetch part number from the GraphQL endpoint using modelId and time."""

    # Use HTTP Request to query for the part number.
    request = adsk.core.HttpRequest.create(mfgdm_url, adsk.core.HttpMethods.PostMethod)
    request.setHeader('Content-type', 'application/json; charset=utf-8')

    # Define the GraphQL query as a string.
    graphql_query = '''
        query ($modelId: ID!, $time: DateTime) {
            model(modelId: $modelId, time: $time) {
                component {
                    partNumber {
                        displayValue
                    }
                }
            }
        }
    '''

    # Create a dictionary to represent the GraphQL request payload
    variables = {'modelId': modelId}
    # Only pass 'time' if it is not an empty string
    if time:
        variables['time'] = time

    payload = {
        'query': graphql_query,
        'variables': variables
    }

    # Convert the payload to a JSON string
    request.data = json.dumps(payload)
    app.log(f'json_payload: {request.data}')

    headers = request.headers()
    app.log(f'headers: {str(headers)}')
    response = request.executeSync()
    app.log(f'Response Code: {response.statusCode}')

    if response.statusCode == 200:
        # Write the result to the TEXT COMMAND window.
        response_json = json.loads(response.data)
        app.log(f'Response JSON:\n{json.dumps(response_json)}')
    else:
        app.log(f'Failed to fetch part number with status code {response.statusCode}')


Set part number using GraphQL

Description

Sets part number of root component and from occurrences via GQL query.

Code Samples

  • Python
"""This file acts as the main module for this script."""

import traceback
import adsk.core
import adsk.fusion
import json

'''
Overview of the steps demonstrated:
1. Register the mfgdmDataReady event.
   Before accessing cloud metadata such as mfgdmModelId, ensure the data is ready.
   Register the MFGDMDataReadyEventHandler at the beginning of your script execution
   in the mfgdm_data_ready() method.
2. Implement the MFGDMDataReadyEventHandler
   This event fires when the cloud model data is fully initialized and accessible.
   Use the notify method to access mfgdmModelId from the design or component level.
3. Access Model IDs
   Inside the event handler, the script retrieves rootDataComponent from the design.
   If the mfgdmModelId is available, it stores the model ID in modelIds set.
4. Set Part Numbers Using GraphQL
   The setPNFromGql function constructs and sends a GraphQL mutation request to the MFGDM
   service using the collected modelIds. It sets part numbers and logs them.
   Part numbers are set sequentially like PN-1, PN-2, depending on the number of components.
'''

# Initialize the global variables for the Application and UserInterface objects.
app = adsk.core.Application.get()
ui  = app.userInterface
mfgdm_url = 'mfgdm://v3'

def run(_context: str):
    """This function is called by Fusion when the script is run."""

    try:
        mfgdm_data_ready()
        adsk.autoTerminate(False)
    except:  #pylint:disable=bare-except
        app.log(f'Failed:\n{traceback.format_exc()}')

mfgdmDataReadyHandler: adsk.core.MFGDMDataEventHandler = None

class MFGDMDataReadyEventHandler(adsk.core.MFGDMDataEventHandler):
    """This class handles the mfgdm data ready event."""

    def notify(self, args: adsk.core.MFGDMDataEventArgs):
        """This method is called when the mfgdm data ready event occurs."""

        # Empty set to collect unique modelIds.
        modelIds = set()

        # Get the active design from the document provided by the event.
        design: adsk.fusion.Design = args.document.products.itemByProductType('DesignProductType')

        # Get the DataComponent from the root component and add its MFGDM ID to the set.
        data = design.rootDataComponent
        app.log(f'root model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')
        if data.mfgdmModelId:
            modelIds.add(data.mfgdmModelId)
        else:
            app.log(f'Root Component does not have a valid mfgdmModelId.')

        # Add the MFGDM ID and timestamp of each occurrence.
        for occ in design.rootComponent.allOccurrences:
            if data := occ.dataComponent:
                app.log(f'occurrence: {occ.fullPathName}, model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')
                modelIds.add(data.mfgdmModelId)
            else:
                app.log(f'Occurrence does not have DataComponent')

        # Log information for all components
        for comp in design.allComponents:
            app.log(f'comp: {comp.name}, model id: {comp.mfgdmModelId}')

        # Check if modelIds is empty before proceeding to set part numbers
        if not modelIds:
            app.log('No model ID to set part number.')
        else:
            # Call the funtion tp set PartNumber for each unique modelId
            # Part numbers are set sequentially like PN-1, PN-2, depending on the number of components.
            for index, modelId in enumerate(modelIds, start=1):
                partNumber = f'PN-{index}'
                setPNFromGql(modelId, partNumber)

# Connect to the mfgdmDataReady event.
def mfgdm_data_ready():
    """Register the MFGDMData ready event handler."""
    global mfgdmDataReadyHandler
    mfgdmDataReadyHandler = MFGDMDataReadyEventHandler()
    app.mfgdmDataReady.add(mfgdmDataReadyHandler)

def setPNFromGql(modelId, partNumber):
    """Set part number from the GraphQL endpoint using modelId."""

    # Use HTTP Request for mutation call to set the part number.
    request = adsk.core.HttpRequest.create(mfgdm_url, adsk.core.HttpMethods.PostMethod)
    request.setHeader('Content-type', 'application/json; charset=utf-8')

    # Define the GraphQL query as a string
    graphql_query = '''
        mutation ($input: AssignPartNumberInput!) {
            assignModelPartNumber(input: $input) {
                model {
                    component {
                        partNumber {
                            displayValue
                        }
                    }
                }
            }
        }
    '''

    # Create a dictionary to represent the GraphQL request payload
    input = {'modelId': modelId, 'partNumber': partNumber}
    payload = {
        'query': graphql_query,
        'variables': {'input': input}
    }

    # Convert the payload to a JSON string
    request.data = json.dumps(payload)
    app.log(f'json_payload: {request.data}')

    headers = request.headers()
    app.log(f'headers: {str(headers)}')
    response = request.executeSync()
    app.log(f'Response Code: {response.statusCode}')

    if response.statusCode == 200:
        # Write the result to the TEXT COMMAND window.
        response_json = json.loads(response.data)
        app.log(f'Response JSON:\n{json.dumps(response_json)}')
    else:
        app.log(f'Failed to set part number with status code {response.statusCode}')


Material API Sample

Description

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root 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

        # Load a local material library. You'll need to edit the path to the libary.
        materialLibs = app.materialLibraries
        matLib = materialLibs.load('C:/Temp//APISampleMaterialLibrary2.adsklib')

        # Get the first appearance from the library.
        appear = matLib.appearances.item(0)

        # Copy the appearance into the design.
        des = adsk.fusion.Design.cast(app.activeProduct)
        appear = des.appearances.addByCopy(appear, f'{appear.name}_Copied')

        # Apply the appearance to the first body in the design.
        root = des.rootComponent
        body = root.bRepBodies.item(0)
        body.appearance = appear

        # Unload the library.
        if matLib.isNative == 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<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Load a local material library. You'll need to edit the path to the  library.
    Ptr<MaterialLibraries> matLibs = app->materialLibraries();
    if (!matLibs)
        return false;

     Ptr<MaterialLibrary> matLib = matLibs->load("C:/Temp/APISampleMaterialLibrary2.adsklib");

    // Get the first appearance from the library.
    Ptr<Appearance> existingAppear = matLib->appearances()->item(0);
    if (!existingAppear)
        return false;

    // Copy the appearance into the design.
    Ptr<Appearance> appear = design->appearances()->addByCopy(existingAppear, existingAppear->name() + "_Copied");

    // Get the first body in the root component of the design.
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    Ptr<BRepBody> body = rootComp->bRepBodies()->item(0);
    if (!body)
        return false;

    // Apply the appearance to the body.
    body->appearance(appear);

    if (matLib->isNative() == false)
    {
        matLib->unload();
    }

    return true;
}


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.
    Ptr<SketchCircle> circle3 = circles->addByCenterRadius(circle2->centerSketchPoint(), 4);
    if (!circle3)
        return false;

    return true;
}


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;
}


API Sample that demonstrates creating sketch lines in various ways.

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;
}


Project To Surface API Sample

Description

Projects the specified set of curves onto the specified set of faces using the specified method of projection.

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 three components under root component
        occ1 = allOccs.addNewComponent(transform)
        subComp1 = occ1.component
        occ2 = allOccs.addNewComponent(transform)
        subComp2 = occ2.component
        occ3 = allOccs.addNewComponent(transform)
        subComp3 = occ3.component

        # Create a sketch in sub component 1
        sketches1 = subComp1.sketches
        sketch1 = sketches1.add(rootComp.yZConstructionPlane)

        # 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)

        # 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)

        # Create construction plane
        planes = rootComp.constructionPlanes
        planeInput = planes.createInput()
        offsetValue = adsk.core.ValueInput.createByReal(8.0)
        planeInput.setByOffset(rootComp.yZConstructionPlane, offsetValue)
        plane = planes.add(planeInput)

         # Create a sketch in sub component 2
        sketches2 = subComp2.sketches
        sketch2 = sketches2.add(plane)

        # Create the spline.
        points = adsk.core.ObjectCollection.create()
        points.add(adsk.core.Point3D.create(0, 8, 0))
        points.add(adsk.core.Point3D.create(5, 6, 0))
        points.add(adsk.core.Point3D.create(-5, 5, 0))

        sketch2Curves = sketch2.sketchCurves
        spline = sketch2Curves.sketchFittedSplines.add(points)

        # Create sketch rectangle
        sketch2Lines = sketch2Curves.sketchLines
        startPoint2 = adsk.core.Point3D.create(-4, 2, 0)
        endPoint2 = adsk.core.Point3D.create(3, 4, 0)
        sketch2Lines.addTwoPointRectangle(startPoint2, endPoint2)

        # Get the profile of the second sketch
        prof2 = sketch2.profiles.item(0)

        # Create an extrusion input
        extrudes2 = subComp2.features.extrudeFeatures
        extInput2 = extrudes2.createInput(prof2, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 2 cm
        extent_distance_2 = adsk.fusion.DistanceExtentDefinition.create(adsk.core.ValueInput.createByString("2cm"))
        # Define that the taple angle is 10 degree
        deg10 = adsk.core.ValueInput.createByString("10 deg")

        extInput2.setOneSideExtent(extent_distance_2, adsk.fusion.ExtentDirections.PositiveExtentDirection, deg10)

        # Set the extrude type to be solid
        extInput2.isSolid = True

        # Create the extrusion
        ext2 = extrudes2.add(extInput2)

        # Get the body with the first extrude
        body = ext1.bodies.item(0)

        # Get faces
        faceList = []
        for face in body.faces:
            faceList.append(face)

        # Get curves
        curveList = []
        for curve in sketch2Curves:
            curveList.append(curve)

        # Get points
        for point in sketch2.sketchPoints:
            curveList.append(point)

        # Get the body with the second extrude
        body2 = ext2.bodies.item(0)

        # Get eges
        for edge in body2.edges:
            curveList.append(edge)

        # Get construction axis
        curveList.append(rootComp.yConstructionAxis)

        # Get construction point
        curveList.append(rootComp.originConstructionPoint)

        sketches3 = subComp3.sketches
        # Create a sketch in sub component 3
        skAlongVecProject = sketches3.add(rootComp.yZConstructionPlane)
        # sketch project to surface (along vector)
        projectedEntities = skAlongVecProject.projectToSurface(faceList, curveList, adsk.fusion.SurfaceProjectTypes.AlongVectorSurfaceProjectType, rootComp.xConstructionAxis)

        projectedEntities = []
        # Create a sketch in sub component 3
        skClosestPtProject = sketches3.add(rootComp.yZConstructionPlane)
        # sketch project to surface (closest point)
        projectedEntities = skClosestPtProject.projectToSurface(faceList, curveList, adsk.fusion.SurfaceProjectTypes.ClosestPointSurfaceProjectType)

    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/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/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/Features/DistanceExtentDefinition.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/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<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 three sub components 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;

    Ptr<Occurrence> subOcc2 = occs->addNewComponent(transform);
    if (!subOcc2)
        return false;

    Ptr<Component> subComp2 = subOcc2->component();
    if (!subComp2)
        return false;

    Ptr<Occurrence> subOcc3 = occs->addNewComponent(transform);
    if (!subOcc3)
        return false;

    Ptr<Component> subComp3 = subOcc3->component();
    if (!subComp3)
        return false;

    // 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;

    // 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(8.0);
    planeInput->setByOffset(rootComp->yZConstructionPlane(), offsetValue);
    Ptr<ConstructionPlane> plane = planes->add(planeInput);

    // Create sketch 2 in sub component 2
    Ptr<Sketches> sketches2 = subComp2->sketches();
    if (!sketches2)
        return false;

    Ptr<Sketch> sketch2 = sketches2->add(plane);
    if (!sketch2)
        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, 8, 0));
    points->add(Point3D::create(5, 6, 0));
    points->add(Point3D::create(-5, 5, 0));

    // Get sketch curves
    Ptr<SketchCurves> sketch2Curves = sketch2->sketchCurves();
    if (!sketch2Curves)
        return false;

    // Create the spline.
    Ptr<SketchFittedSplines> splines = sketch2Curves->sketchFittedSplines();
    if (!splines)
        return false;

    Ptr<SketchFittedSpline> spline = splines->add(points);
    if (!spline)
        return false;

    // Get sketch lines
    Ptr<SketchLines> sketch2Lines = sketch2Curves->sketchLines();
    if (!sketch2Lines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint2 = Point3D::create(-4, 2, 0);

    Ptr<Point3D> endPoint2 = Point3D::create(3, 4, 0);
    sketch2Lines->addTwoPointRectangle(startPoint2, endPoint2);

    // Get the profile
    Ptr<Profiles> profs2 = sketch2->profiles();
    if (!profs2)
        return false;

    Ptr<Profile> prof2 = profs2->item(0);

    // Create an extrusion input
    Ptr<Features> feats2 = subComp2->features();
    if (!feats2)
        return false;

    Ptr<ExtrudeFeatures> extrudes2 = feats2->extrudeFeatures();
    if (!extrudes2)
        return false;

    Ptr<ExtrudeFeatureInput> extInput2 = extrudes2->createInput(prof2, FeatureOperations::NewBodyFeatureOperation);

    // Create distance value input
    Ptr<ValueInput> cm2 = adsk::core::ValueInput::createByString("2 cm");

    // Create taper angle value input
    Ptr<ValueInput> deg10 = adsk::core::ValueInput::createByString("10 deg");

    // Create a distance extent definition
    Ptr<DistanceExtentDefinition> extent_distance_2 = adsk::fusion::DistanceExtentDefinition::create(cm2);
        extInput2->setOneSideExtent(extent_distance_2, adsk::fusion::ExtentDirections::PositiveExtentDirection, deg10));

    // Set the extrude type to be solid
    extInput2->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext2 = extrudes2->add(extInput2);
    if (!ext2)
        return false;

    // Get the body with the first extrude
    Ptr<BRepBodies> bodies = ext1->bodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> body = bodies->item(0);
    if (!body)
        return false;

    // faces
    std::vector<Ptr<BRepFace>> faceVec;
    for (Ptr<BRepFace> face : body->faces())
    {
        faceVec.push_back(face);
    }

    // curves
    std::vector<Ptr<Base>> curveVec;
    for (Ptr<SketchCurve> curve : sketch2Curves)
    {
        curveVec.push_back(curve);
    }

    Ptr<SketchPoints> sketch2Points = sketch2->sketchPoints();
    if (!sketch2Points)
        return false;

    for (Ptr<SketchPoint> point : sketch2Points)
    {
        curveVec.push_back(point);
    }

    // Get the body with the second extrude
    Ptr<BRepBodies> bodies2 = ext2->bodies();
    if (!bodies2)
        return false;

    Ptr<BRepBody> body2 = bodies2->item(0);
    if (!body2)
        return false;

    for (Ptr<BRepEdge> edge : body2->edges())
    {
        curveVec.push_back(edge);
    }

    curveVec.push_back(rootComp->yConstructionAxis());
    curveVec.push_back(rootComp->originConstructionPoint());

    Ptr<Sketches> sketches3 = subComp3->sketches();
    if (!sketches3)
        return false;

    // Create a sketch in sub component 3
    Ptr<Sketch> skAlongVecProject = sketches3->add(yzPlane);
    if (!skAlongVecProject)
        return false;
    // sketch project to surface (along vector)
    std::vector<Ptr<SketchEntity>> projectedEntities = skAlongVecProject->projectToSurface(
        faceVec, curveVec, AlongVectorSurfaceProjectType, rootComp->xConstructionAxis());

    // Create a sketch in sub component 3
    Ptr<Sketch> skClosestPtProject = sketches3->add(yzPlane);
    projectedEntities.clear();
    // sketch project to surface (closest point)
    projectedEntities = skClosestPtProject->projectToSurface(faceVec, curveVec, ClosestPointSurfaceProjectType);

    return true;
}


Sketch Chamfer API Sample

Description

Demonstrates creating a new sketch point.

Code Samples

  • Python
#Author-Autodesk Inc.
#Description-Create a sketch chamfer

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 point rectangle.
        lines = sketch.sketchCurves.sketchLines
        lineList = lines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(5, 5, 0))

        # Add a distance distance chamfer.
        line = sketch.sketchCurves.sketchLines.addDistanceChamfer(lineList[0], lineList[0].endSketchPoint.geometry, lineList[1], lineList[1].startSketchPoint.geometry, 1,1)

        # Add a distance angle chamfer.
        line = sketch.sketchCurves.sketchLines.addAngleChamfer(lineList[1], lineList[1].endSketchPoint.geometry, lineList[2], lineList[2].startSketchPoint.geometry, 1,1)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


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;
}


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;
}


Sketch Point 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;
}


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;
}


Sketch spline through points creation and relative functions API Sample

Description

Create a sketch spline with points and use some operations for spline tangent handle & curvature handle.

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.
        spline = sketch.sketchCurves.sketchFittedSplines.add(points)

        # Get spline fit points
        fitPoints = spline.fitPoints

        # Get the second fit point
        fitPoint = fitPoints.item(1)

        # If there is no the relative tangent handle, activate the tangent handle
        line = spline.getTangentHandle(fitPoint)
        if line is None:
             line = spline.activateTangentHandle(fitPoint)

        # Get the tangent handle
        gottenLine = spline.getTangentHandle(fitPoint)

        # Delete the tangent handle
        gottenLine.deleteMe()

        # Activate the curvature handle
        # If the curvature handle activated. the relative tangentHandle is activated automatically
        activatedArc= spline.activateCurvatureHandle(fitPoint)

        # Get curvature handle and tangent handle
        gottenArc= spline.getCurvatureHandle(fitPoint)
        gottenLine = spline.getTangentHandle(fitPoint)

        # Delete curvature handle
        gottenArc.deleteMe();

    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/Sketch/SketchPointList.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchLine.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.
    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;

    Ptr<SketchFittedSpline> spline = splines->add(points);
    if (!spline)
        return false;

    // Get spline fit points
    Ptr<SketchPointList> fitPoints = spline->fitPoints();
    if (!fitPoints)
        return false;

    // Get the second fit point
    Ptr<SketchPoint> fitPoint = fitPoints->item(1);
    if (!fitPoint)
        return false;

    // If there is no the relative tangent handle, activate the tangent handle
    Ptr<SketchLine> line = spline->getTangentHandle(fitPoint);
    if (line)
        return false;
    else
    {
        line = spline->activateTangentHandle(fitPoint);
        if (!line)
            return false;
    }

    // Get the tangent handle
    Ptr<SketchLine> gottenLine = spline->getTangentHandle(fitPoint);
    if (!gottenLine)
        return false;

    // Delete the tangent handle
    bool isSuccess = gottenLine->deleteMe();
    if (!isSuccess)
        return false;

    // Activate the curvature handle
    // If the curvature handle activated. the relative tangentHandle is activated automatically
    Ptr<SketchArc> activatedArc = spline->activateCurvatureHandle(fitPoint);
    if (!activatedArc)
        return false;

    // Get curvature handle and tangent handle
    Ptr<SketchArc> gottenArc = spline->getCurvatureHandle(fitPoint);
    if (!gottenArc)
        return false;

    gottenLine = spline->getTangentHandle(fitPoint);
    if (!gottenLine)
        return false;

    // Delete curvature handle
    bool isDeleted = gottenArc->deleteMe();
    if (!isDeleted)
        return false;

    return true;
}


Sketch Text API Sample

Description

Demonstrates creating sketch text by creating both mult-line text and text along a curve.

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 and get the Design.
        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 construction plane.
        sk = rootComp.sketches.add(rootComp.xYConstructionPlane)

        # Get the SketchTexts collection object.
        texts = sk.sketchTexts

        # Add multi-line text.
        input = texts.createInput2('This is a long line that is broken automatically.\n\nAnd this is a defined line break.', 0.5)
        input.setAsMultiLine(adsk.core.Point3D.create(0, 0, 0),
                             adsk.core.Point3D.create(10, 5, 0),
                             adsk.core.HorizontalAlignments.LeftHorizontalAlignment,
                             adsk.core.VerticalAlignments.TopVerticalAlignment, 0)
        texts.add(input)

        # Draw an arc to use to create text along a curve.
        arc = sk.sketchCurves.sketchArcs.addByThreePoints(adsk.core.Point3D.create(-10, 0, 0),
                                                          adsk.core.Point3D.create(-5, 3, 0),
                                                          adsk.core.Point3D.create(0, 0, 0))

        # Create text along the arc.
        input = texts.createInput2('Text Along a Curve', 0.75)
        input.setAsAlongPath(arc, False, adsk.core.HorizontalAlignments.CenterHorizontalAlignment, 0)
        input.isHorizontalFlip = True
        input.isVerticalFlip = True
        input.fontName = 'Artifakt Element'
        texts.add(input)

    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/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchArcs.h>
#include <Fusion/Sketch/SketchArc.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;

    // Create a document and get the Design.
    Ptr<Document> doc = app->documents()->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 XY construction plane.
    Ptr<Sketch> sk = rootComp->sketches()->add(rootComp->xYConstructionPlane());
    if (!sk)
        return false;

    // Get the SketchTexts collection object.
    Ptr<SketchTexts> texts = sk->sketchTexts();
    if (!texts)
        return false;

    // Add multi-line text.
    Ptr<SketchTextInput> input = texts->createInput2(
        "This is a long line that is broken automatically.\n\nAnd this is a defined line break.", 0.5);
    if (!input)
        return false;

    bool ret = input->setAsMultiLine(
        adsk::core::Point3D::create(0, 0, 0),
        adsk::core::Point3D::create(10, 5, 0),
        adsk::core::HorizontalAlignments::LeftHorizontalAlignment,
        adsk::core::VerticalAlignments::TopVerticalAlignment,
        0);
    if (!ret)
        return false;

    Ptr<SketchText> text = texts->add(input);
    if (!text)
        return false;

    // Draw an arc to use to create text along a curve.
    Ptr<SketchArc> arc = sk->sketchCurves()->sketchArcs()->addByThreePoints(
        adsk::core::Point3D::create(-10, 0, 0),
        adsk::core::Point3D::create(-5, 3, 0),
        adsk::core::Point3D::create(0, 0, 0));
    if (!arc)
        return false;

    // Create text along the arc.
    input = texts->createInput2("Text Along a Curve", 0.75);
    if (!input)
        return false;

    ret = input->setAsAlongPath(arc, false, adsk::core::HorizontalAlignments::CenterHorizontalAlignment, 0);
    if (!ret)
        return false;

    ret = input->isHorizontalFlip(true);
    if (!ret)
        return false;

    ret = input->isVerticalFlip(true);
    if (!ret)
        return false;

    ret = input->fontName("Comic Sans MS");
    if (!ret)
        return false;

    text = texts->add(input);
    if (!text)
        return false;

    return true;
}


BaseFeature 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;
}


Boss Feature Sample

Description

Demonstrates creating a new boss feature

Code Samples

  • Python
import adsk.core, adsk.fusion, traceback, math

# Get the Application object.
app = adsk.core.Application.get()

def createBoss():
    ui = None
    # Get various top-level Fusion objects.
    ui = app.userInterface
    root = app.activeProduct.rootComponent

    # Select sketch point for boss location
    selection = ui.selectEntity("Select Sketch Point", "SketchPoints")
    sp = selection.entity

    #Create the BossFeatureInput object
    bosses = root.features.bossFeatures
    input = bosses.createInput()
    input.setPositionBySketchPoints(sp)

    draftAng = adsk.core.ValueInput.createByReal(math.pi/90) #draft angle (2 deg)
    holeDraftAng = adsk.core.ValueInput.createByReal(math.pi/180) #draft angle (1 deg)

    #set top side inputs
    top = input.createSideInput()
    top.setCountersink(
        adsk.core.ValueInput.createByReal(1.3),
        adsk.core.ValueInput.createByReal(0.5),
        adsk.core.ValueInput.createByReal(0.9),
        adsk.core.ValueInput.createByReal(.3))
    top.draftAngle = draftAng
    top.holeDraftAngle = holeDraftAng
    top.holeMajorDraftAngle = draftAng
    top.rootRadius = adsk.core.ValueInput.createByReal(0.1)
    top.tipRadius = adsk.core.ValueInput.createByReal(0.05)

    #set alignment properties
    top.alignmentType = adsk.fusion.BossAlignmentTypes.BossAlignStepIn
    top.alignmentDiameter = adsk.core.ValueInput.createByReal(0.9)
    top.alignmentDepth = adsk.core.ValueInput.createByReal(0.1)
    top.alignmentRootRadius = top.tipRadius
    top.alignmentDraftAngle = draftAng

    #set top rib properties
    top.ribCount = adsk.core.ValueInput.createByReal(4)
    top.ribType = adsk.fusion.BossRibShapeTypes.BossRibShapeChamfer
    top.ribLength = adsk.core.ValueInput.createByReal(1.3)
    top.ribThickness = adsk.core.ValueInput.createByReal(0.2)
    top.ribOffset = adsk.core.ValueInput.createByReal(0.7)
    top.ribCutSize = adsk.core.ValueInput.createByReal(0.5)
    top.ribChamferAngle = adsk.core.ValueInput.createByReal(math.pi/3)
    top.ribOuterDraftAngle = adsk.core.ValueInput.createByReal(math.pi/18)
    top.ribDraftAngle = draftAng
    top.ribTipRadius =  adsk.core.ValueInput.createByReal(0.05)
    top.ribRootRadius = adsk.core.ValueInput.createByReal(0.05)

    #set individual rib extent type for the selected point
    top.setRibExtent(sp,[
        adsk.fusion.BossRibExtentTypes.RibSizeByLength,
        adsk.fusion.BossRibExtentTypes.RibSizeToNext,
        adsk.fusion.BossRibExtentTypes.RibSuppressed,
        adsk.fusion.BossRibExtentTypes.RibSizeByLength
    ])

    #set bottom side inputs
    bottom = input.createSideInput()
    bottom.setCounterbore(
        top.alignmentDiameter,
        adsk.core.ValueInput.createByReal(.3),
        adsk.core.ValueInput.createByReal(.5),
        adsk.core.ValueInput.createByReal(.1))

    bottom.tipRadius = top.alignmentRootRadius
    bottom.holeMajorRootRadius = adsk.core.ValueInput.createByReal(0.05)
    bottom.holeExtentType = adsk.fusion.BossHoleExtentTypes.BossBlindFull
    bottom.holeDepth = adsk.core.ValueInput.createByReal(.3)
    bottom.holeEndRadius = adsk.core.ValueInput.createByReal(.05)
    bottom.draftAngle = draftAng
    bottom.holeDraftAngle = holeDraftAng
    bottom.rootRadius = adsk.core.ValueInput.createByReal(0.1)

    #set bottom rib properties
    bottom.ribCount = adsk.core.ValueInput.createByReal(3)
    bottom.ribType = adsk.fusion.BossRibShapeTypes.BossRibShapeFillet
    bottom.ribOffset = adsk.core.ValueInput.createByReal(0.7)
    bottom.ribLength = adsk.core.ValueInput.createByReal(0.8)
    bottom.ribCutSize = adsk.core.ValueInput.createByReal(0.5)
    bottom.ribThickness = top.ribThickness
    bottom.ribDraftAngle = draftAng
    bottom.ribOuterDraftAngle = top.ribOuterDraftAngle
    bottom.ribTipRadius =  adsk.core.ValueInput.createByReal(0.05)
    bottom.ribRootRadius = adsk.core.ValueInput.createByReal(0.05)

    input.side1 = top
    input.side2 = bottom

    # Create the boss.
    bosses.add(input)

def run(context):
    try:
        createBoss()
    except:
        app.log('AddIn Start Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        pass
    except:
        app.log('AddIn Stop Failed: {}'.format(traceback.format_exc()))


Boundary Fill Feature 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

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 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

  • C++
  • Python
#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;
}
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()


Copy Paste Bodies 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;
}


Cut Paste Bodies 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;
}


DeleteFace Feature 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;
}


Draft Feature 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 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

  • C++
  • Python
#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;
}
import adsk.core, adsk.fusion, traceback

def run(context):
    try:
        # Get various top-level objects.
        app = adsk.core.Application.get()
        ui = app.userInterface
        design: adsk.fusion.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: adsk.fusion.BRepEdge = selection.entity
        edgeCollection = adsk.core.ObjectCollection.create()
        edgeCollection.add(edge)

        # Create the ChamferInput object.
        chamfers = root.features.chamferFeatures
        input = chamfers.createInput2()
        offset = adsk.core.ValueInput.createByReal(1)
        input.chamferEdgeSets.addEqualDistanceChamferEdgeSet(edgeCollection, offset, True)

        # Create the chamfer.
        chamfer = chamfers.add(input)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Extend Feature 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)
        extendFeatureInput.extendAlignment = adsk.fusion.SurfaceExtendAlignment.FreeEdges

        # 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);
    extendInput->extendAlignment(SurfaceExtendAlignment::FreeEdges);

    // Create an extend feature.
    extends->add(extendInput);

    return true;
}


Extrude Feature 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);
        extrudeInput->setOneSideExtent(extent_distance, adsk::fusion::ExtentDirections::PositiveExtentDirection));
    // 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);
        extrudeInput->setOneSideExtent(extent_distance_2, adsk::fusion::ExtentDirections::PositiveExtentDirection));
    // 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
        extrudeInput->setOneSideExtent(extent_toentity, adsk::fusion::ExtentDirections::PositiveExtentDirection, deg0));
    // 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();
        extrudeInput->setOneSideExtent(extent_all, adsk::fusion::ExtentDirections::PositiveExtentDirection, deg2));
    // 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;
}


Fillet Feature Edit API Sample

Description

Demonstrates editing a fillet feature.
To successfully run this sample you can use this 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, root component, and timeline.
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        rootComp = design.rootComponent
        timeline = design.timeline

        # Get the first fillet feature in the root component.
        fillet: adsk.fusion.FilletFeature = rootComp.features.filletFeatures[0]

        # Roll the timeline to just before the fillet.
        fillet.timelineObject.rollTo(True)

        # Iterate over the edge sets.
        edgeSet: adsk.fusion.FilletEdgeSet = None

        # Save the edges currently used by the edge sets into a list.
        edges = []
        for edgeSet in fillet.edgeSets:
            edges.append(edgeSet.edges[0])

        # Insert the last edge into the first index and remove the last edge.
        edges.insert(0, edges[len(edges)-1])
        edges.pop(len(edges)-1)

        # Process each edge set based on its type.
        for i in range(fillet.edgeSets.count):
            edgeSet = fillet.edgeSets[i]
            if edgeSet.objectType == adsk.fusion.ConstantRadiusFilletEdgeSet.classType():
                # Change the radious of the fillet.
                constantEdgeSet: adsk.fusion.ConstantRadiusFilletEdgeSet = edgeSet
                radiusParam = constantEdgeSet.radius
                radiusParam.value = radiusParam.value / 2.0

                # Toggle the continuity type between tangent and curvature.
                if constantEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType:
                    constantEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType
                elif constantEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType:
                    constantEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType

                # Change which edge is filleted.
                newEdge = adsk.core.ObjectCollection.create()
                newEdge.add(edges[i])
                constantEdgeSet.edges = newEdge
            elif edgeSet.objectType == adsk.fusion.VariableRadiusFilletEdgeSet.classType():
                variableEdgeSet: adsk.fusion.VariableRadiusFilletEdgeSet = edgeSet

                # Swap the values of the start and end radii.
                startRadiusParam = variableEdgeSet.startRadius
                endRadiusParam = variableEdgeSet.endRadius
                startVal = startRadiusParam.value
                startRadiusParam.expression = endRadiusParam.expression
                endRadiusParam.value = startVal

                # Edit the mid positions.
                midPositions = variableEdgeSet.midPositions
                midRadii = variableEdgeSet.midRadii
                for j in range(0, midPositions.count):
                    # Change the position and radius of the mid positions.
                    pos = midPositions.item(j).value
                    pos = pos + ((1 - pos) * 0.25)
                    midPositions.item(j).value = pos

                    midRadii.item(j).value = midRadii.item(j).value * 1.5

                # Add a new position.
                newMidPosition = adsk.core.ValueInput.createByReal(0.25)
                newMidRadius = adsk.core.ValueInput.createByReal(startRadiusParam.value * 0.75)
                variableEdgeSet.addMidPosition(newMidPosition, newMidRadius)

                # Toggle the continuity type between tangent and curvature.
                if variableEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType:
                    variableEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType
                elif variableEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType:
                    variableEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType

                # Change which edge is filleted.
                newEdge = adsk.core.ObjectCollection.create()
                newEdge.add(edges[i])
                variableEdgeSet.edges = newEdge
            elif edgeSet.objectType == adsk.fusion.ChordLengthFilletEdgeSet.classType():
                chordLengthEdgeSet = adsk.fusion.ChordLengthFilletEdgeSet.cast(edgeSet)

                # Edit the chord length.
                chordLengthParam = chordLengthEdgeSet.chordLength
                chordLengthParam.value = chordLengthParam.value * .75

                # Edit the tangency weight.
                tangencyWeightParam = chordLengthEdgeSet.tangencyWeight
                tangencyWeightParam.value = tangencyWeightParam.value / 2

                # Toggle the continuity type between tangent and curvature.
                if chordLengthEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType:
                    chordLengthEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType
                elif chordLengthEdgeSet.continuity == adsk.fusion.SurfaceContinuityTypes.CurvatureSurfaceContinuityType:
                    chordLengthEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType

                # Change which edge is filleted.
                newEdge = adsk.core.ObjectCollection.create()
                newEdge.add(edges[i])
                chordLengthEdgeSet.edges = newEdge

        # Move the timeline back.
        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>
#include <Fusion/BRep/BRepEdge.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 the timeline associated with this design
    Ptr<Timeline> timeline = design->timeline();
    if (!timeline)
        return false;

    // Get the first fillet in the design.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<FilletFeatures> fillets = features->filletFeatures();
    if (!fillets)
        return false;
    Ptr<FilletFeature> fillet = fillets->item(0);
    if (!fillet)
        return false;

    // Roll the timeline to just before the fillet.
    Ptr<TimelineObject> timelineObj = fillet->timelineObject();
    if (!timelineObj)
        return false;
    timelineObj->rollTo(true);

    // Change the corner type.
    bool isRollingBallCorner = fillet->isRollingBallCorner();
    fillet->isRollingBallCorner(!isRollingBallCorner);

    // Save the edges currently used by the edge sets into a vector so that they are
    // rotated from the their indexed position. 0 = 1, 1 = 2, 2 = 0.
    Ptr<BRepEdge> edges[3];
    for (int i = 0; i < 3; ++i)
    {
        Ptr<FilletEdgeSet> edgeSet = fillet->edgeSets()->item(i);
        if (!edgeSet)
            return false;
        Ptr<BRepEdge> edge = NULL;
        if (edgeSet->objectType() == adsk::fusion::ConstantRadiusFilletEdgeSet::classType())
        {
            Ptr<ConstantRadiusFilletEdgeSet> constRadEdgeSet = edgeSet;
            edge = constRadEdgeSet->edges()->item(0);
            if (!edge)
                return false;
        }
        else if (edgeSet->objectType() == adsk::fusion::ChordLengthFilletEdgeSet::classType())
        {
            Ptr<ChordLengthFilletEdgeSet> chordLengthEdgeSet = edgeSet;
            edge = chordLengthEdgeSet->edges()->item(0);
            if (!edge)
                return false;
        }
        else if (edgeSet->objectType() == adsk::fusion::VariableRadiusFilletEdgeSet::classType())
        {
            Ptr<VariableRadiusFilletEdgeSet> varRadEdgeSet = edgeSet;
            edge = varRadEdgeSet->edges()->item(0);
            if (!edge)
                return false;
        }

        // Reassign the edge into the new index.
        if (i == 2)
        {
            edges[0] = edge;
        }
        else
        {
            edges[i + 1] = edge;
        }
    }

    // Process each edge set based on its type.
    for (int i = 0; i < 3; ++i)
    {
        Ptr<FilletEdgeSet> edgeSet = fillet->edgeSets()->item(i);
        if (!edgeSet)
            return false;

        if (edgeSet->objectType() == adsk::fusion::ConstantRadiusFilletEdgeSet::classType())
        {
            Ptr<ConstantRadiusFilletEdgeSet> constRadEdgeSet = edgeSet;

            // Change the radius of the fillet.
            Ptr<ModelParameter> radiusParam = constRadEdgeSet->radius();
            if (!radiusParam)
                return false;
            radiusParam->value(radiusParam->value() / 2.0);

            // Toggle the continuity type between tangent and curvature.
            if (constRadEdgeSet->continuity() == adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType)
            {
                constRadEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType);
            }
            else if (
                constRadEdgeSet->continuity() == adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType)
            {
                constRadEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType);
            }

            // Change which edge is filleted.
            Ptr<ObjectCollection> newEdge = adsk::core::ObjectCollection::create();
            if (!newEdge)
                return false;
            newEdge->add(edges[i]);
            bool ret = constRadEdgeSet->edges(newEdge);
        }
        else if (edgeSet->objectType() == adsk::fusion::ChordLengthFilletEdgeSet::classType())
        {
            Ptr<ChordLengthFilletEdgeSet> chordLengthEdgeSet = edgeSet;

            // Edit the chord length.
            Ptr<ModelParameter> chordLengthParam = chordLengthEdgeSet->chordLength();
            if (!chordLengthParam)
                return false;
            chordLengthParam->value(chordLengthParam->value() * 0.75);

            // Edit the tangency weight.
            Ptr<ModelParameter> tangencyWeightParam = chordLengthEdgeSet->tangencyWeight();
            if (!tangencyWeightParam)
                return false;
            tangencyWeightParam->value(tangencyWeightParam->value() / 2.0);

            // Toggle the continuity type between tangent and curvature.
            if (chordLengthEdgeSet->continuity() == adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType)
            {
                chordLengthEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType);
            }
            else if (
                chordLengthEdgeSet->continuity() ==
                adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType)
            {
                chordLengthEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType);
            }

            // Change which edge is filleted.
            Ptr<ObjectCollection> newEdge = adsk::core::ObjectCollection::create();
            if (!newEdge)
                return false;
            newEdge->add(edges[i]);
            chordLengthEdgeSet->edges(newEdge);
        }
        else if (edgeSet->objectType() == adsk::fusion::VariableRadiusFilletEdgeSet::classType())
        {
            Ptr<VariableRadiusFilletEdgeSet> variableEdgeSet = edgeSet;

            // Swap the values of the start and end radii.
            Ptr<ModelParameter> startRadiusParam = variableEdgeSet->startRadius();
            if (!startRadiusParam)
                return false;
            Ptr<ModelParameter> endRadiusParam = variableEdgeSet->endRadius();
            if (!endRadiusParam)
                return false;
            double startVal = startRadiusParam->value();
            startRadiusParam->expression(endRadiusParam->expression());
            endRadiusParam->value(startVal);

            // Edit the mid positions.
            Ptr<ParameterList> midPositions = variableEdgeSet->midPositions();
            if (!midPositions)
                return false;
            Ptr<ParameterList> midRadii = variableEdgeSet->midRadii();
            if (!midRadii)
                return false;
            for (int j = 0; j < midPositions->count(); ++j)
            {
                // Change the position and radius of the mid positions.
                double pos = midPositions->item(j)->value();
                pos = pos + ((1 - pos) * 0.25);
                midPositions->item(j)->value(pos);

                midRadii->item(j)->value(midRadii->item(j)->value() * 1.5);
            }

            // Add a new position.
            Ptr<ValueInput> newMidPosition = adsk::core::ValueInput::createByReal(0.25);
            if (!newMidPosition)
                return false;
            Ptr<ValueInput> newMidRadius = adsk::core::ValueInput::createByReal(startRadiusParam->value() * 0.75);
            if (!newMidRadius)
                return false;
            variableEdgeSet->addMidPosition(newMidPosition, newMidRadius);

            // Toggle the continuity type between tangent and curvature.
            if (variableEdgeSet->continuity() == adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType)
            {
                variableEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType);
            }
            else if (
                variableEdgeSet->continuity() == adsk::fusion::SurfaceContinuityTypes::CurvatureSurfaceContinuityType)
            {
                variableEdgeSet->continuity(adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType);
            }

            // Change which edge is filleted.
            Ptr<ObjectCollection> newEdge = adsk::core::ObjectCollection::create();
            if (!newEdge)
                return false;
            newEdge->add(edges[i]);
            variableEdgeSet->edges(newEdge);
        }
    }

    // Move the timeline back.
    timeline->moveToEnd();

    return true;
}


Fillet Feature API Sample

Description

Demonstrates creating fillets using the various types of fillets. Create a new design and add a box that is at least 2 cm on each side. The script creates a constant radius, variable radius and chord length fillets. After creating each one, it deletes it and then creates the next. To see any of the fillets that were deleted, undo to get the fillet back.

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 using the edges of a face of the body.
        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.isRollingBallCorner = True

        constRadiusInput = input1.edgeSetInputs.addConstantRadiusEdgeSet(edgeCollection1, radius1, True)
        constRadiusInput.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType

        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))

        input2 = fillets.createInput()
        input2.isRollingBallCorner = False

        startRadius = adsk.core.ValueInput.createByString("1.0 mm")
        endRadius = adsk.core.ValueInput.createByString("5.0 mm")
        varRadiusEdgeSet = input2.edgeSetInputs.addVariableRadiusEdgeSet(edgeCollection2, startRadius, endRadius, True)
        varRadiusEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType

        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"))

        varRadiusEdgeSet.setMidRadii(radii, positions)

        fillet2 = fillets.add(input2)
        fillet2.deleteMe()

        # Create chord-length fillet on the edges of a face.
        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.isRollingBallCorner = True

        chordLengthEdgeSet = input3.edgeSetInputs.addChordLengthEdgeSet(edgeCollection3, chordLength, True)
        chordLengthEdgeSet.continuity = adsk.fusion.SurfaceContinuityTypes.TangentSurfaceContinuityType
        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/FilletEdgeSetInputs.h>
#include <Fusion/Features/FilletFeatures.h>
#include <Fusion/Features/FilletFeature.h>
#include <Fusion/Features/FilletFeatureInput.h>
#include <Fusion/Features/ConstantRadiusFilletEdgeSetInput.h>
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>
#include <Fusion/Features/VariableRadiusFilletEdgeSetInput.h>
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>
#include <Fusion/Features/ChordLengthFilletEdgeSetInput.h>
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.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->isRollingBallCorner(true);

    Ptr<FilletEdgeSetInputs> edgeSets1 = input1->edgeSetInputs();
    if (!edgeSets1)
        return false;

    Ptr<ConstantRadiusFilletEdgeSetInput> constRadiusInput =
        edgeSets1->addConstantRadiusEdgeSet(edgeCollection1, radius1, true);
    if (!constRadiusInput)
        return false;

    constRadiusInput->continuity(adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType);

    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;

    Ptr<FilletFeatureInput> input2 = fillets->createInput();
    if (!input2)
        return false;

    input2->isRollingBallCorner(false);

    Ptr<FilletEdgeSetInputs> edgeSets2 = input2->edgeSetInputs();
    if (!edgeSets2)
        return false;

    Ptr<VariableRadiusFilletEdgeSetInput> varRadiusEdgeSetInput =
        edgeSets2->addVariableRadiusEdgeSet(edgeCollection2, startRadius, endRadius, false);

    std::vector<Ptr<ValueInput>> radii;
    radii.push_back(ValueInput::createByString("2.0 mm"));
    radii.push_back(ValueInput::createByString("3.0 mm"));
    std::vector<Ptr<ValueInput>> positions;
    positions.push_back(ValueInput::createByReal(0.3));
    positions.push_back(ValueInput::createByReal(0.6));
    varRadiusEdgeSetInput->setMidRadii(radii, positions);

    Ptr<FilletFeature> fillet2 = fillets->add(input2);
    if (!fillet2)
        return false;

    fillet2->deleteMe();

    // Create chord-length fillet
    Ptr<FilletFeatureInput> input3 = fillets->createInput();
    if (!input3)
        return false;

    input3->isRollingBallCorner(true);

    Ptr<FilletEdgeSetInputs> edgeSets3 = input3->edgeSetInputs();
    if (!edgeSets3)
        return false;

    Ptr<ValueInput> chordLength = ValueInput::createByReal(1.0);
    if (!chordLength)
        return false;

    Ptr<ChordLengthFilletEdgeSetInput> chordLengthInputSet =
        edgeSets3->addChordLengthEdgeSet(edgeCollection1, chordLength, true);
    if (!chordLengthInputSet)
        return false;

    chordLengthInputSet->continuity(adsk::fusion::SurfaceContinuityTypes::TangentSurfaceContinuityType);
    Ptr<FilletFeature> fillet3 = fillets->add(input3);
    if (!fillet3)
        return false;

    return true;
}


Hole Feature 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;
}


Loft Feature 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
        loftInput.isClosed = False
        loftInput.isTangentEdgesMerged = True
        loftInput.startLoftEdgeAlignment = adsk.fusion.LoftEdgeAlignments.FreeEdgesLoftEdgeAlignment;
        loftInput.endLoftEdgeAlignment = adsk.fusion.LoftEdgeAlignments.FreeEdgesLoftEdgeAlignment;

        # 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;

    // Set solid, closed, tangent edges merged and alignment options
    loftInput->isSolid(false);
    loftInput->isClosed(false);
    loftInput->isTangentEdgesMerged(true);
    loftInput->startLoftEdgeAlignment(adsk::fusion::LoftEdgeAlignments::FreeEdgesLoftEdgeAlignment);
    loftInput->endLoftEdgeAlignment(adsk::fusion::LoftEdgeAlignments::FreeEdgesLoftEdgeAlignment);

    // Create loft feature
    Ptr<LoftFeature> loftFeature = loftFeats->add(loftInput);
    if (!loftFeature)
        return false;

    return true;
}


Mirror Feature 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;
}


Move Feature 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.createInput2(bodies)
        moveFeatureInput.defineAsFreeMove(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 (!sketchCircles)
        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->createInput2(entities1);
    if (!moveFeatureInput)
        return false;
    moveFeatureInput->defineAsFreeMove(transform);
    Ptr<MoveFeature> moveFeature = moveFeats->add(moveFeatureInput);
    if (!moveFeature)
        return false;

    return true;
}


Offset Feature 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;
}


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('1')
        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;
}


Patch Feature 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;
}


Path Pattern Feature 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;
}


RectangularPattern Feature

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;
}


Remove Feature

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

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;
}


Reverse Normal Feature

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;
}


Rip Feature Sample

Description

Demonstrates creating a new sheet metal rip feature.

Code Samples

  • C++
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/ValueInput.h>
#include <Core/UserInterface/UserInterface.h>

#include <Fusion/Components/Component.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepVertex.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/RipFeature.h>
#include <Fusion/Features/RipFeatureInput.h>
#include <Fusion/Features/RipFeatures.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;

    // 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 rip features
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<RipFeatures> ripFeatures = features->ripFeatures();
    if (!ripFeatures)
        return false;

    Ptr<BRepBodies> bodies = rootComp->bRepBodies();

    Ptr<BRepBody> body = bodies->item(0);

    Ptr<BRepEdges> edges = body->edges();

    Ptr<BRepVertices> vertices = body->vertices();

    // Create a between points rip
    Ptr<ValueInput> gapDistance = ValueInput::createByReal(1.23);

    Ptr<ValueInput> offset1 = ValueInput::createByReal(2.34);

    Ptr<RipFeatureInput> ripFeatureInput = ripFeatures->createRipFeatureInput();

    Ptr<BRepEdge> edge = edges->item(40);

    Ptr<BRepVertex> vertex = vertices->item(9);

    // Create the feature
    Ptr<RipFeature> ripFeature = ripFeatures->add(ripFeatureInput);

    return true;
}


Ruled Surface Feature API Sample

Description

Demonstrates creating a new ruled surface feature.

Code Samples

  • C++
#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/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/Path.h>
#include <Fusion/Features/RuledSurfaceFeatures.h>
#include <Fusion/Features/RuledSurfaceFeatureInput.h>
#include <Fusion/Features/RuledSurfaceFeature.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/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;

    // Get ruled surfaces features
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;
    Ptr<RuledSurfaceFeatures> ruledSurfaces = feats->ruledSurfaceFeatures();
    if (!ruledSurfaces)
        return false;

    // Create sketch line 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> distanceExtrusion = ValueInput::createByReal(1.0);
    extrudeInput->setDistanceExtent(false, distanceExtrusion);

    // 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> objCol = ObjectCollection::create();
    objCol->add(edge);
    Ptr<Path> profile = Path::create(objCol, ChainedCurveOptions::connectedChainedCurves);

    // Create a ruled surface input.
    Ptr<ValueInput> distance = ValueInput::createByReal(1.0);
    Ptr<ValueInput> angle = ValueInput::createByReal(0.0);
    extrudeInput->setDistanceExtent(false, distance);
    Ptr<RuledSurfaceFeatureInput> ruledSurfaceInput =
        ruledSurfaces->createInput(profile, distance, angle, NormalRuledSurfaceType);
    if (!ruledSurfaceInput)
        return false;

    // Create the ruled surface
    Ptr<RuledSurfaceFeature> ruledSurface = ruledSurfaces->add(ruledSurfaceInput);
    if (!ruledSurface)
        return false;
    bodies = ruledSurface->bodies();
    if (!bodies)
        return false;
    body = bodies->item(0);
    if (!body)
        return false;
    body->name("RuledSurfaceFromEdge");

    return true;
}


Scale Feature 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;
}


Shell Feature 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
        shellType = adsk.fusion.ShellTypes.SharpOffsetShellType;
        shellFeatureInput.shellType = shellType;
        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);
    adsk::fusion::ShellType shellType = ShellType::SharpOffset;
    shellFeatureInput->shellType(shellType);
    Ptr<ShellFeature> shellFeature = shellFeats->add(shellFeatureInput);
    if (!shellFeature)
        return false;

    return true;
}


Silhouette Split Feature 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;
}


Simple Extrusion 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;
}


Simple Revolve Feature 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

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;
}


Split Face Feature 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)
        point3 = adsk.core.Point3D.create(-5, 3.5, 0)
        sketchCircles = toolSketch.sketchCurves.sketchCircles
        circle = sketchCircles.addByCenterRadius(point3, 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;
}


Stitch Feature 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;
}


Sweep Feature 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;
}


Sweep with guide rail Feature API Sample

Description

Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Code Samples

  • C++
  • Python
#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;
}
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()))


Thicken Feature 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;
}


Thread Feature 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;
}


Trim Feature 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;
}


Two Rail Sweep Feature 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;
}


Unstitch Feature 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;
}


Untrim Feature API Sample

Description

Demonstrates creating a new untrim 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)
        sketchCircle1 = sketchCircles.addByCenterRadius(centerPoint, 3.0)
        sketchCircle2 = 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
        extrudeFeatures = rootComp.features.extrudeFeatures
        extrudeDistance = adsk.core.ValueInput.createByString("1 cm")
        extrudeFeature = extrudeFeatures.addSimple(outerProfile, extrudeDistance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Get start and end faces of the extrusion
        extrudeStartFaces = extrudeFeature.startFaces
        extrudeEndFaces = extrudeFeature.endFaces
        startFaceToken = extrudeStartFaces.item(0).entityToken
        endFaceToken = extrudeEndFaces.item(0).entityToken

        # Create unstitch feature (so there are separate surface bodies)
        unstitchFeatures = rootComp.features.unstitchFeatures
        body = extrudeFeature.bodies.item(0)
        entities = adsk.core.ObjectCollection.create()
        entities.add(body)
        unstitchFeature = unstitchFeatures.add(entities)

        # Create untrim feature on start face (remove external loop and extend face)
        facesToUntrim = [];
        facesToUntrim.append(design.findEntityByToken(startFaceToken)[0])
        untrimFeatures = rootComp.features.untrimFeatures
        extensionDistance = adsk.core.ValueInput.createByReal(1.0)
        untrimFeatureInput = untrimFeatures.createInputFromFaces(facesToUntrim, adsk.fusion.UntrimLoopTypes.ExternalLoopsUntrimType, extensionDistance)
        untrimFeature = untrimFeatures.add(untrimFeatureInput)

        # Create untrim feature on the end face (remove internal loop from face)
        brepLoops = design.findEntityByToken(endFaceToken)[0].loops
        innerLoop = brepLoops.item(0)
        if innerLoop.isOuter:
            innerLoop = brepLoops.item(1)
        loopsToRemove = []
        loopsToRemove.append(innerLoop)
        untrimFeatureInput = untrimFeatures.createInputFromLoops(loopsToRemove);
        untrimFeature = untrimFeatures.add(untrimFeatureInput)

    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/BRepEdge.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepLoop.h>
#include <Fusion/BRep/BRepLoops.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/UnstitchFeatures.h>
#include <Fusion/Features/UnstitchFeature.h>
#include <Fusion/Features/UntrimFeature.h>
#include <Fusion/Features/UntrimFeatures.h>
#include <Fusion/Features/UntrimFeatureInput.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> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->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 the start face of the extrusion
    Ptr<BRepFaces> startFaces = extrudeFeature->startFaces();
    if (startFaces->count() != 1)
        return false;

    // Get the end face of the extrusion
    Ptr<BRepFaces> endFaces = extrudeFeature->endFaces();
    if (endFaces->count() != 1)
        return false;

    // Get the first body
    Ptr<BRepBodies> bodies = rootComp->bRepBodies();
    if (!bodies)
        return false;
    if (bodies->count() != 1)
        return false;
    Ptr<BRepBody> body1 = bodies->item(0);
    if (!body1)
        return false;

    // Create unstitch feature (so there are separate surface bodies).
    Ptr<UnstitchFeatures> unstitchFeatures = features->unstitchFeatures();
    if (!unstitchFeatures)
        return false;
    Ptr<ObjectCollection> unstitchBodies = adsk::core::ObjectCollection::create();
    if (!unstitchBodies)
        return false;
    unstitchBodies->add(body1);
    Ptr<UnstitchFeature> unstitch = unstitchFeatures->add(unstitchBodies);

    // Create untrim feature on start face (remove external loop and extend face)
    std::vector<Ptr<BRepFace>> facesToUntrim;
    Ptr<BRepFace> face = startFaces->item(0);
    if (!face)
        return false;
    facesToUntrim.push_back(face);
    Ptr<BRepLoops> loops = face->loops();
    if (loops->count() != 2)
        return false;

    Ptr<ValueInput> extensionDistance = ValueInput::createByReal(1.0);

    Ptr<UntrimFeatures> untrimFeatures = features->untrimFeatures();
    Ptr<UntrimFeatureInput> untrimFeatureInput =
        untrimFeatures->createInputFromFaces(facesToUntrim, ExternalLoopsUntrimType, extensionDistance);
    if (!untrimFeatureInput)
        return false;
    Ptr<UntrimFeature> untrimFeature = untrimFeatures->add(untrimFeatureInput);
    if (!untrimFeature)
        return false;

    // Create untrim feature on the end face (remove internal loop from face)
    std::vector<Ptr<BRepLoop>> loopsToRemove;
    face = endFaces->item(0);
    if (!face)
        return false;
    loops = face->loops();
    if (loops->count() != 2)
        return false;
    // Add inner loop
    Ptr<BRepLoop> loop;
    if (loops->item(0)->isOuter())
    {
        loop = loops->item(1);
    }
    else
    {
        loop = loops->item(0);
    }
    loopsToRemove.push_back(loop);

    untrimFeatureInput = untrimFeatures->createInputFromLoops(loopsToRemove);
    if (!untrimFeatureInput)
        return false;
    untrimFeature = untrimFeatures->add(untrimFeatureInput);
    if (!untrimFeature)
        return false;

    return true;
}


BRep Body definition Sample

Description

Demonstrates creating BRep bodies by BRepBodyDefinition.

Code Samples

  • Python
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

def validate(discription, result, baseline):
    if type(result) is str:
        if result != baseline:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + result + '\n'
                           + 'Baseline is ' + baseline + '\n'
                           )
    elif type(result) is float:
        if abs(result - baseline) > 10e-6:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + str(result) + '\n'
                           + 'Baseline is ' + str(baseline) + '\n'
                           )
    elif type(result) is int:
        if abs(result - baseline) > 0:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + str(result) + '\n'
                           + 'Baseline is ' + str(baseline) + '\n'
                           )
    elif type(result) is bool:
        if result != baseline:
            raise Exception(discription + ' is different!\n'
                           + 'Result is ' + str(result) + '\n'
                           + 'Baseline is ' + str(baseline) + '\n'
                           )
    else:
        raise Exception('Validaion is not support the data type ' + discription)
#endTest

def CreateTop1EdgeDefinitionByCurve(brepBodyDef):
    edgeDef = adsk.fusion.BRepEdgeDefinition.cast(None)
    # Create vertex definition
    startVertexDef = brepBodyDef.createVertexDefinition(adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.5488831005318957))
    endVertexDef = brepBodyDef.createVertexDefinition(adsk.core.Point3D.create(-3.519568866597467, 4.0, -2.282227138902387))

    center = adsk.core.Point3D.create(-2.7379066676103037, 4.0, -0.3666720191852457)
    normal =adsk.core.Vector3D.create(0, 1, 0)
    curve = adsk.core.Circle3D.createByCenter(center, normal, 2.0689)
    # Create edge definition by curve
    edgeDef = brepBodyDef.createEdgeDefinitionByCurve(startVertexDef, endVertexDef, curve)

    return edgeDef

def CreateBottom1EdgeDefinitionByCurve(brepBodyDef):
    edgeDef = adsk.fusion.BRepEdgeDefinition.cast(None)
    # Create vertex definition
    startVertexDef = brepBodyDef.createVertexDefinition(adsk.core.Point3D.create(-3.519568866597467, 0.0, -2.2822271389023863))
    endVertexDef = brepBodyDef.createVertexDefinition(adsk.core.Point3D.create(-3.519568866597467, 0.0, 1.5488831005318966))

    center = adsk.core.Point3D.create(-2.7379066676103037, 0.0, -0.36667201918524484)
    normal =adsk.core.Vector3D.create(0, -1, 0)
    curve = adsk.core.Circle3D.createByCenter(center, normal, 2.0689)
    # Create edge definition by curve
    edgeDef = brepBodyDef.createEdgeDefinitionByCurve(startVertexDef, endVertexDef, curve)

    return edgeDef

def CreateLinearEdgeDefinitionByCurve(brepBodyDef, startPoint, endPoint):
    edgeDef = adsk.fusion.BRepEdgeDefinition.cast(None)
    # Create vertex definition
    startVertexDef = brepBodyDef.createVertexDefinition(startPoint)
    endVertexDef = brepBodyDef.createVertexDefinition(endPoint)
    curve = adsk.core.Line3D.create(startPoint, endPoint)
    # Create edge definition by curve
    edgeDef = brepBodyDef.createEdgeDefinitionByCurve(startVertexDef, endVertexDef, curve)

    return edgeDef

def GetNurbsSurfaceMiddle1():
    surface = adsk.core.NurbsSurface.cast(None)

    degreeU = 1
    degreeV = 2
    controlPointCountU = 2
    controlPointcountV = 7
    controlPoints = []
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 0.0, 1.5488831005318966))
    controlPoints.append(adsk.core.Point3D.create(-2.0550441756714655, 0.0, 2.1464976398353937))
    controlPoints.append(adsk.core.Point3D.create(-1.0943307562984703, 0.0, 0.8899128103250742))
    controlPoints.append(adsk.core.Point3D.create(-0.13361733692547517, 0.0, -0.36667201918524484))
    controlPoints.append(adsk.core.Point3D.create(-1.0943307562984705, 0.0, -1.6232568486955643))
    controlPoints.append(adsk.core.Point3D.create(-2.0550441756714664, 0.0, -2.8798416782058833))
    controlPoints.append(adsk.core.Point3D.create(-3.5195688665974676, 0.0, -2.2822271389023863))
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.5488831005318957))
    controlPoints.append(adsk.core.Point3D.create(-2.0550441756714655, 4.0, 2.1464976398353928))
    controlPoints.append(adsk.core.Point3D.create(-1.0943307562984703, 4.0, 0.8899128103250733))
    controlPoints.append(adsk.core.Point3D.create(-0.13361733692547517, 4.0, -0.3666720191852457))
    controlPoints.append(adsk.core.Point3D.create(-1.0943307562984705, 4.0, -1.6232568486955652))
    controlPoints.append(adsk.core.Point3D.create(-2.0550441756714664, 4.0, -2.879841678205884))
    controlPoints.append(adsk.core.Point3D.create(-3.5195688665974676, 4.0, -2.282227138902387))
    knotsU = (-0.9666972787471603, -0.9666972787471603, 0.9666972787471603, 0.9666972787471603)
    knotsV = (-1.9582319586428225, -1.9582319586428225, -1.9582319586428225, -0.6527439862142743, -0.6527439862142743, 0.6527439862142739, 0.6527439862142739, 1.9582319586428225, 1.9582319586428225, 1.9582319586428225)
    weights = (1.0, 0.7944201804397665, 1.0, 0.7944201804397665, 1.0, 0.7944201804397665, 1.0, 1.0, 0.7944201804397665, 1.0, 0.7944201804397665, 1.0, 0.7944201804397665, 1.0)
    propertyU = 9
    propertyV = 9
    surface = adsk.core.NurbsSurface.create(degreeU, degreeV, controlPointCountU, controlPointcountV, controlPoints, knotsU, knotsV, weights, propertyU, propertyV)

    return surface

def GetNurbsSurfaceMiddle2():
    surface = adsk.core.NurbsSurface.cast(None)

    degreeU = 1
    degreeV = 1
    controlPointCountU = 2
    controlPointcountV = 2
    controlPoints = []
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 4.0, -2.282227138902387))
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 0, -2.2822271389023863))
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.5488831005318957))
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 0, 1.5488831005318966))
    knotsU = (0, 0, 3.831110239434283, 3.831110239434283)
    knotsV = (0, 0, 4.0, 4.0)
    weights = ()
    propertyU = 1
    propertyV = 1
    surface = adsk.core.NurbsSurface.create(degreeU, degreeV, controlPointCountU, controlPointcountV, controlPoints, knotsU, knotsV, weights, propertyU, propertyV)

    return surface

def GetNurbsSurfaceTop():
    surface = adsk.core.NurbsSurface.cast(None)

    degreeU = 1
    degreeV = 1
    controlPointCountU = 2
    controlPointcountV = 2
    controlPoints = []
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.7441010118322937))
    controlPoints.append(adsk.core.Point3D.create(-3.519568866597467, 4.0, -2.4732150714952117))
    controlPoints.append(adsk.core.Point3D.create(-0.6323626099308138, 4.0, 1.7441010118322937))
    controlPoints.append(adsk.core.Point3D.create(-0.6323626099308138, 4.0, -2.4732150714952117))
    knotsU = (-0.7816621989871636, -0.7816621989871636, 2.1055440576794897, 2.1055440576794897)
    knotsV = (-2.110773031017539, -2.110773031017539, 2.1065430523099655, 2.1065430523099655)
    weights = ()
    propertyU = 1
    propertyV = 1
    surface = adsk.core.NurbsSurface.create(degreeU, degreeV, controlPointCountU, controlPointcountV, controlPoints, knotsU, knotsV, weights, propertyU, propertyV)

    return surface

def GetNurbsSurfaceBottom():
    surface = adsk.core.NurbsSurface.cast(None)

    degreeU = 1
    degreeV = 1
    controlPointCountU = 2
    controlPointcountV = 2
    controlPoints = []
    controlPoints.append(adsk.core.Point3D.create(-0.6323626099308726, 0.0, 1.7398710331248253))
    controlPoints.append(adsk.core.Point3D.create(-0.6323626099308726, 0.0, -2.4774450502028094))
    controlPoints.append(adsk.core.Point3D.create(-3.5195688665974676, 0.0, 1.739871033124825))
    controlPoints.append(adsk.core.Point3D.create(-3.5195688665974676, 0.0, -2.47744505020281))
    knotsU = (-2.105544057679431, -2.105544057679431, 0.7816621989871635, 0.7816621989871635)
    knotsV = (-2.10654305231007, -2.10654305231007, 2.110773031017565, 2.110773031017565)
    weights = ()
    propertyU = 1
    propertyV = 1
    surface = adsk.core.NurbsSurface.create(degreeU, degreeV, controlPointCountU, controlPointcountV, controlPoints, knotsU, knotsV, weights, propertyU, propertyV)

    return surface

def CreateFaceForBodyDefination(brepBodyDef, surface, edgeDefs):
    faceDef = adsk.fusion.BRepFaceDefinition.cast(None)

    # Create lump definition
    lumpDefs = brepBodyDef.lumpDefinitions
    lumpDef = lumpDefs.add()
    # Create shell definition
    shellDefs = lumpDef.shellDefinitions
    shellDef = shellDefs.add()
    # Create face definition
    faceDefs = shellDef.faceDefinitions
    faceDef = faceDefs.add(surface, True)

    # Create loop definition
    loopDefs = faceDef.loopDefinitions
    loopdef = loopDefs.add()

    # Create coEdge definitions
    brepCoEdgeDefs = loopdef.bRepCoEdgeDefinitions
    for edgeDef in edgeDefs:
        brepCoEdgeDefs.add(edgeDef, True)

    return faceDef

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)

        # Create a base feature
        rootComp = design.rootComponent

        # Create brep body definition
        brepBodyDef = adsk.fusion.BRepBodyDefinition.create()

        # Create edge definition
        top1EdgeDef = CreateTop1EdgeDefinitionByCurve(brepBodyDef)
        bottom1EdgeDef = CreateBottom1EdgeDefinitionByCurve(brepBodyDef)

        startPoint = adsk.core.Point3D.create(-3.519568866597467, 4.0, -2.282227138902387)
        endPoint = adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.5488831005318957)
        top2EdgeDef = CreateLinearEdgeDefinitionByCurve(brepBodyDef, startPoint, endPoint)

        startPoint = adsk.core.Point3D.create(-3.519568866597467, 0.0, 1.5488831005318966)
        endPoint = adsk.core.Point3D.create(-3.519568866597467, 0.0, -2.2822271389023863)
        bottom2EdgeDef = CreateLinearEdgeDefinitionByCurve(brepBodyDef, startPoint, endPoint)

        startPoint = adsk.core.Point3D.create(-3.519568866597467, 0.0, -2.2822271389023863)
        endPoint = adsk.core.Point3D.create(-3.519568866597467, 4.0, -2.282227138902387)
        middle1EdgeDef = CreateLinearEdgeDefinitionByCurve(brepBodyDef, startPoint, endPoint)

        startPoint = adsk.core.Point3D.create(-3.519568866597467, 4.0, 1.5488831005318957)
        endPoint = adsk.core.Point3D.create(-3.519568866597467, 0.0, 1.5488831005318966)
        middle2EdgeDef = CreateLinearEdgeDefinitionByCurve(brepBodyDef, startPoint, endPoint)

        # Create the top face for body definition
        topSurface = GetNurbsSurfaceTop()
        topEdgeDefs = []
        topEdgeDefs.append(top1EdgeDef)
        topEdgeDefs.append(top2EdgeDef)
        CreateFaceForBodyDefination(brepBodyDef, topSurface, topEdgeDefs)
        # Create one middle face for body definition
        middel1Surface = GetNurbsSurfaceMiddle1()
        middel1EdgeDefs = []
        middel1EdgeDefs.append(top1EdgeDef)
        middel1EdgeDefs.append(middle1EdgeDef)
        middel1EdgeDefs.append(bottom1EdgeDef)
        middel1EdgeDefs.append(middle2EdgeDef)
        CreateFaceForBodyDefination(brepBodyDef, middel1Surface, middel1EdgeDefs)
        # Create another middle face for body defination
        middel2Surface = GetNurbsSurfaceMiddle2()
        middel2EdgeDefs = []
        middel2EdgeDefs.append(top2EdgeDef)
        middel2EdgeDefs.append(middle1EdgeDef)
        middel2EdgeDefs.append(bottom2EdgeDef)
        middel2EdgeDefs.append(middle2EdgeDef)
        CreateFaceForBodyDefination(brepBodyDef, middel2Surface, middel2EdgeDefs)
        # Create the bottom face for body definition
        bottomSurface = GetNurbsSurfaceBottom()
        bottomEdgeDefs = []
        bottomEdgeDefs.append(bottom1EdgeDef)
        bottomEdgeDefs.append(bottom2EdgeDef)
        CreateFaceForBodyDefination(brepBodyDef, bottomSurface, bottomEdgeDefs)

        # Create brep body
        body = brepBodyDef.createBody()
        outcomeInfo = brepBodyDef.outcomeInfo
        print('The outcome info is :\n{}'.format(outcomeInfo))

        # Create wire brep body definition
        wireBrepBodyDef = adsk.fusion.BRepBodyDefinition.create()
        # Create lump definition
        lumpDefs = wireBrepBodyDef.lumpDefinitions
        lumpDef = lumpDefs.add()
        # Create shell definition
        shellDefs = lumpDef.shellDefinitions
        shellDef = shellDefs.add()
        # Create wire edge definitions
        wireDef = shellDef.wireDefinition
        wireEdgeDefs = wireDef.wireEdgeDefinitions

        # Add wire edge definition
        startPoint = adsk.core.Point3D.create(2.499830308814756, 4.786795576310287, 0.0)
        endPoint = adsk.core.Point3D.create(6.000163479757444, 2.0712231354540322, 0.0)
        line = adsk.core.Line3D.create(startPoint, endPoint)

        center = adsk.core.Point3D.create(3.3848741924869366, 2.313878842520367, 0.0)
        normal =adsk.core.Vector3D.create(0, 0, 1.0)
        circle = adsk.core.Circle3D.createByCenter(center, normal, 2.626)

        startVertexDef = wireBrepBodyDef.createVertexDefinition(startPoint)
        endVertexDef = wireBrepBodyDef.createVertexDefinition(endPoint)
        lineWireEdgeDef = wireEdgeDefs.add(startVertexDef, endVertexDef, line)
        circleWireEdgeDef = wireEdgeDefs.add(startVertexDef, endVertexDef, circle)

        # Set wire edge associative id
        lineWireEdgeDef.associativeID = 10
        print('The linear wire edge defination associative id is: {}'.format(lineWireEdgeDef.associativeID))

        # Create wire brep body
        wireBrepBodyDef.doFullHealing = False
        wireBrepBody = wireBrepBodyDef.createBody()
        print('The wire brep body defination do full healing is: {}'.format(wireBrepBodyDef.doFullHealing))

        # Show the temporary brep bodies
        group = rootComp.customGraphicsGroups.add()
        group.addBRepBody(body)

        for edge in wireBrepBody.edges:
            group.addCurve(edge.geometry)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


BRep Body 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;
}


BrepWire 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();
    // ON_ERROR_RETURN(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;
}


Component 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)

        # Create a second occurrence
        transform2 = transform = adsk.core.Matrix3D.create()
        translation = adsk.core.Vector3D.create(10, 0, 0)
        transform2.translation = translation
        occ2 = allOccs.addExistingComponent(subComp1,transform2)

        # Ground to parent
        occ1.isGroundToParent = False
        occ2.isGroundToParent = True

    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 <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();

    // Create a transform for second sub component
    Ptr<Vector3D> translation = adsk::core::Vector3D::create(10, 0, 0);
    if (!translation)
        return false;

    Ptr<Matrix3D> transform2 = adsk::core::Matrix3D::create();
    if (!transform2)
        return false;

    transform2->translation(translation);

    // Create the second sub component
    Ptr<Occurrence> subOcc2 = occs->addExistingComponent(subComp1, transform2);
    if (!subOcc2)
        return false;

    // Ground to parent
    subOcc1->isGroundToParent(false);
    subOcc2->isGroundToParent(true);

    return true;
}


Construction Axis 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;
}


Construction Plane 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 the profile again since the sketch has been edit.
        prof = sketch.profiles.item(0)

        # 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);

    prof = profs->item(0);

    // 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;
}


Construction Point 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;
}


Interference 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;
}


Mesh Body 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 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 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 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 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;
}

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
}


TemporaryBRepManager 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;
}

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
}


Volumetric Custom Feature API Sample

Description

Demonstrates how to create a Volumetric Custom Feature using the API for graph creation.

To run the sample script, have a document open in Fusion’s DESIGN workspace. This script will create a component with a box by sketching then extruding that sketch. It will then use that box as a boundary body and create a Volumetric Custom Feature.

The script will the create a gyroid lattice using the Volumetric Model API with the appropriate Graphs, Nodes and Connections for a minimal example. Finally, the script will convert that Volumetric Model to Mesh using the API and the VolumetricModelToMeshFeature.

Code Samples

  • Python
# Description: This script is used to create a volumetric model in the API

import os, adsk.core, adsk.fusion, adsk.volume,  traceback, time

def CreateVolumetricModel(component:adsk.fusion.Component,body):
    """Creation of the volumetric model"""
    features = component.features

    #Creating volumetric model input with the body
    VolumetricCustomFeatures = features.volumetricCustomFeatures
    volumetricCustomFeatureInput = VolumetricCustomFeatures.createInput(body)
    volumetricCustomFeature = VolumetricCustomFeatures.add(volumetricCustomFeatureInput)

    # build a simple volume - returns type adsk.core.Base
    volumetricModel = volumetricCustomFeature.volumetricModel
    # cast to a adsk.volume.VolumetricModel
    volumetricModel = adsk.volume.VolumetricModel.cast(volumetricModel)

    return volumetricModel

def VolumetricGraph(volumetricModel):
    """Assigning graph and modifying it (adding volume/density)"""
    #AS LONG AS THE VOLUMETRIC MODEL IS NOT NULL, WE HAVE SUCCESSFULLY CREATED A VOLUMETRIC MODEL
    #Call the graph and create a volume using it. Add a simple sphere for density as offset.
    primaryGraph = volumetricModel.getGraph(adsk.volume.GraphTypes.PrimaryGraphType)
    cellGraph = volumetricModel.getGraph(adsk.volume.GraphTypes.CellGraphType)

    # All the channels are created by default as well as the Boundary sdf

    # Create a density node and connect it to the density channel (Primary Graph)
    node1 = primaryGraph.addNode("ConstantDensity", "ConstantScalar")
    node1.properties.itemByName("value").value = 0.5
    densityChannel = primaryGraph.getOutputNode(adsk.volume.GraphOutputNodeTypes.LatticeDensityOutputNodeType)
    assert primaryGraph.connect(node1, 0, densityChannel, 0), "Failed to connect the node to the density channel"

    # Create a coordinate node and connect it to the coordinate channel (Primary Graph)
    node2 = primaryGraph.addNode("NoTransform", "TransformCoords")
    node2.properties.itemByName("scaling").value = adsk.core.Vector3D.create(1, 2, 3) # Scale the lattice asymmetrically
    coordinateOutput = primaryGraph.getOutputNode(adsk.volume.GraphOutputNodeTypes.LatticeCoordinatesOutputNodeType)
    assert primaryGraph.connect(node2, 0, coordinateOutput, 0), "Failed to connect the node to the coordinate channel"

    # Get the density output node from the cell graph and connect the density node to it
    node3 = cellGraph.addNode("gyroid", "FunctionVectorToScalar")
    node3.properties.itemByName("function").value = "(sin(x*pi2)*cos(y*pi2)+sin(y*pi2)*cos(z*pi2)+sin(z*pi2)*cos(x*pi2))*0.333333333+0.5"
    cellDensityChannel = cellGraph.getOutputNode(adsk.volume.GraphOutputNodeTypes.CellLatticeShapeOutputNodeType)
    assert cellGraph.connect(node3, 0, cellDensityChannel, 0), "Failed to connect the node to the density channel"

def run(context):
    ui = None
    try:
    ### Lines from 56 to 84 preparing a document to work with. Creating a body and volumetric lattice.

        # ALL THIS CODE IS TO GET A BODY AND COMPONENT TO WORK WITH
        app = adsk.core.Application.get()
        ui  = app.userInterface
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        rootComp = design.rootComponent

        # new component
        newCompOcc = rootComp.occurrences.addNewComponent(adsk.core.Matrix3D.create())
        newComp = newCompOcc.component

        # create a new sketch
        sketches = newComp.sketches
        sketch = sketches.add(newComp.xYConstructionPlane)
        sketch.sketchCurves.sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(10, 10, 0))
        sketch.isComputeDeferred = False

        extrudeFeatures = newComp.features.extrudeFeatures
        extrudeInput = extrudeFeatures.createInput(sketch.profiles.item(0), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        distanceExtent = adsk.fusion.DistanceExtentDefinition.create(adsk.core.ValueInput.createByString('10 cm'))
        direction = adsk.fusion.ExtentDirections.PositiveExtentDirection
        extrudeInput.setOneSideExtent(distanceExtent, direction)
        extrude = extrudeFeatures.add(extrudeInput)

        body = extrude.bodies.item(0)
        body = body.createForAssemblyContext(newCompOcc)

    ### Creating a volumetric model
        comp = newCompOcc.component
        features = comp.features

        VolumetricCustomFeatures = features.volumetricCustomFeatures
        volumetricCustomFeatureInput = VolumetricCustomFeatures.createInput(body)
        volumetricCustomFeature = VolumetricCustomFeatures.add(volumetricCustomFeatureInput)

        # build a simple volume - returns type adsk.core.Base
        volumetricModel = volumetricCustomFeature.volumetricModel
        # cast to a adsk.volume.VolumetricModel for autocompletion
        volumetricModel = adsk.volume.VolumetricModel.cast(volumetricModel)

        VolumetricGraph(volumetricModel)

    ### Convert to volumetric feature to mesh.

        # Now we should have valid volumetric models We need to create a Volumetric Model To Mesh
        volumetricModelToMeshFeatures = features.volumetricModelToMeshFeatures
        volumetricModelToMeshFeatureInput = volumetricModelToMeshFeatures.createInput(volumetricModel)

        # Setting all the properties for the volumetric model to mesh feature, though defaults are fine.
        volumetricModelToMeshFeatureInput.isComputeSuspended  = True
        volumetricModelToMeshFeatureInput.isSmallShellsRemoved = True
        volumetricModelToMeshFeatureInput.isVolumetricModelRemoved = True
        volumetricModelToMeshFeatureInput.smallShellThreshold = adsk.core.ValueInput.createByString("0.05")
        volumetricModelToMeshFeatureInput.meshingApproach = adsk.fusion.VolumetricMeshingApproachTypes.VolumetricMeshingAdvancedType
        volumetricModelToMeshFeatureInput.refinementType  = adsk.fusion.VolumetricMeshRefinementTypes.VolumetricMeshRefinementMediumType

        # Create the volumetric model to mesh feature
        volumetricModelToMeshFeatures.add(volumetricModelToMeshFeatureInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Command Inputs 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

  • C++
  • Python
#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;

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;
}

// Populate 'slider_configuration' group with as many sliders as set in 'slider_controller'.
// Delete previous ones and create new sliders.
static void updateSliders(Ptr<CommandInputs> sliderInputs)
{
    Ptr<IntegerSpinnerCommandInput> spinner = sliderInputs->itemById("slider_controller");
    if (!spinner)
    {
        return;
    }
    int value = spinner->value();
    // Check ranges
    if (value > spinner->maximumValue() || value < spinner->minimumValue())
    {
        return;
    }

    // Delete all sliders we have
    std::vector<Ptr<CommandInput>> toRemove;
    for (size_t i = 0; i < sliderInputs->count(); ++i)
    {
        Ptr<CommandInput> input = sliderInputs->item(i);
        if (input->objectType() == FloatSliderCommandInput::classType())
        {
            toRemove.push_back(input);
        }
    }
    for (auto input : toRemove)
    {
        input->deleteMe();
    }

    // Create new ones with range depending on total number
    for (int i = 1; i <= value; ++i)
    {
        std::string id = std::to_string(i);
        sliderInputs->addFloatSliderCommandInput("slider_configuration_" + id, "slider_" + id, "cm", 0, 10.0 * value);
    }
}

// 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;

        // onInputChange for slider controller
        if (cmdInput->id() == "slider_controller")
        {
            Ptr<GroupCommandInput> sliderGroup = cmdInput->parentCommandInput();
            if (!sliderGroup)
            {
                return;
            }
            Ptr<CommandInputs> sliderInputs = sliderGroup->children();
            if (!sliderInputs)
            {
                return;
            }
            updateSliders(sliderInputs);
        }
        else
        {
            // Table handling
            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:fusion.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);

                // Create tab inputs 3
                Ptr<TabCommandInput> tabCmdInput3 = inputs->addTabCommandInput("tab_3", "Tab 3");
                if (!tabCmdInput3)
                    return;
                Ptr<CommandInputs> tab3ChildInputs = tabCmdInput3->children();
                if (!tab3ChildInputs)
                    return;
                // Create group
                Ptr<GroupCommandInput> sliderGroup =
                    tab3ChildInputs->addGroupCommandInput("slider_configuration", "Configuration");
                if (!sliderGroup)
                {
                    return;
                }
                Ptr<CommandInputs> sliderInputs = sliderGroup->children();
                // Create integer spinner input
                sliderInputs->addIntegerSpinnerCommandInput("slider_controller", "Num sliders", 1, 5, 1, 1);
                if (!sliderInputs)
                {
                    return;
                }
                updateSliders(sliderInputs);
            }
        }
    }

  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;
}
#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):
    global _rowNumber
    # 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.
    _rowNumber = _rowNumber + 1

def updateSliders(sliderInputs):
    """
    Populate 'slider_configuration' group with as many sliders as set in 'slider_controller'.
    Delete previous ones and create new sliders.
    """
    spinner = sliderInputs.itemById("slider_controller")
    value = spinner.value
    # check ranges
    if value > spinner.maximumValue or value < spinner.minimumValue:
        return

    # delete all sliders we have
    toRemove = []
    for i in range(sliderInputs.count):
        input = sliderInputs.item(i)
        if input.objectType == adsk.core.FloatSliderCommandInput.classType():
            toRemove.append(input)

    for input in toRemove:
        input.deleteMe()

    # create new ones with range depending on total number
    for i in range(1, value+1):
        id = str(i)
        sliderInputs.addFloatSliderCommandInput("slider_configuration_" + id, "slider_" + id, "cm", 0, 10.0*value)

# 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
            # onInputChange for slider controller
            if cmdInput.id == "slider_controller":
                sliderGroup = adsk.core.GroupCommandInput.cast(cmdInput.parentCommandInput)
                sliderInputs = sliderGroup.children
                updateSliders(sliderInputs)
            else:
                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:fusion.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

            # Create tab input 3
            tabCmdInput3 = inputs.addTabCommandInput('tab_3', 'Tab 3')
            tab3ChildInputs = tabCmdInput3.children
            # Create group
            sliderGroup = tab3ChildInputs.addGroupCommandInput("slider_configuration", "Configuration")
            sliderInputs = sliderGroup.children
            # Create integer spinner input
            sliderInputs.addIntegerSpinnerCommandInput("slider_controller", "Num sliders", 1, 5, 1, 1)
            updateSliders(sliderInputs)
        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()))


File Dialog Sample

Description

Demonstrating how to pop up a file dialog and a folder dialog.

Code Samples

  • C++
  • Python
#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 += "\nFiles to Open:";
        std::vector<std::string> fileNames = fileDlg->filenames();
        for (std::string fileName : fileNames)
        {
            msg += "\n\t" + fileName;
        }
    }
    else
    {
        return false;
    }

    // Show file save dialog
    fileDlg->title("Fusion Save File Dialog");
    dlgResult = fileDlg->showSave();
    if (dlgResult == DialogOK)
    {
        std::string fileName = fileDlg->filename();
        msg += "\nFile to Save: " + fileName;
    }
    else
    {
        return false;
    }

    // Set styles of file dialog.
    Ptr<FolderDialog> folderDlg = ui->createFolderDialog();
    if (!folderDlg)
        return false;
    folderDlg->title("Fusion Choose Folder Dialog");

    // Show folder dialog
    dlgResult = folderDlg->showDialog();
    if (dlgResult == DialogOK)
    {
        std::string folderName = folderDlg->folder();
        msg += "\nSelected Folder: " + folderName;
    }
    else
    {
        return false;
    }

    if (!msg.empty())
        ui->messageBox(msg);
    return true;
}
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 Open File Dialog'
        fileDlg.filter = '*.*'

        # Show file open dialog
        dlgResult = fileDlg.showOpen()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nFiles to Open:'
            for filename in fileDlg.filenames:
                msg += '\n\t{}'.format(filename)
        else:
            return

        # Show file save dialog
        fileDlg.title = 'Fusion Save File Dialog'
        dlgResult = fileDlg.showSave()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nFile to Save: {}'.format(fileDlg.filename)
        else:
            return

        # Set styles of file dialog.
        folderDlg = ui.createFolderDialog()
        folderDlg.title = 'Fusion Choose Folder Dialog'

        # Show folder dialog
        dlgResult = folderDlg.showDialog()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nSelected Folder: {}'.format(folderDlg.folder)
        else:
            return

        ui.messageBox(msg)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Marking Menu API Sample

Description

Demonstrates how to customize marking menu and context menu. This sample is an add-in. To use it, create a new add-in using the "Scrips and Add-Ins" command. Use any name you would like for the add-in. In the folder where the add-in was created edit the add-in name.py file and replace it's entire contents with the sample code below. You can also delete all the other files that were created for the add-in except for add-in name.manifiest. Start the add-in from the "Scripts and Add-Ins" dialog. Now, with the add-in running, whenever you right-click in the Fusion window, you'll get an entirely customized context menu. The default marking menu has been modified by the add-in by removing the existing commands and adding some custom commands.

Code Samples

  • C++
  • Python
#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.");
        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");
        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.");
        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.");
        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;
}
#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.')
            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')
            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.')
            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.')
            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()))


Palette 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 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 file.

When you load the add-in, you'll see two new commands under the ADD-INS panel of the TOOLS tab. The "Show Custom Palette" command will cause the custom palette to be displayed. It will remain displayed until you click its Close button. Clicking the "Click to send info to Fusion" button on the palette, will send information to your add-in, which uses the API to display that information in a message box. Running the "Send Info to HTML" command to send data to the javascript running in the palette, which uses it to update the content of a paragraph.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Click the button below to send data to Fusion.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <p id='p1'>Run the "Send Info to HTML" command in the ADD-INS panel to update this text.</p>
        <br /><br />

    </body>
    <script>
        function sendInfoToFusion(){
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0');
            var yyyy = today.getFullYear();

            var hours = String(today.getHours()).padStart(2, '0');
            var minutes = String(today.getMinutes()).padStart(2, '0');
            var seconds = String(today.getSeconds()).padStart(2, '0');

            var date = dd + '/' + mm + '/' + yyyy;
            var time = hours + ':' + minutes + ':' + seconds;
            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
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()))


Progress Dialog API Sample

Description

Demonstrates how to use progress dialog

Code Samples

  • C++
  • Python
#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;
}
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()))


Customizing the UI using the API Sample

Description

Demonstrates how to work with tabs, panels, and command in the user interface. The full source for C++ and Python samples can be downloaded. This is especially useful for getting the resource files.

Code Samples

  • C++
  • Python
#include <stddef.h>
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ButtonControlDefinition.h>
#include <Core/UserInterface/CommandControl.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandCreatedEvent.h>
#include <Core/UserInterface/CommandCreatedEventHandler.h>
#include <Core/UserInterface/CommandCreatedEventArgs.h>
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>
#include <Core/UserInterface/DropDownControl.h>
#include <Core/UserInterface/ToolbarPanels.h>
#include <Core/UserInterface/ToolbarPanel.h>
#include <Core/UserInterface/ToolbarTabs.h>
#include <Core/UserInterface/ToolbarTab.h>
#include <Core/UserInterface/ToolbarControls.h>
#include <Core/UserInterface/Workspaces.h>
#include <Core/UserInterface/Workspace.h>
#include <Core/UserInterface/SeparatorControl.h>
#include <Core/UserInterface/Palettes.h>
#include <Core/UserInterface/TextCommandPalette.h>

using namespace adsk::core;

Ptr<Application> app;
Ptr<UserInterface> ui;

bool createUserInterface();

// Create a vector to use for storing the command definitions.
std::vector<Ptr<CommandDefinition>> commandDefs;

inline const std::string BoolToString(bool b)
{
    return b ? "true" : "false";
}

// Event handler for the execute event. This is where the work that a command
// does is performed.
class MyExecuteEventHandler : public adsk::core::CommandEventHandler
{
  public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Get the command that's being executed.
        Ptr<Command> cmd = eventArgs->command();
        Ptr<CommandDefinition> cmdDef = cmd->parentCommandDefinition();

        // Get the sample command, because most of the other commands modify it.
        Ptr<CommandDefinition> sampleCmdDef = ui->commandDefinitions()->itemById("SampleCmd");
        Ptr<ButtonControlDefinition> buttonDef = sampleCmdDef->controlDefinition();

        // Handle the execution of each of the commands. Since this sample is implemented using
        // a single command creation and execute event, it special cases for each command and
        // performs the appropriate action.
        if (cmdDef->id() == "SampleCmd")
        {
            // Display a message box indicating the sample command was run.
            ui->messageBox("Executed the sample command.");
        }
        else if (cmdDef->id() == "toggleNameCmd")
        {
            app->log("name Property");
            app->log("   Name before: " + sampleCmdDef->name());

            // Toggle the name of the sample command.
            if (sampleCmdDef->name() == "Sample Command")
                sampleCmdDef->name("Renamed Command");
            else
                sampleCmdDef->name("Sample Command");

            app->log("   Name after: " + sampleCmdDef->name());
        }
        else if (cmdDef->id() == "toggleTooltipCmd")
        {
            app->log("tooltip Property");
            app->log("   Tooltip before: " + sampleCmdDef->tooltip());

            // Toggle the tooltip of the sample command.
            if (sampleCmdDef->tooltip() == "This is the longer original tooltip.")
                sampleCmdDef->tooltip("Modified tooltip.");
            else
                sampleCmdDef->tooltip("This is the longer original tooltip.");

            app->log("   Tooltip after: " + sampleCmdDef->tooltip());
        }
        else if (cmdDef->id() == "toggleIconCmd")
        {
            app->log("resourceFolder Property");
            app->log("   Resource Folder before: " + sampleCmdDef->resourceFolder());

            // Toggle the icon of the sample command.
            if (sampleCmdDef->resourceFolder().find("SampleCmdBW") != std::string::npos)
                sampleCmdDef->resourceFolder("Resources/SampleCmdColor");
            else
                sampleCmdDef->resourceFolder("Resources/SampleCmdBW");

            app->log("   Resource Folder after: " + sampleCmdDef->resourceFolder());
        }
        else if (cmdDef->id() == "toggleVisibleCmd")
        {
            app->log("isVisible Property");
            app->log("   isVisible before: " + BoolToString(buttonDef->isVisible()));

            // Toggle the visibility of the sample command.
            buttonDef->isVisible(!buttonDef->isVisible());

            app->log("   isVisible after: " + BoolToString(buttonDef->isVisible()));
        }
        else if (cmdDef->id() == "toggleEnabledCmd")
        {
            app->log("isEnabled Property");
            app->log("   isEnabled before: " + BoolToString(buttonDef->isEnabled()));

            // Toggle the enabled state of the sample command.
            buttonDef->isEnabled(!buttonDef->isEnabled());

            app->log("   isEnabled after: " + BoolToString(buttonDef->isEnabled()));
        }
    }
} _execute;

// This event is fired when the user executes a command. This example has several commands
// but this class has been defined as the handler for all of them and then it checks to
// see which command is being created and does the appropriate thing. Typically, the
// the command created event handler is where the command dialog is defined, but in this
// case none of the commands have a dialog so they don't create any command inputs, which
// means the command is immediately executed.
class CommandCreatedEventHandler : public adsk::core::CommandCreatedEventHandler
{
  public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        // Get the command that's being created.
        Ptr<Command> cmd = eventArgs->command();

        // Connect to the command executed event.
        Ptr<CommandEvent> executeEvent = cmd->execute();
        executeEvent->add(&_execute);
    }
} _commandCreated;

extern "C" XI_EXPORT bool run(const char* context)
{
    // Get the Application and UserInterface objects.
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    app->log(" ");
    app->log(" ");
    app->log("===============================================================");

    createUserInterface();

    // Make sure the "TEXT COMMANDS" windows is visible.
    Ptr<Palettes> palettes = ui->palettes();
    Ptr<TextCommandPalette> textPalette = palettes->itemById("TextCommands");
    if (!textPalette->isVisible())
        textPalette->isVisible(true);

    ui->messageBox("Information about this sample is displayed in the TEXT COMMAND window.");

    return true;
}

bool createUserInterface()
{
    // Create all the custom commands.
    Ptr<CommandDefinitions> cmdDefs = ui->commandDefinitions();
    Ptr<CommandDefinition> sampleCmd = cmdDefs->addButtonDefinition(
        "SampleCmd", "Sample Command", "This is the longer original tooltip.", "Resources/SampleCmdBW");
    if (!sampleCmd)
    {
        std::string desc;
        app->getLastError(&desc);
        app->log("Failed to create SampleCmd. " + desc);
        return false;
    }
    commandDefs.push_back(sampleCmd);

    // Set up the tool clip for the sample command.
    sampleCmd->toolClipFilename("Resources/SampleCmdToolClip.png");

    Ptr<CommandDefinition> toggleNameCmd = cmdDefs->addButtonDefinition(
        "toggleNameCmd",
        "Toggle Name",
        "Running this command will toggle the command name of the sample command.",
        "Resources/toggleName");
    if (!toggleNameCmd)
    {
        app->log("Failed to create toggleNameCmd");
        return false;
    }
    commandDefs.push_back(toggleNameCmd);

    Ptr<CommandDefinition> toggleTooltipCmd = cmdDefs->addButtonDefinition(
        "toggleTooltipCmd",
        "Toggle Tooltip",
        "Running this command will toggle the tooltip of the sample command.",
        "Resources/toggleTooltip");
    if (!toggleTooltipCmd)
    {
        app->log("Failed to create toggleTooltipCmd.");
        return false;
    }
    commandDefs.push_back(toggleTooltipCmd);

    Ptr<CommandDefinition> toggleIconCmd = cmdDefs->addButtonDefinition(
        "toggleIconCmd",
        "Toggle Icon",
        "Running this command will toggle the icon of the sample command.",
        "Resources/toggleIcon");
    if (!toggleIconCmd)
    {
        app->log("Failed to create toggleIconCmd.");
        return false;
    }
    commandDefs.push_back(toggleIconCmd);

    Ptr<CommandDefinition> toggleVisibleCmd = cmdDefs->addButtonDefinition(
        "toggleVisibleCmd",
        "Toggle Visibility",
        "Running this command will toggle the visibility of the sample command.",
        "Resources/toggleVisible");
    if (!toggleVisibleCmd)
    {
        app->log("Failed to create toggleVisibleCmd.");
        return false;
    }
    commandDefs.push_back(toggleVisibleCmd);

    Ptr<CommandDefinition> toggleEnabledCmd = cmdDefs->addButtonDefinition(
        "toggleEnabledCmd",
        "Toggle Enabled",
        "Running this command will toggle the enabled state of the sample command.",
        "Resources/toggleEnabled");
    if (!toggleEnabledCmd)
    {
        app->log("Failed to create toggleEndabledCmd.");
        return false;
    }
    commandDefs.push_back(toggleEnabledCmd);

    // Get the Render workspace.
    Ptr<Workspace> renderWS = ui->workspaces()->itemById("FusionRenderEnvironment");
    if (!renderWS)
    {
        app->log("Failed to get Render workspace.");
        return false;
    }

    // Add a custom tab to the workspace.
    Ptr<ToolbarTab> testTab = renderWS->toolbarTabs()->add("UITestTab", "UI Test Tab");
    if (!testTab)
    {
        app->log("Failed to add toolbar tab.");
        return false;
    }

    // Add a panel to the tab.
    Ptr<ToolbarPanel> panel1 = testTab->toolbarPanels()->add("testPanelOne", "Test Panel 1");
    if (!panel1)
    {
        std::string desc;
        app->getLastError(&desc);
        app->log("Failed to add toolbar panel to tab. " + desc);
        return false;
    }

    // Add the test command to the new panel.
    Ptr<CommandControl> cmdCntrl = panel1->controls()->addCommand(sampleCmd);
    if (!cmdCntrl)
    {
        app->log("Failed to add panel 1 to the tab.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Add a button to toggle the icon to the panel to the panel.
    cmdCntrl = panel1->controls()->addCommand(toggleIconCmd, "toggleTooltipCmd", false);
    if (!cmdCntrl)
    {
        app->log("Failed to add toggle icon command to the panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Add a second panel to the tab.
    Ptr<ToolbarPanel> panel2 = testTab->toolbarPanels()->add("testPanelTwo", "Test Panel 2");
    if (!panel2)
    {
        app->log("Failed to add panel 2 to the tab.");
        return false;
    }

    // Add a button to toggle the tooltip to the panel.
    cmdCntrl = panel2->controls()->addCommand(toggleTooltipCmd);
    if (!cmdCntrl)
    {
        app->log("Failed to add toggle tooltip command to the panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Add a button to toggle the name to the panel by inserting before the existing button.
    cmdCntrl = panel2->controls()->addCommand(toggleNameCmd, "toggleTooltipCmd", true);
    if (!cmdCntrl)
    {
        app->log("Failed to add toggle name command to the panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Add a seperator.
    cmdCntrl = panel2->controls()->addSeparator("toolbarSeperator");
    if (!cmdCntrl)
    {
        app->log("Failed to add a separator to the panel.");
        return false;
    }

    // Add a drop-down.
    Ptr<DropDownControl> dropDown =
        panel2->controls()->addDropDown("Drop Down Example", "Resources/toggleEnabled", "DropDownTest");

    // Add a button to toggle the visibility to the end of the panel.
    cmdCntrl = dropDown->controls()->addCommand(toggleVisibleCmd);
    if (!cmdCntrl)
    {
        app->log("Failed to add toggle visible command to the panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Add a button to toggle the enabled state to the end of the panel.
    cmdCntrl = dropDown->controls()->addCommand(toggleEnabledCmd);
    if (!cmdCntrl)
    {
        app->log("Failed to add toggle enabled command to the panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    // Get the "Render" tab.
    Ptr<ToolbarTab> renderTab = renderWS->toolbarTabs()->itemById("RenderTab");
    if (!renderTab)
    {
        app->log("Failed to get \"Render\" tab.");
        return false;
    }

    // Get "Render" panel.
    Ptr<ToolbarPanel> renderPanel = renderTab->toolbarPanels()->itemById("RenderPanel");
    if (!renderPanel)
    {
        app->log("Failed to get \"Render\" panel.");
        return false;
    }

    // Add the "Scripts and Add-Ins" command to the Render panel.
    Ptr<CommandDefinition> scriptCmdDef = ui->commandDefinitions()->itemById("ScriptsManagerCommand");
    if (!scriptCmdDef)
    {
        app->log("Failed to get \"Scripts and Add-Ins\" command definition.");
        return false;
    }

    cmdCntrl = renderPanel->controls()->addCommand(scriptCmdDef);
    if (!cmdCntrl)
    {
        app->log("Failed to add \"Scripts and Add-Ins\" command to the \"Render\" panel.");
        return false;
    }
    cmdCntrl->isPromoted(true);

    app->log("A new tab named \"UI Test Tab\" was added to the RENDER workspace.");
    app->log("This tab contains two panels: \"Test Panel 1\" and \"Test Panel 2\".");
    app->log("\"Test Panel 1\" contains the commands \"Sample Command\" and \"Toggle Icon\".");
    app->log("\"Test Panel 2\" contains the commands \"Toggle Tooltip\", \"Toggle Name\", \"Toggle Visibility\", and "
             "\"Toggle Enabled\".");
    app->log("The \"Scripts and Add-Ins\" command was also added to the \"RENDER\" panel in the \"RENDER\" tab.");
    app->log("The command with the \"S\" icon is the sample command and the other commands change things about it.");

    // Connect each of the commands to the command created event handler. For this
    // example, the same event handler is used for all the commands and the handler
    // special cases for each command.
    Ptr<CommandCreatedEvent> commandCreatedEvent = sampleCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    commandCreatedEvent = toggleNameCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    commandCreatedEvent = toggleTooltipCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    commandCreatedEvent = toggleIconCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    commandCreatedEvent = toggleVisibleCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    commandCreatedEvent = toggleEnabledCmd->commandCreated();
    commandCreatedEvent->add(&_commandCreated);

    return true;
}

extern "C" XI_EXPORT bool stop(const char* context)
{
    if (ui)
    {
        app->log("Stopping and cleaning up add-in.");

        // Get the Render workspace.
        Ptr<Workspace> renderWS = ui->workspaces()->itemById("FusionRenderEnvironment");
        if (!renderWS)
        {
            app->log("Failed to get Render workspace.");
            return false;
        }

        Ptr<ToolbarTab> tab = renderWS->toolbarTabs()->itemById("UITestTab");
        if (!tab)
        {
            app->log("Failed to get tab \"UI Test Tab\" from Render workspace.");
        }
        else
        {
            // Get the test panels and delete them.
            Ptr<ToolbarPanel> panel = tab->toolbarPanels()->itemById("testPanelOne");
            if (!panel)
                app->log("Failed to get \"testPanelOne\".");
            else
                panel->deleteMe();

            panel = tab->toolbarPanels()->itemById("testPanelTwo");
            if (!panel)
                app->log("Failed to get \"testPanelTwo\".");
            else
                panel->deleteMe();

            // Delete the tab.
            tab->deleteMe();
        }

        // Get the "Render" tab.
        Ptr<ToolbarTab> renderTab = renderWS->toolbarTabs()->itemById("RenderTab");
        if (!renderTab)
            app->log("Failed to get \"Render\" tab.");
        else
        {
            // Get "Render" panel.
            Ptr<ToolbarPanel> renderPanel = renderTab->toolbarPanels()->itemById("RenderPanel");
            if (!renderPanel)
                app->log("Failed to get \"Render\" panel.");
            else
            {
                // Delete the "Scripts and Add-Ins" command.
                Ptr<ToolbarControl> scriptMgrControl = renderPanel->controls()->itemById("ScriptsManagerCommand");
                if (scriptMgrControl)
                {
                    scriptMgrControl->deleteMe();
                }
            }
        }

        // Delete the command definitions.
        for (Ptr<CommandDefinition> cmdDef : commandDefs)
        {
            app->log("Deleting command definition: " + cmdDef->id());
            if (!cmdDef->deleteMe())
                app->log("Failed to delete: " + cmdDef->id());
        }

        ui = nullptr;
        app = nullptr;
    }

    return true;
}
#Author-
#Description-

import adsk.core, adsk.fusion, traceback
from typing import List

_app = adsk.core.Application.get()
_ui = _app.userInterface

_handlers = []
_commandDefs: List[adsk.core.CommandDefinition] = []

def run(context):
    try:
        _app.log(' ')
        _app.log(' ')
        _app.log('===============================================================')

        createUserInterface()

        # Make sure the "TEXT COMMANDS" windows is visible.
        textPalette: adsk.core.TextCommandPalette = _ui.palettes.itemById('TextCommands')
        if not textPalette.isVisible:
            textPalette.isVisible = True

        _ui.messageBox('Information about this sample is displayed in the TEXT COMMAND window.')

        return True
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        _app.log('Stopping and cleaning up add-in.')

        # Get the Render workspace.
        renderWS = _ui.workspaces.itemById('FusionRenderEnvironment')

        if renderWS:
            _app.log('Cleaning up toolbar.')
            tab = renderWS.toolbarTabs.itemById('UITestTab');
            if tab:
                # Get the test panels and delete them.
                panel = tab.toolbarPanels.itemById('testPanelOne')
                if panel:
                    panel.deleteMe()

                panel = tab.toolbarPanels.itemById('testPanelTwo')
                if panel:
                    panel.deleteMe()

                # Delete the tab.
                tab.deleteMe()

        # Get the "Render" tab.
        renderTab = renderWS.toolbarTabs.itemById('RenderTab')
        if renderTab:
            # Get "Render" panel.
            renderPanel = renderTab.toolbarPanels.itemById('RenderPanel')
            if renderPanel:
                # Delete the "Scripts and Add-Ins" command.
                scriptMgrControl = renderPanel.controls.itemById('ScriptsManagerCommand')
                if scriptMgrControl:
                    scriptMgrControl.deleteMe()

        # Delete the command definitions.
        for cmdDef in _commandDefs:
            _app.log(f'Deleting command definition: {cmdDef.id}')
            cmdDef.deleteMe()
    except:
        _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def createUserInterface():
    try:
        # Create all the custom commands.
        cmdDefs = _ui.commandDefinitions
        sampleCmd = cmdDefs.addButtonDefinition('SampleCmd', 'Sample Command', 'This is the longer original tooltip.', 'Resources/SampleCmdBW')
        _commandDefs.append(sampleCmd)

        sampleCmd.toolClipFilename = 'Resources/SampleCmdToolClip.png'

        toggleNameCmd = cmdDefs.addButtonDefinition('toggleNameCmd', 'Toggle Name', 'Running this command will toggle the command name of the sample command.', 'Resources/toggleName');
        _commandDefs.append(toggleNameCmd)

        toggleTooltipCmd = cmdDefs.addButtonDefinition('toggleTooltipCmd', 'Toggle Tooltip', 'Running this command will toggle the tooltip of the sample command.', 'Resources/toggleTooltip');
        _commandDefs.append(toggleTooltipCmd)

        toggleIconCmd = cmdDefs.addButtonDefinition('toggleIconCmd', 'Toggle Icon', 'Running this command will toggle the icon of the sample command.', 'Resources/toggleIcon');
        _commandDefs.append(toggleIconCmd)

        toggleVisibleCmd = cmdDefs.addButtonDefinition('toggleVisibleCmd', 'Toggle Visibility', 'Running this command will toggle the visibility of the sample command.', 'Resources/toggleVisible');
        _commandDefs.append(toggleVisibleCmd)

        toggleEnabledCmd = cmdDefs.addButtonDefinition('toggleEnabledCmd', 'Toggle Enabled', 'Running this command will toggle the enabled state of the sample command.', 'Resources/toggleEnabled');
        _commandDefs.append(toggleEnabledCmd)

        # Get the Render workspace.
        renderWS = _ui.workspaces.itemById('FusionRenderEnvironment')
        if renderWS:
            # Add a custom tab to the workspace.
            testTab = renderWS.toolbarTabs.add('UITestTab', 'UI Test Tab')

            if testTab:
                # Add a panel to the tab.
                panel1 = testTab.toolbarPanels.add('testPanelOne', 'Test Panel 1')

                if panel1:
                    # Add the test command to the new panel.
                    cmdCntrl = panel1.controls.addCommand(sampleCmd)
                    cmdCntrl.isPromoted = True

                    # Add a button to toggle the icon to the panel.
                    cmdCntrl = panel1.controls.addCommand(toggleIconCmd)
                    cmdCntrl.isPromoted = True

                # Add a second panel to the tab.
                panel2 = testTab.toolbarPanels.add('testPanelTwo', 'Test Panel 2')

                if panel2:
                    # Add a button to toggle the tooltip to the panel by inserting before the existing button.
                    cmdCntrl = panel2.controls.addCommand(toggleTooltipCmd)
                    cmdCntrl.isPromoted = True

                    # Add a button to toggle the name to the panel.
                    cmdCntrl = panel2.controls.addCommand(toggleNameCmd, 'toggleTooltipCmd', True)
                    cmdCntrl.isPromoted = True

                    cmdCntrl = panel2.controls.addSeparator('toolbarSeperator')

                    # Add a drop-down.
                    dropDown = panel2.controls.addDropDown('Drop Down Example','Resources/toggleEnabled', 'DropDownTest')

                    if dropDown:
                        # Add a button to toggle the visibility to the end of the panel.
                        cmdCntrl = dropDown.controls.addCommand(toggleVisibleCmd)
                        cmdCntrl.isPromoted = True

                        # Add a button to toggle the enabled state to the end of the panel.
                        cmdCntrl = dropDown.controls.addCommand(toggleEnabledCmd)
                        cmdCntrl.isPromoted = True

            # Get the "Render" tab.
            renderTab = renderWS.toolbarTabs.itemById('RenderTab');

            if renderTab:
                # Get "Render" panel.
                renderPanel = renderTab.toolbarPanels.itemById('RenderPanel')

                if renderPanel:
                    # Add the "Scripts and Add-Ins" command to the Render panel.
                    scriptCmdDef = _ui.commandDefinitions.itemById('ScriptsManagerCommand')

                    cmdCntrl = renderPanel.controls.addCommand(scriptCmdDef)
                    cmdCntrl.isPromoted = True

        _app.log('A new tab named "UI Test Tab" was added to the RENDER workspace.')
        _app.log('This tab contains two panels: "Test Panel 1" and "Test Panel 2".')
        _app.log('"Test Panel 1" contains the commands "Sample Command" and "Toggle Icon".')
        _app.log('"Test Panel 2" contains the commands "Toggle Tooltip", "Toggle Name", "Toggle Visibility", and "Toggle Enabled"')
        _app.log('The "Scripts and Add-Ins" command was also added to the "RENDER" panel in the "RENDER" tab.')
        _app.log('The command with the "S" icon is the sample command and the other commands change things about it.')

        # Connect each of the commands to the command created event handler. For this
        # example, the same event handler is used for all the commands and the handler
        # special cases for each command.
        onCommandCreated = MyCommandCreatedHandler()
        sampleCmd.commandCreated.add(onCommandCreated)
        toggleNameCmd.commandCreated.add(onCommandCreated)
        toggleTooltipCmd.commandCreated.add(onCommandCreated)
        toggleIconCmd.commandCreated.add(onCommandCreated)
        toggleVisibleCmd.commandCreated.add(onCommandCreated)
        toggleEnabledCmd.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)
    except:
        _ui.messageBox('Failed:\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)
            command = eventArgs.command

            # Connect to the command execute event.
            onExecute = MyExecuteHandler()
            command.execute.add(onExecute)
            _handlers.append(onExecute)
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the execute event.
class MyExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, eventArgs):
        try:
            # Get the command that's being executed.
            cmd = eventArgs.command
            cmdDef = cmd.parentCommandDefinition

            # Get the sample command, because most of the other commands modify it.
            sampleCmdDef = _ui.commandDefinitions.itemById('SampleCmd')
            buttonDef = sampleCmdDef.controlDefinition

            # Handle the execution of each of the commands. Since this sample is implemented using
            # a single command created and execute event, it special cases for each command and
            # performs the appropriate action for that command.
            if cmdDef.id == 'SampleCmd':
                # Display a message box indicating the sample command was run.
                _ui.messageBox('Executed the sample command.')
            elif cmdDef.id == 'toggleNameCmd':
                _app.log('name Property')
                _app.log(f'   Name before: "{sampleCmdDef.name}".')

                # Toggle the name of the sample command.
                if sampleCmdDef.name == 'Sample Command':
                    sampleCmdDef.name = "Renamed Command"
                else:
                    sampleCmdDef.name = 'Sample Command'

                _app.log(f'   Name after: "{sampleCmdDef.name}".')
            elif cmdDef.id == 'toggleTooltipCmd':
                _app.log('tooltip Property')
                _app.log(f'   Tooltip before: "{sampleCmdDef.tooltip}".')

                # Toggle the tooltip of the sample command.
                if sampleCmdDef.tooltip == 'This is the longer original tooltip.':
                    sampleCmdDef.tooltip = "Modified tooltip."
                else:
                    sampleCmdDef.tooltip = 'This is the longer original tooltip.'

                _app.log(f'   Tooltip after: "{sampleCmdDef.tooltip}".')
            elif cmdDef.id == 'toggleIconCmd':
                _app.log('resourceFolder Property')
                _app.log(f'   Resource Folder before: "{sampleCmdDef.resourceFolder}".')

                # Toggle the icon of the sample command.
                if 'Resources/SampleCmdBW' in sampleCmdDef.resourceFolder:
                    sampleCmdDef.resourceFolder = 'Resources/SampleCmdColor'
                else:
                    sampleCmdDef.resourceFolder = 'Resources/SampleCmdBW'

                _app.log(f'   Resource Folder after: "{sampleCmdDef.resourceFolder}".')
            elif cmdDef.id == 'toggleVisibleCmd':
                _app.log('isVisible Property')
                _app.log(f'   isVisible before: {buttonDef.isVisible}.')

                # Toggle the visibility of the sample command.
                buttonDef.isVisible = not buttonDef.isVisible

                _app.log(f'   isVisible after: {buttonDef.isVisible}.')
            elif cmdDef.id == 'toggleEnabledCmd':
                _app.log('isEnabled Property')
                _app.log(f'   isEnabled before: {buttonDef.isEnabled}.')

                # Toggle the enabled state of the sample command.
                buttonDef.isEnabled = not buttonDef.isEnabled

                _app.log(f'   isEnabled after: {buttonDef.isEnabled}.')
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Write user interface to a file API Sample

Description

Writes out the full structure of the Fusion user interface. This information is useful when editing the user-interface, as discussed in the usre manual topic User-Interface Customization with Fusion's API

Code Samples

  • Python
import adsk.core, traceback
import codecs

def run(context):
    ui = None
    try:
        app: adsk.core.Application = adsk.core.Application.get()
        ui  = app.userInterface

        fileDialog = ui.createFileDialog()
        fileDialog.isMultiSelectEnabled = False
        fileDialog.title = "Specify result filename"
        fileDialog.filter = 'XML files (*.xml)'
        fileDialog.filterIndex = 0
        dialogResult = fileDialog.showSave()
        if dialogResult == adsk.core.DialogResults.DialogOK:
            filename = fileDialog.filename
        else:
            return

        result = '<UserInterface>\n'
        result += f'{TabSpace(1)}<Workspaces count="{ui.workspaces.count}">\n'
        for wsIndex in range(ui.workspaces.count):
            try:
                ws: adsk.core.Workspace = ui.workspaces.item(wsIndex)
            except:
                ws = None

            if ws:
                result += f'{TabSpace(2)}<Workspace name="{ws.name}" id="{ws.id}">\n'
                try:
                    tabs = ws.toolbarTabs
                except:
                    tabs = None

                if tabs:
                    result += f'{TabSpace(3)}<ToolbarTabs count="{tabs.count}">\n'
                    for tab in tabs:
                        result += f'{TabSpace(4)}<ToolbarTab name="{tab.name}" id="{tab.id}">\n'

                        result += GetPanelsXML(tab.toolbarPanels, 5)

                        result += f'{TabSpace(4)}</ToolbarTab>\n'

                    result += f'{TabSpace(3)}</ToolbarTabs>\n'
                else:
                    result += f'{TabSpace(3)}<ToolbarTabs error="Failed to get toolbar tabs.">\n'
                    result += f'{TabSpace(3)}</ToolbarTabs>\n'

                result += f'{TabSpace(2)}</Workspace>\n'

        result += f'{TabSpace(1)}</Workspaces>\n'

        result += f'{TabSpace(1)}<Toolbars count="{ui.toolbars.count}">\n'
        toolbar: adsk.core.Toolbar
        for toolbar in ui.toolbars:
            result += f'{TabSpace(2)}<Toolbar id="{toolbar.id}">\n'
            result += f'{TabSpace(3)}<ToolbarControls count="{toolbar.controls.count}">\n'
            result += GetControls(toolbar.controls, 1, False)
            result += f'{TabSpace(3)}</ToolbarControls>\n'
            result += f'{TabSpace(2)}</Toolbar>\n'
        result += f'{TabSpace(1)}</Toolbars>\n'
        result += '</UserInterface>'

        f = open(filename, 'w', -1, 'utf-8-sig')
        f.write(result)
        f.close()
        ui.messageBox(f'Finished writing to:\n{filename}')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Builds XML data for all of the panel information from the ToolbarPanels collection passed in.
def GetPanelsXML(panels: adsk.core.ToolbarPanels, tabs: int) -> str:
    result = f'{TabSpace(tabs)}<ToolbarPanels count="{panels.count}">\n'
    for panelIndex in range(panels.count):
        try:
            panel: adsk.core.ToolbarPanel = panels.item(panelIndex)
        except:
            panel = None

        if panel:
            result += f'{TabSpace(tabs + 1)}<ToolbarPanel name="{panel.name}" id="{panel.id}">\n'
            result += f'{TabSpace(tabs + 2)}<ToolbarControls count="{panel.controls.count}">\n'
            result += GetControls(panel.controls, tabs, True)
            result += f'{TabSpace(tabs + 2)}</ToolbarControls>\n'
            result += f'{TabSpace(tabs + 1)}</ToolbarPanel>\n'

    result += f'{TabSpace(tabs + 1)}</ToolbarPanels>\n'
    return result

# Builds XML data for all of the controls in the ToolbarControls collection passed in.
def GetControls(controls: adsk.core.ToolbarControls, tabs: int, isPanel: bool) -> str:
    result = ''
    for control in controls:
        if control.objectType == adsk.core.DropDownControl.classType():
            dropControl: adsk.core.DropDownControl = control

            if isPanel:
                try:
                    dropName = dropControl.name
                except:
                    dropName = "**** Error getting name."

                result += f'{TabSpace(tabs + 3)}<DropDownControl name="{dropName}" id="{dropControl.id}" count="{dropControl.controls.count}">\n'
            else:
                result += f'{TabSpace(tabs + 3)}<DropDownControl id="{dropControl.id}" count="{dropControl.controls.count}">\n'

            result += GetControls(dropControl.controls, tabs + 1, isPanel)
            result += f'{TabSpace(tabs + 3)}</DropDownControl>\n'
        elif control.objectType == adsk.core.SplitButtonControl.classType():
            splitControl: adsk.core.SplitButtonControl = control
            result += f'{TabSpace(tabs + 3)}<SplitButtonControl>\n'

            try:
                defaultCmdDef = splitControl.defaultCommandDefinition
            except:
                defaultCmdDef = None

            if defaultCmdDef:
                result += f'{TabSpace(tabs + 4)}<defaultCommandDefinition name="{defaultCmdDef.name}" id="{defaultCmdDef.id}"/>\n'

                additionalDefs = splitControl.additionalDefinitions
                result += f'{TabSpace(tabs + 4)}<additionalDefinitions count="{len(additionalDefs)}">\n'
                for additionalDef in additionalDefs:
                    result += f'{TabSpace(tabs + 5)}<{ObjectName(additionalDef)} name="{additionalDef.name}" id="{additionalDef.id}"/>\n'
                result += f'{TabSpace(tabs + 4)}</additionalDefinitions>\n'
            else:
                result += f'{TabSpace(tabs + 4)}<defaultCommandDefinition error="**** Failed to get CommandDefinition"/>\n'

            result += f'{TabSpace(tabs + 3)}</SplitButtonControl>\n'

        else:
            if control.objectType == adsk.core.SeparatorControl.classType():
                result += f'{TabSpace(tabs + 3)}<SeparatorControl id="{control.id}" />\n'
            else:
                cmdDef: adsk.core.CommandDefinition = None
                try:
                    cmdDef = control.commandDefinition
                except:
                    cmdDef = None

                if cmdDef:
                    try:
                        commandType = ObjectName(cmdDef.controlDefinition)
                    except:
                        commandType = '**** Failed to get associated control.'

                    isPromotedOK = True
                    try:
                        isPromoted = control.isPromoted
                    except:
                        isPromotedOK = False

                    if isPanel and isPromotedOK:
                        result += f'{TabSpace(tabs + 3)}<{ObjectName(control)} name="{cmdDef.name}" id="{cmdDef.id}" commandType="{commandType}" isPromoted="{isPromoted}" />\n'
                    else:
                        result += f'{TabSpace(tabs + 3)}<{ObjectName(control)} name="{cmdDef.name}" id="{cmdDef.id}" commandType="{commandType}" />\n'
                else:
                    result += f'{TabSpace(tabs + 3)}<{ObjectName(control)} error="**** Failed to get CommandDefinition for {control.id}" />\n'

    return result

# Return a string of spaces that can be used to prepend to a string to
# represent the specified number of tabs.
def TabSpace(tabs: int) -> str:
    spacesPerTab = 4
    return ' ' * (spacesPerTab * tabs)

# Splits out the object name from the full object name passed in.
def ObjectName(object: adsk.core.Base) -> str:
    parts = object.objectType.split('::')
    return parts[len(parts)-1]


Additive Manufacturing FFF API Sample

Description

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback, tempfile, time

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        # Make sure the TEXT COMMAND palette is visible.
        textPalette = ui.palettes.itemById('TextCommands')
        if not textPalette.isVisible:
            textPalette.isVisible = True
            adsk.doEvents()

        doc = app.activeDocument
        products = doc.products

        # Make
        camWS = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()
        cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))

        # Design creation
        designWS = ui.workspaces.itemById('FusionSolidEnvironment')
        designWS.activate()
        design = adsk.fusion.Design.cast(products.itemByProductType("DesignProductType"))
        camWS.activate()

        showMessage('=============================================')
        showMessage('Creating Manufacturing Model...')
        manufacturingModels = cam.manufacturingModels
        mmInput = manufacturingModels.createInput()
        mmInput.name = "My Manufacturing Model - FFF"
        manufacturingModel = manufacturingModels.add(mmInput)

        showMessage('Getting occurrences...')
        occs = getValidOccurrences(manufacturingModel.occurrence)
        if len(occs) == 0:
            ui.messageBox('No component has been added to the scene.')
            return

        showMessage('Creating arrange operation...')
        setup = createAdditiveSetup(occs, cam)

        # Define and create the arrange operation.
        operationInput = setup.operations.createInput('additive_arrange')
        arrange = setup.operations.add(operationInput)

        parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_arrangement_type").value
        parameter.value = 'Pack2D'

        # Specify the values to control the arrangement. All length units are centimeters.
        parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_platform_clearance").value
        parameter.value = 0

        parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_frame_width").value
        parameter.value = 0.5

        parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_ceiling_clearance").value
        parameter.value = 0.5

        parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_object_spacing").value
        parameter.value = 1

        future = cam.generateToolpath(arrange)
        while (future.isGenerationCompleted == False):
            time.sleep(0.5)

        # Create the automatic orientation operations for each occurrence.
        for occ in occs:
            showMessage(f'Defining orientation for occurrence "{occ.name}" ...')
            operationInput = setup.operations.createInput('automatic_orientation')
            operationInput.isAutoCalculating = False
            orientationTarget = operationInput.parameters.itemByName('optimizeOrientationTarget')
            orientationTarget.value.value = [occ]
            operationInput.displayName = 'Automatic Orientation: ' + occ.name
            #global orientation
            orientation = setup.operations.add(operationInput)

            parameter: adsk.cam.FloatParameterValue = orientation.parameters.itemByName("optimizeOrientationSmallestRotation").value
            parameter.value = 180 #angle units are always degrees

            parameter: adsk.cam.BooleanParameterValue = orientation.parameters.itemByName("optimizeOrientationUsePreciseCalculation").value
            parameter.value = True #capitilize

            parameter: adsk.cam.FloatParameterValue = orientation.parameters.itemByName("optimizeOrientationCriticalAngle").value
            parameter.value = 45 #angle units are always degrees

            parameter: adsk.cam.FloatParameterValue = orientation.parameters.itemByName("optimizeOrientationDistanceToPlatform").value
            parameter.value = 0 #units are always cm

            parameter: adsk.cam.BooleanParameterValue = orientation.parameters.itemByName("optimizeOrientationMoveToCenter").value
            parameter.value = True #capitilize

            parameter: adsk.cam.FloatParameterValue = orientation.parameters.itemByName("optimizeOrientationFrameWidth").value
            parameter.value = 0.5 #units are always cm

            parameter: adsk.cam.FloatParameterValue = orientation.parameters.itemByName("optimizeOrientationCeilingClearance").value
            parameter.value = 0.5 #units are always cm

            parameter: adsk.cam.ChoiceParameterValue = orientation.parameters.itemByName("optimizeOrientationRankingSupportVolume").value
            parameter.value = '10' #take the number from dialog with its quotes

            parameter: adsk.cam.ChoiceParameterValue = orientation.parameters.itemByName("optimizeOrientationRankingSupportArea").value
            parameter.value = '0' #take the number from dialog with its quotes

            parameter: adsk.cam.ChoiceParameterValue = orientation.parameters.itemByName("optimizeOrientationRankingBoundingBoxVolume").value
            parameter.value = '2' #take the number from dialog with its quotes

            parameter: adsk.cam.ChoiceParameterValue = orientation.parameters.itemByName("optimizeOrientationRankingPartHeight").value
            parameter.value = '6' #take the number from dialog with its quotes

            parameter: adsk.cam.ChoiceParameterValue = orientation.parameters.itemByName("optimizeOrientationRankingCOGHeight").value
            parameter.value = '6' #take the number from dialog with its quotes

            showMessage('Generating orientation...')
            future = cam.generateToolpath(orientation)
            while (future.isGenerationCompleted == False):
                time.sleep(0.5)

            generatedResults = orientation.generatedDataCollection
            castPref = None
            firstResult = None
            primary = generatedResults.itemByIdentifier(adsk.cam.GeneratedDataType.OptimizedOrientationGeneratedDataType)

            if isinstance(primary, adsk.cam.OptimizedOrientationResults):
                castPref: adsk.cam.OptimizedOrientationResults = primary
                firstResult = castPref.item(0)

            castPref.currentOrientationResult = firstResult

        showMessage('Generating arrange...')
        future = cam.generateToolpath(arrange)
        while (future.isGenerationCompleted == False):
            time.sleep(0.5)

        showMessage('Generating supports...')
        supportInput = setup.operations.createInput('solid_volume_support')
        volumeSupport = setup.operations.add(supportInput)
        supportParam = volumeSupport.parameters.itemByName('supportTarget')
        supportParam.value.value = occs
        future = cam.generateToolpath(volumeSupport)
        while (future.isGenerationCompleted == False):
            time.sleep(0.5)

        if volumeSupport.hasError:
            volumeSupport.deleteMe()

        showMessage('Generating toolpath...')
        toolpath = None
        i = 0
        for i in range(setup.operations.count):
            op = setup.operations.item(i)
            if (op.strategy == 'additive_buildstyle'):
                toolpath = op
                break
        if (toolpath == None):
            return

        future = cam.generateToolpath(toolpath)
        while (future.isGenerationCompleted == False):
           time.sleep(1.0)

        app.activeViewport.fit()

        # Start the toolpath simulation command.
        app.executeTextCommand('NaNeuCAMUI.AdditiveSimulateCmd')

        showMessage('Finished.')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
        adsk.terminate()

# Create an additive setup.
def createAdditiveSetup(models: list[adsk.fusion.Occurrence], cam: adsk.cam.CAM):
    setups = cam.setups
    input = setups.createInput(adsk.cam.OperationTypes.AdditiveOperation)
    input.models = models
    input.name = 'AdditiveSetup'

    camManager = adsk.cam.CAMManager.get()
    libraryManager = camManager.libraryManager
    printSettingLibrary = libraryManager.printSettingLibrary
    machineLibrary = libraryManager.machineLibrary
    printSetting = None
    machine = None
    if True:
        # URL-structure browsing
        printSettingUrl = printSettingLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        printSettings = printSettingLibrary.childPrintSettings(printSettingUrl)

        machineUrl = machineLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        machines = machineLibrary.childMachines(machineUrl)
        for ps in printSettings:
            if ps.name ==  "PLA (Direct Drive)": #print setting name from fusions library
                printSetting = ps
                break

        for machine in machines: #model name from fusions library -- Example: "Generic FFF Machine"
            if machine.model ==  "i3 MK3S+":
                machine = machine
                break
    input.machine = machine
    input.printSetting= printSetting
    setup = setups.add(input)
    return setup

# Given an occurrence, this finds all child occurrences that contain either a
# B-Rep or Mesh body. It is recursive, so it will find all occurrences at all levels.
def getValidOccurrences(occurrence: adsk.fusion.Occurrence) -> list[adsk.fusion.Occurrence]:
    result = []
    for childOcc in occurrence.childOccurrences:
        if (childOcc.bRepBodies.count + childOcc.component.meshBodies.count  > 0):
            result.append(childOcc)

        result.extend(getValidOccurrences(childOcc))

    return result

def showMessage(message):
    app.log(message)

    # Give control back to Fusion, so it can update the UI.
    adsk.doEvents()


Additive Manufacturing MJF API Sample

Description

Demonstrates how to automate the creation of an additive MJF manufacturing setup and arrange components within the build volume of a 3D printer.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive Arrange using that manufacturing model as an input.

The setup will select an MJF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically arranged within the build volume of the selected MJF machine.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback, tempfile, time

app = adsk.core.Application.get()
ui  = app.userInterface

# Global set of event handlers to keep them referenced for the duration of the command
handlers = []

def createManufacturingModel(cam: adsk.cam.CAM):
    showMessage('=============================================')
    showMessage('Creating Manufacturing Model...')
    manufacturingModels = cam.manufacturingModels
    mmInput = manufacturingModels.createInput()
    mmInput.name = "My Manufacturing Model - MJF"
    manufacturingModel = manufacturingModels.add(mmInput)

    showMessage('Getting occurrences...')
    occs = getValidOccurrences(manufacturingModel.occurrence)
    if len(occs) == 0:
        ui.messageBox('No component has been added to the scene.')
        return (None, [])

    return (manufacturingModel, occs)

# Create an additive setup.
def createAdditiveSetup(models: list[adsk.fusion.Occurrence], cam: adsk.cam.CAM, libraryManager: adsk.cam.CAMLibraryManager):
    showMessage('Creating Setup...')
    setups = cam.setups
    input = setups.createInput(adsk.cam.OperationTypes.AdditiveOperation)
    input.models = models
    input.name = 'AdditiveSetup'

    printSettingLibrary = libraryManager.printSettingLibrary
    machineLibrary = libraryManager.machineLibrary
    printSetting = None
    machine = None
    if True:
        # URL-structure browsing
        printSettingUrl = printSettingLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        printSettings = printSettingLibrary.childPrintSettings(printSettingUrl)

        machineUrl = machineLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        machines = machineLibrary.childMachines(machineUrl)
        for ps in printSettings:
            if ps.name ==  "HP - MJF": #print setting name from fusions library
                input.printSetting = ps
                break

        for machine in machines: #model name from fusions library
            if machine.model ==  "Jet Fusion 5200 Series":
                input.machine = machine
                break

    setup = setups.add(input)
    return setup

def createAdditiveArrange(setup: adsk.cam.Setup, cam: adsk.cam.CAM):
    # Define and create the arrange operation.
    showMessage('Generating Additive Arrange...')
    operationInput = setup.operations.createInput('additive_arrange')
    arrange = setup.operations.add(operationInput)

    parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_arrangement_type").value
    parameter.value = 'Pack3D_TrueShape'

    parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_priority_type").value
    parameter.value = 'priority_volume'

    parameter: adsk.cam.BooleanParameterValue = arrange.parameters.itemByName("arrange_quantity_group").value
    parameter.value = True

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_global_quantity").value
    parameter.value = 1

    parameter: adsk.cam.BooleanParameterValue = arrange.parameters.itemByName("arrange_rotation_group").value
    parameter.value = True

    parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_rotation_z").value
    parameter.value = 'arrange_rotation_90'

    parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_unselected_components_option").value
    parameter.value = 'unselected_move_outside'

    # Specify the values to control the arrangement. All length units are centimeters.
    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_platform_clearance").value
    parameter.value = 0.0

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_frame_width").value
    parameter.value = 0.2

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_ceiling_clearance").value
    parameter.value = 0.2

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_object_spacing").value
    parameter.value = 0.5

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_voxelsize").value
    parameter.value = 0.5

    future = cam.generateToolpath(arrange)
    while (future.isGenerationCompleted == False):
        time.sleep(0.5)

# Event handler that reacts to when the command is executed.
class MyCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Make sure the TEXT COMMAND palette is visible.
            textPalette = ui.palettes.itemById('TextCommands')
            if not textPalette.isVisible:
                textPalette.isVisible = True
                adsk.doEvents()

            doc = app.activeDocument
            products = doc.products

            # Make
            camWS = ui.workspaces.itemById('CAMEnvironment')
            camWS.activate()
            cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))

            # Design creation
            designWS = ui.workspaces.itemById('FusionSolidEnvironment')
            designWS.activate()
            design = adsk.fusion.Design.cast(products.itemByProductType("DesignProductType"))
            camWS.activate()

            libraryManager = adsk.cam.CAMManager.get().libraryManager
            templateLibrary = libraryManager.templateLibrary

            # The block below is the gist of this script.
            # Each method can be edited to fit the user's needs.
            (manufacturingModel, occs) = createManufacturingModel(cam)
            if manufacturingModel is None:
                return

            setup: adsk.cam.Setup = createAdditiveSetup(occs, cam, libraryManager)

            machineElements = setup.machine.elements
            machineDimsList: adsk.cam.AdditivePlatformMachineElement = machineElements.itemsByType(adsk.cam.AdditivePlatformMachineElement.staticTypeId())
            machineDims = machineDimsList[0]
            origin = machineDims.origin
            machineSize = machineDims.size

            maxPointX = - origin.x + machineSize.x

            createAdditiveArrange(setup, cam)

            ui.activeSelections.clear()
            ui.activeSelections.add(setup)

            app.activeViewport.fit()

            showMessage('Finished.')
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler that reacts to when the command is destroyed. This terminates the script if this has not happened before in an exception.
class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # When the command is done, terminate the script
            showMessage('Script is terminating.')
            adsk.terminate()
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
            adsk.terminate()

# Event handler that reacts when the command definition 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)

            onExecute = MyCommandExecuteHandler()
            cmd.execute.add(onExecute)
            handlers.append(onExecute)

            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            handlers.append(onDestroy)
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        global app, ui

        # Get the existing command definition or create it if it doesn't already exist.
        cmdDef = ui.commandDefinitions.itemById('MJFExampleScript')
        if not cmdDef:
            cmdDef = ui.commandDefinitions.addButtonDefinition('MJFExampleScript', 'MJF Example Script', 'Sample to demonstrate a workflow for MJF printers.')

        # Connect to the command created event.
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        handlers.append(onCommandCreated)

        # Execute the command definition.
        cmdDef.execute()

        # Keeps the script alive until it is terminated by the onDestroy event.
        adsk.autoTerminate(False)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Given an occurrence, this finds all child occurrences that contain either a
# B-Rep or Mesh body. It is recursive, so it will find all occurrences at all levels.
def getValidOccurrences(occurrence: adsk.fusion.Occurrence) -> list[adsk.fusion.Occurrence]:
    result = []
    for childOcc in occurrence.childOccurrences:
        if (childOcc.bRepBodies.count + childOcc.component.meshBodies.count  > 0):
            result.append(childOcc)

        result.extend(getValidOccurrences(childOcc))

    return result

def showMessage(message):
    app.log(message)

    # Give control back to Fusion, so it can update the UI.
    adsk.doEvents()


Additive Manufacturing SLA API Sample

Description

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected SLA machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback, tempfile, time

app = adsk.core.Application.get()
ui  = app.userInterface

# Global set of event handlers to keep them referenced for the duration of the command
handlers = []

def getTemplateFromLibrary(templateLibrary: adsk.cam.CAMTemplateLibrary, libLocation: adsk.cam.LibraryLocations, folderName: str, templateNameSubstring: str):
    libraryURL = templateLibrary.urlByLocation(libLocation)

    templates = None
    if folderName == "":
        templates = templateLibrary.childTemplates(libraryURL)
    else:
        childFolders = templateLibrary.childFolderURLs(libraryURL)
        pickedFolderURL = None
        for folderURL in childFolders:
            if folderURL.leafName.lower() == folderName.lower():
                pickedFolderURL = folderURL
                break
        templates = templateLibrary.childTemplates(pickedFolderURL)

    pickedTemplate = None
    for template in templates:
        lowerCaseName: str = template.name.lower()
        if lowerCaseName.find(templateNameSubstring.lower()) != -1:
            pickedTemplate = template
            break
    return pickedTemplate

def createManufacturingModel(cam: adsk.cam.CAM):
    showMessage('=============================================')
    showMessage('Creating Manufacturing Model...')
    manufacturingModels = cam.manufacturingModels
    mmInput = manufacturingModels.createInput()
    mmInput.name = "My Manufacturing Model - SLA"
    manufacturingModel = manufacturingModels.add(mmInput)

    showMessage('Getting occurrences...')
    occs = getValidOccurrences(manufacturingModel.occurrence)
    if len(occs) == 0:
        ui.messageBox('No component has been added to the scene.')
        return (None, [])

    return (manufacturingModel, occs)

# Create an additive setup.
def createAdditiveSetup(models: list[adsk.fusion.Occurrence], cam: adsk.cam.CAM, libraryManager: adsk.cam.CAMLibraryManager):
    showMessage('Creating Setup...')
    setups = cam.setups
    input = setups.createInput(adsk.cam.OperationTypes.AdditiveOperation)
    input.models = models
    input.name = 'AdditiveSetup'

    printSettingLibrary = libraryManager.printSettingLibrary
    machineLibrary = libraryManager.machineLibrary
    printSetting = None
    machine = None
    if True:
        # URL-structure browsing
        printSettingUrl = printSettingLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        printSettings = printSettingLibrary.childPrintSettings(printSettingUrl)

        machineUrl = machineLibrary.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation) ## .Fusion360LibraryLocation vs .LocalLibraryLocation etc.
        machines = machineLibrary.childMachines(machineUrl)
        for ps in printSettings:
            if ps.name ==  "Prusa SL1S SPEED - Prusament Resin Tough - 0.05mm Normal": #print setting name from fusions library
                printSetting = ps
                break

        for machine in machines: #model name from fusions library -- Example: "Generic SLA Machine"
            if machine.model ==  "SL1S SPEED":
                machine = machine
                break
    input.machine = machine
    input.printSetting= printSetting
    setup = setups.add(input)
    return setup

def createOrientations(templateLibrary: adsk.cam.CAMTemplateLibrary, occs: list[adsk.fusion.Occurrence], setup: adsk.cam.Setup, cam: adsk.cam.CAM):
    # the second parameter can be any of the following:
    # - adsk.cam.LibraryLocations.Fusion360LibraryLocation
    # - adsk.cam.LibraryLocations.LocalLibraryLocation
    # - adsk.cam.LibraryLocations.CloudLibraryLocation
    # the third parameter is the folder name in the library
    # using the empty string for the root folder will search the templates in the top level folder instead
    # the fourth parameter is the substring to search for in the template name
    orientationTemplate = getTemplateFromLibrary(templateLibrary, adsk.cam.LibraryLocations.Fusion360LibraryLocation, "orientations", "SLA - Automatic Orientation")
    if orientationTemplate is None:
        showMessage('No orientation template found.')
        return
    orientationTemplateInput: adsk.cam.CreateFromCAMTemplateInput = adsk.cam.CreateFromCAMTemplateInput.create()
    orientationTemplateInput.camTemplate = orientationTemplate

    # Create the automatic orientation operations for each occurrence.
    for occ in occs:
        showMessage(f'Generating Automatic Orientation for "{occ.name}" ...')
        orientations =  setup.createFromCAMTemplate2(orientationTemplateInput)
        orientation = orientations[0]
        orientation.name = 'Automatic Orientation: ' + occ.name

        orientationTarget = orientation.parameters.itemByName('optimizeOrientationTarget')
        orientationTarget.value.value = [occ]

        future = cam.generateToolpath(orientation)
        while (future.isGenerationCompleted == False):
            time.sleep(0.5)

        generatedResults = orientation.generatedDataCollection
        castPref = None
        firstResult = None
        primary = generatedResults.itemByIdentifier(adsk.cam.GeneratedDataType.OptimizedOrientationGeneratedDataType)

        if isinstance(primary, adsk.cam.OptimizedOrientationResults):
            castPref: adsk.cam.OptimizedOrientationResults = primary
            firstResult = castPref.item(0)

        castPref.currentOrientationResult = firstResult

def createAdditiveArrange(setup: adsk.cam.Setup, cam: adsk.cam.CAM):
    # Define and create the arrange operation.
    showMessage('Generating Additive Arrange...')
    operationInput = setup.operations.createInput('additive_arrange')
    arrange = setup.operations.add(operationInput)

    parameter: adsk.cam.StringParameterValue = arrange.parameters.itemByName("arrange_arrangement_type").value
    parameter.value = 'Pack2D'

    # Specify the values to control the arrangement. All length units are centimeters.
    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_platform_clearance").value
    parameter.value = 0.7

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_frame_width").value
    parameter.value = 0.5

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_ceiling_clearance").value
    parameter.value = 0.5

    parameter: adsk.cam.FloatParameterValue = arrange.parameters.itemByName("arrange_object_spacing").value
    parameter.value = 1

    future = cam.generateToolpath(arrange)
    while (future.isGenerationCompleted == False):
        time.sleep(0.5)

def createSupports(templateLibrary: adsk.cam.CAMTemplateLibrary, occs: list[adsk.fusion.Occurrence], setup: adsk.cam.Setup, cam: adsk.cam.CAM):
    showMessage('Generating Supports...')
    # the second parameter can be any of the following:
    # - adsk.cam.LibraryLocations.Fusion360LibraryLocation
    # - adsk.cam.LibraryLocations.LocalLibraryLocation
    # - adsk.cam.LibraryLocations.CloudLibraryLocation
    # the third parameter is the folder name in the library
    # using the empty string for the root folder will search the templates in the top level folder instead
    # the fourth parameter is the substring to search for in the template name
    pickedTemplate = getTemplateFromLibrary(templateLibrary, adsk.cam.LibraryLocations.Fusion360LibraryLocation, "supports", "SLA - Braced Bar Support")
    if pickedTemplate is None:
        showMessage('No support template found.')
        return
    supportTemplateInput = adsk.cam.CreateFromCAMTemplateInput.create()
    supportTemplateInput.camTemplate = pickedTemplate

    supports = setup.createFromCAMTemplate2(supportTemplateInput)
    if len(supports) == 0:
        showMessage('No supports created.')
        return

    for support in supports:
        parameterName = 'supportTarget'
        if (support.parameters.itemByName('supportTarget') == None):
            parameterName = 'supportTargetModel'
        supportParam = support.parameters.itemByName(parameterName)
        supportParam.value.value = occs
        support.isLightBulbOn = True

    future = cam.generateToolpath(supports[0])
    while (future.isGenerationCompleted == False):
        time.sleep(0.5)

    for support in supports:
        if support.hasError:
            showMessage(f'Support generation failed for object {support.name}: {support.errorMessage}')
            support.deleteMe()

    for i in range(setup.children.count):
        op = setup.children.item(i)
        if (op and op.strategy == "additive_support_folder"):
            op.isLightBulbOn = True
            break

# Event handler that reacts to when the command is executed.
class MyCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Make sure the TEXT COMMAND palette is visible.
            textPalette = ui.palettes.itemById('TextCommands')
            if not textPalette.isVisible:
                textPalette.isVisible = True
                adsk.doEvents()

            doc = app.activeDocument
            products = doc.products

            # Make
            camWS = ui.workspaces.itemById('CAMEnvironment')
            camWS.activate()
            cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))

            # Design creation
            designWS = ui.workspaces.itemById('FusionSolidEnvironment')
            designWS.activate()
            design = adsk.fusion.Design.cast(products.itemByProductType("DesignProductType"))
            camWS.activate()

            libraryManager = adsk.cam.CAMManager.get().libraryManager
            templateLibrary = libraryManager.templateLibrary

            # The block below is the gist of this script.
            # Each method can be edited to fit the user's needs.
            (manufacturingModel, occs) = createManufacturingModel(cam)
            if manufacturingModel is None:
                return

            setup: adsk.cam.Setup = createAdditiveSetup(occs, cam, libraryManager)

            machineElements = setup.machine.elements
            machineDimsList: adsk.cam.AdditivePlatformMachineElement = machineElements.itemsByType(adsk.cam.AdditivePlatformMachineElement.staticTypeId())
            machineDims = machineDimsList[0]
            origin = machineDims.origin
            machineSize = machineDims.size

            maxPointX = - origin.x + machineSize.x

            createOrientations(templateLibrary, occs, setup, cam)
            createAdditiveArrange(setup, cam)

            curatedOccs = []
            for occ in occs:
                if occ.preciseBoundingBox.minPoint.x <= maxPointX:
                    curatedOccs.append(occ)

            createSupports(templateLibrary, curatedOccs, setup, cam)

            ui.activeSelections.clear()
            ui.activeSelections.add(setup)

            app.activeViewport.fit()

            showMessage('Finished.')
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler that reacts to when the command is destroyed. This terminates the script if this has not happened before in an exception.
class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # When the command is done, terminate the script
            showMessage('Script is terminating.')
            adsk.terminate()
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
            adsk.terminate()

# Event handler that reacts when the command definition 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)

            onExecute = MyCommandExecuteHandler()
            cmd.execute.add(onExecute)
            handlers.append(onExecute)

            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            handlers.append(onDestroy)
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        global app, ui

        # Get the existing command definition or create it if it doesn't already exist.
        cmdDef = ui.commandDefinitions.itemById('SLAExampleScript')
        if not cmdDef:
            cmdDef = ui.commandDefinitions.addButtonDefinition('SLAExampleScript', 'SLA Example Script', 'Sample to demonstrate a workflow for SLA printers.')

        # Connect to the command created event.
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        handlers.append(onCommandCreated)

        # Execute the command definition.
        cmdDef.execute()

        # Keeps the script alive until it is terminated by the onDestroy event.
        adsk.autoTerminate(False)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Given an occurrence, this finds all child occurrences that contain either a
# B-Rep or Mesh body. It is recursive, so it will find all occurrences at all levels.
def getValidOccurrences(occurrence: adsk.fusion.Occurrence) -> list[adsk.fusion.Occurrence]:
    result = []
    for childOcc in occurrence.childOccurrences:
        if (childOcc.bRepBodies.count + childOcc.component.meshBodies.count  > 0):
            result.append(childOcc)

        result.extend(getValidOccurrences(childOcc))

    return result

def showMessage(message):
    app.log(message)

    # Give control back to Fusion, so it can update the UI.
    adsk.doEvents()


Avoid Machine Surface Settings API Sample

Description

This sample script demonstrates how to use Machine/Avoid/Gouge/Fixture functionality.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a curved surface with a through slot, a countersunk hole and a raised, circular and filleted upstand from the surface. The model is supported by two rectangular blocks, themselves mounted on a fixture plate. A setup is included with a single operation running a 3-axis diagonal raster over the model, supports and fixture. The operation machines the fixture, the supporting blocks, the upper surface of the upstand and the area within the slot and hole, something we would like to avoid.

The script duplicates the original operation and then proceeds to create a series of MachineAvoidGroups. These are labelled as either Machine in the case of 2 cap surfaces for the slot and hole, Fixture for the fixture plate, Gouge for the supporting blocks and Avoid for the top face of the upstand. Additionally, both AxialOffset and RadialOffset can be specified for the Machine, Avoid and Fixture passes.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback

dupName = 'Avoid/Machine using API'
information = f"""
This sample script demonstrates Machine/Avoid/Gouge/Fixture functionality.
Move this dialog to one side and notice the following about the default operation:

    The existing operation machines the top face (yellow) and within the slot and hole.
    The supporting blocks (red) and the fixture plate (purple) are needlessly machined.
    We want it to avoid machining the top face, the fixture and within the slot and hole.
    Cap surfaces are provided for the slot and hole (colored green when set to visible).
    The mounting blocks are designated sacrificial so we can machine vertical walls fully.

To achieve this, we duplicate the first operation and assign labels to surface groups.
Both radial and axial “stock-to-leave” values can also be applied.

Acknowledge this dialog and select the operation named "{dupName}"
to see the new improved tool path.
"""

#################### Global Variables ####################
_app = adsk.core.Application.get()
_ui = _app.userInterface
_machineAvoidGroups: adsk.cam.MachineAvoidGroups = None
_cam: adsk.cam.CAM = None
_design: adsk.fusion.Design = None

# This URN should point to the project beneath the CAM Samples folder.
PROJECT_URN = 'urn:adsk.wipprod:fs.file:vf.rxjQ68iyTN2ui31aDQULDw?version=1' # MachineAvoidAfter.

# Map the strategies to surface colors for a clearer indication.
modes = ['Avoid', 'Machine', 'Gouge', 'Fixture']
modeColor: dict[str, adsk.core.Color] = {
    modes[adsk.cam.MachiningMode.Avoid_MachiningMode]:      adsk.core.Color.create(255, 255, 113, 30), # Yellow
    modes[adsk.cam.MachiningMode.Machine_MachiningMode]:    adsk.core.Color.create(104, 255,   0, 30), # Green
    modes[adsk.cam.MachiningMode.Gouge_MachiningMode]:      adsk.core.Color.create(204,  51,  51, 30), # Red
    modes[adsk.cam.MachiningMode.Fixture_MachiningMode]:    adsk.core.Color.create(180, 120, 255, 30), # Purple
}

# The main script function.
def run(context):
    global _cam, _design, _machineAvoidGroups
    try:

        # Load by URN a specific sample project that demonstrates machine/avoid/ignore/gouge.
        doc = loadProjectFromURN(PROJECT_URN)
        if doc is None:
            return
        products = doc.products

        # Switch to the manufacturing workspace (CAM environment).
        camWS = _app.userInterface.workspaces.itemById('CAMEnvironment')
        camWS.activate()
        _cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))

        # Get the CAD product.
        _design = products.itemByProductType('DesignProductType')

        setups = _cam.setups

        # Ensure the document contains a Setup and then use the 1st setup in the document.
        if setups.count > 0:
            setup = setups.item(0)
        else:
            userMessageBox('This script requires that there is a Setup in the Fusion Document', True)
            return

        operations = setup.operations

        # Remove all but the first operation as this script is not using the intended sample model
        for opNum in range(1,operations.count):
            operations.item(opNum).deleteMe()

        # Duplicate the first operation in the setup.
        if operations.count > 0:
            opOriginal = operations.item(0)
        else:
            userMessageBox('This script requires that there is an existing operation in the Setup.', True)
            return

        opOriginal.isLightBulbOn = True
        opOriginal.duplicate()
        opDuplicate = operations.item(1)
        opDuplicate.name = dupName
        _app.log(f'The toolpath "{opOriginal.name}" has been duplicated and then renamed as "{opDuplicate.name}"')

        # Get the "checkSurfaceSelectionSets" parameter from the operation, which is a CadFaceGroups cad object.
        surfaceGroupsParam: adsk.cam.CadMachineAvoidGroupsParameterValue = opDuplicate.parameters.itemByName('checkSurfaceSelectionSets').value

        # Get the MachineAvoidGroups object from the CadFaceGroups cad object. This object manages the list of mutually exclusive groups.
        _machineAvoidGroups = surfaceGroupsParam.getMachineAvoidGroups()

        # Create a Machine group comprising the two green coloured caps over the curved surface. Not visible by default.
        if not createMachineAvoidGroup('Selection Set3', adsk.cam.MachiningMode.Machine_MachiningMode, 0.2, 0.1):
            return

        # Create an Avoid group comprising the yellow coloured uppermost horizontal face.
        if not createMachineAvoidGroup('Selection Set1', adsk.cam.MachiningMode.Avoid_MachiningMode, 0.05, 0.02):
            return

        # Create a Fixture group comprising the purple coloured base block.
        if not createMachineAvoidGroup('fixture_base', adsk.cam.MachiningMode.Fixture_MachiningMode, 5.0, 0.6):
            return

        # Create an Ignore/Gouge group comprising the 1st red colored sacrificial support block.
        if not createMachineAvoidGroup('sacrificial_block1', adsk.cam.MachiningMode.Gouge_MachiningMode):
            return

        # Create an Ignore/Gouge group comprising the 2nd red colored sacrificial support block.
        if not createMachineAvoidGroup('sacrificial_block2', adsk.cam.MachiningMode.Gouge_MachiningMode):
            return

        # Add the groups back to the parameter.
        surfaceGroupsParam.applyMachineAvoidGroups(_machineAvoidGroups)

        # Explain what has happened and how to see the result
        userMessageBox(information)

        # Generate the operation.
        _cam.generateToolpath(opDuplicate)

        # Display the new toolpath - this is ineffective - user needs to select the path themselves.
        opOriginal.isLightBulbOn = False
        opDuplicate.isLightBulbOn = True
        opDuplicate.isToolpathVisible = True

        # Give control back to Fusion so it can update the graphics.
        adsk.doEvents()
        return

    except Exception as e:
        userMessageBox(f'Failed:: {e}\n{traceback.format_exc()}', True)

#################### Functions ####################

def createMachineAvoidGroup(name: str, mode: adsk.cam.MachiningMode, axialOffset: float = None, radialOffset: float = None):
    '''Create a Machine/Avoid group of the specified mode and name using the stated offsets if applicable'''
    machineAvoidGroup: adsk.cam.MachineAvoidDirectSelection = _machineAvoidGroups.createNewMachineAvoidDirectSelectionGroup()
    machineAvoidGroup.machineMode = mode

    # Gouge groups require no offsets to be specified.
    if mode != adsk.cam.MachiningMode.Machine_MachiningMode:
        if radialOffset is not None:
            machineAvoidGroup.radialOffset = radialOffset
        if axialOffset is not None:
            machineAvoidGroup.axialOffset = axialOffset

    if mode == adsk.cam.MachiningMode.Machine_MachiningMode or mode == adsk.cam.MachiningMode.Avoid_MachiningMode:
        faceSelSet = _design.selectionSets.itemByName(name)
        if faceSelSet:
            machineAvoidGroup.inputGeometry = faceSelSet.entities
        else:
            userMessageBox(f'The Selection Set "{name}" does not exist in the current Fusion document', True)
            return False
    else:
        # Add the face/body/component to the exclusiveGroup selection.
        bodySelect = _cam.designRootOccurrence.bRepBodies.itemByName(name)
        if bodySelect:
            machineAvoidGroup.inputGeometry = getFacesAll(bodySelect)
        else:
            userMessageBox(f'The Body "{name}" does not exist in the current Fusion document', True)
            return False
    colorFaces(machineAvoidGroup.inputGeometry, mode)
    return True

def getFacesAll(body: adsk.fusion.BRepBody):
    ''' Adds all the faces in the selected body to a list '''
    allFaces: list[adsk.fusion.BRepFace] = []
    for face in body.faces:
         allFaces.append(face)
    return allFaces

def userMessageBox(messageText: str, isWarning: bool = False):
    ''' Keep messageBox calls informative but succinct'''
    iconType = adsk.core.MessageBoxIconTypes.WarningIconType if isWarning else adsk.core.MessageBoxIconTypes.InformationIconType
    _ui.messageBox(messageText, 'Fusion\t\t\t\t\t\t', adsk.core.MessageBoxButtonTypes.OKButtonType, iconType) # Title tabs widen messageBox.

def colorFaces(faces: list[adsk.fusion.BRepFace], mode: adsk.cam.MachiningMode):
    ''' Color specified BRepFaces '''
    modeName = modes[mode]
    for face in faces:
        # Check if "colorAppearance" already exists, if not, create it.
        appearances = _design.appearances
        colorAppearance = appearances.itemByName(modeName)

        if not colorAppearance:
            # Create a new appearance.
            appearanceLib: adsk.core.MaterialLibrary = _app.materialLibraries.itemById('BA5EE55E-9982-449B-9D66-9F036540E140')

            # Get the appearance using itemById as unlike itemByName it is not locale dependent.
            genericAppearance: adsk.core.Appearance = appearanceLib.appearances.itemById('Prism-129')

            # Clone the generic appearance.
            colorAppearance: adsk.core.Appearance = appearances.addByCopy(genericAppearance, modeName)

            # Get the 'Color' property using itemById as unlike itemByName it is not locale dependent.
            colorProperty: adsk.core.Property = colorAppearance.appearanceProperties.itemById('opaque_albedo')

            # Set the color of the appearance.
            colorProperty.value = modeColor[modeName]

        # Apply the appearance to the body.
        face.appearance = colorAppearance

    # Give control back to Fusion so it can update the graphics.
    adsk.doEvents()

def loadProjectFromURN(urn:str = None) -> adsk.core.Document:
    ''' Minimal self-contained function to load and return a document via URN or return None safely '''
    doc: adsk.core.Document = None
    app = adsk.core.Application.get()
    if urn is not None:
        try: # File not found causes an exception
            project: adsk.core.DataFile = app.data.findFileById(urn)
            if project:
                doc = app.documents.open(project, True)
            else:
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
        except Exception as e:
            if str(e)[0:38] == '3 : Design is located in another team.':
                # Although the document has been loaded, variable 'doc' may not be populated
                if doc is None:
                    doc: adsk.core.Document = adsk.core.Application.get().activeDocument
            elif str(e)[0:20] == '3 : file not found':
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
            else:
                # Abandon for unhandled errors, displaying the error message.
                app.userInterface.messageBox(f'Failed:{str(e)}\n{traceback.format_exc()}')
    return doc


Basic Milling Workflow Sample

Description

Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.

Code Samples

  • C++
  • Python
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <Cam/CamAll.h>
#include <chrono>
#include <thread>
#include <algorithm>

#ifdef _WINDOWS
#include <shlwapi.h>
#else
#include <stdlib.h>
#endif

using namespace adsk::core;
using namespace adsk::fusion;
using namespace adsk::cam;

extern "C" XI_EXPORT bool run(const char* context)
{
    // Initialisation
    Ptr<Application> app = Application::get();
    Ptr<UserInterface> ui = app->userInterface();
    Ptr<Document> doc = nullptr;

    // Load by URN a specific sample project to demonstrate a basic milling workflow.
    std::string urn = "urn:adsk.wipprod:fs.file:vf.KoBHzV4mTOiNvFStiBwpzA?version=1"; // Production

    // Load 2D Strategies model from the Fusion CAM Samples folder
    Ptr<DataFile> sampleFile = app->data()->findFileById(urn);
    if (sampleFile)
    {
        doc = app->documents()->open(sampleFile, true);
    }

    // Did we find our document?
    if (!doc)
    {
        ui->messageBox("Sample file not found, using the current document.", "", MessageBoxButtonTypes::OKButtonType);

        // Use existing document, load 2D Strategies model from the Fusion CAM Samples folder
        doc = app->activeDocument();
    }

    // Switch to manufacturing space
    Ptr<Workspace> camWS = ui->workspaces()->itemById("CAMEnvironment");
    camWS->activate();

    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;
    }

    // Find tools in sample tool library

    // Get the tool libraries from the library manager
    Ptr<CAMManager> camManager = CAMManager::get();
    Ptr<CAMLibraryManager> libraryManager = camManager->libraryManager();
    Ptr<ToolLibraries> toolLibraries = libraryManager->toolLibraries();

    // We can use a library URl directly if we know its address (here we use Fusion"s Metric sample library)
    Ptr<URL> toolLibraryUrl = URL::create("systemlibraryroot://Samples/Milling Tools (Metric).json");

    // Load tool library
    Ptr<ToolLibrary> toolLibrary = toolLibraries->toolLibraryAtURL(toolLibraryUrl);
    if (!toolLibrary)
    {
        ui->messageBox("Failed to load tool library");
        return false;
    }

    // Create some variables for the milling tools which will be used in the operations
    Ptr<Tool> faceTool = nullptr;
    Ptr<Tool> adaptiveTool = nullptr;

    // Searching the face mill and the bull nose using a loop for the roughing operations
    for (Ptr<Tool>& tool : toolLibrary)
    {
        // Read the tool type
        Ptr<ChoiceParameterValue> toolTypeParameter = tool->parameters()->itemByName("tool_type")->value();
        std::string toolType = toolTypeParameter->value();

        // Select the first face tool found
        if (toolType == "face mill" && !faceTool)
        {
            faceTool = tool;
        }

        // Search the roughing tool
        else if (toolType == "bull nose end mill" && !adaptiveTool)
        {
            // We look for a bull nose end mill tool larger or equal to 10mm but less than 14mm
            Ptr<FloatParameterValue> diameterParameter = tool->parameters()->itemByName("tool_diameter")->value();
            double diameter = diameterParameter->value();
            if (diameter >= 1.0 && diameter < 1.4)
            {
                adaptiveTool = tool;
            }
        }

        // Exit when the 2 tools are found
        if (faceTool && adaptiveTool)
        {
            break;
        }
    }

    if (!faceTool)
    {
        ui->messageBox("No face mill tool found");
        return false;
    }
    if (!adaptiveTool)
    {
        ui->messageBox("No bull nose end mill tool found");
        return false;
    }

    // Create setup
    Ptr<CAM> cam = products->itemByProductType("CAMProductType");
    Ptr<Setups> setups = cam->setups();
    Ptr<SetupInput> setupInput = setups->createInput(OperationTypes::MillingOperation);

    // Create a list for the models to add to the setup Input
    std::vector<Ptr<Base>> models;
    Ptr<BRepBody> part = cam->designRootOccurrence()->bRepBodies()->item(0);
    if (!part)
    {
        ui->messageBox(
            "No part found in the current document, exiting sample script.", "", MessageBoxButtonTypes::OKButtonType);
        return false;
    }
    // Add the part to the model list
    models.push_back(part);
    // Pass the model list to the setup input
    setupInput->models(models);
    // Create the setup
    Ptr<Setup> setup = setups->add(setupInput);
    // Change some properties of the setup
    setup->name() = "CAM Basic Script Sample";
    setup->stockMode(SetupStockModes::RelativeBoxStock);
    // Set offset mode
    setup->parameters()->itemByName("job_stockOffsetMode")->expression("'simple'");
    // Set offset stock side
    setup->parameters()->itemByName("job_stockOffsetSides")->expression("0 mm");
    // Set offset stock top
    setup->parameters()->itemByName("job_stockOffsetTop")->expression("2 mm");
    // Set setup origin
    Ptr<ChoiceParameterValue> wcs_origin_boxPoint = setup->parameters()->itemByName("wcs_origin_boxPoint")->value();
    wcs_origin_boxPoint->value("top 1");

    // Face operation

    // Create a face operation input
    Ptr<OperationInput> faceInput = setup->operations()->createInput("face");
    faceInput->tool(faceTool);
    faceInput->displayName("Face Operation");
    faceInput->parameters()->itemByName("tolerance")->expression("0.01 mm");
    faceInput->parameters()->itemByName("stepover")->expression("0.75 * tool_diameter");
    faceInput->parameters()
        ->itemByName("direction")
        ->expression("'climb'"); // Must be single quotes inside double quotes

    // Add the operation to the setup
    Ptr<Operation> faceOp = setup->operations()->add(faceInput);

    // Adaptive operation
    Ptr<OperationInput> adaptiveInput = setup->operations()->createInput("adaptive");
    adaptiveInput->tool(adaptiveTool);
    adaptiveInput->displayName("Adaptive Roughing");
    adaptiveInput->parameters()->itemByName("tolerance")->expression("0.1 mm");
    adaptiveInput->parameters()->itemByName("maximumStepdown")->expression("5 mm");
    adaptiveInput->parameters()->itemByName("fineStepdown")->expression("0.25 * maximumStepdown");
    adaptiveInput->parameters()->itemByName("flatAreaMachining")->expression("false");

    // Add the operation to the setup
    Ptr<Operation> adaptiveOp = setup->operations()->add(adaptiveInput);

    // Generate operations
    cam->generateToolpath(faceOp);
    Ptr<GenerateToolpathFuture> genFuture = cam->generateToolpath(adaptiveOp);

    // ncProgram and post-processing

    // Get the post library from library manager
    Ptr<PostLibrary> postLibrary = libraryManager->postLibrary();

    // Query post library to get postprocessor list
    Ptr<PostConfigurationQuery> postQuery = postLibrary->createQuery(LibraryLocations::Fusion360LibraryLocation);
    postQuery->vendor("Autodesk");
    postQuery->capability(PostCapabilities::Milling);
    std::vector<Ptr<PostConfiguration>> postConfigs = postQuery->execute();

    Ptr<URL> importedURL;
    std::string ncExtension;
    // Find the "XYZ" post in the post library and import it to local library
    for (Ptr<PostConfiguration>& config : postConfigs)
    {
        if (config->description() == "XYZ")
        {
            ncExtension = config->extension();
            Ptr<URL> configUrl = URL::create("user://");
            importedURL = postLibrary->importPostConfiguration(config, configUrl, "NCProgramSamplePost.cps");
            break;
        }
    }

    // Get the imported local post config
    Ptr<PostConfiguration> postConfig = postLibrary->postConfigurationAtURL(importedURL);

    // Create NCProgramInput object
    Ptr<NCProgramInput> ncInput = cam->ncPrograms()->createInput();
    ncInput->displayName("NC Program Sample");

    // Change some nc program parameters...
    Ptr<CAMParameters> ncParameters = ncInput->parameters();

    Ptr<StringParameterValue> nc_program_filename = ncParameters->itemByName("nc_program_filename")->value();
    nc_program_filename->value("NCProgramSample");

    Ptr<BooleanParameterValue> nc_program_openInEditor = ncParameters->itemByName("nc_program_openInEditor")->value();
    nc_program_openInEditor->value(true);

    // Set temp directory as output directory
    std::string outputFolder = cam->temporaryFolder();

    // Variable outputFolder may contain backslashes but nc_program_output_folder requires forward slashes
    std::replace_if(
        outputFolder.begin(), outputFolder.end(), [](char ch) { return ch == '\\'; }, '/');

    Ptr<StringParameterValue> nc_program_output_folder = ncParameters->itemByName("nc_program_output_folder")->value();
    nc_program_output_folder->value(outputFolder);

    // Select the operations to generate (we skip steep_and_shallow here)
    ncInput->operations({faceOp, adaptiveOp});

    // Add a new ncprogram from the ncprogram input
    Ptr<NCProgram> newProgram = cam->ncPrograms()->add(ncInput);

    // Set post processor
    newProgram->postConfiguration(postConfig);

    // Change some post parameter
    Ptr<CAMParameters> postParameters = newProgram->postParameters();

    // NcProgram parameters are passed without units to the postprocessor
    Ptr<FloatParameterValue> builtin_tolerance = postParameters->itemByName("builtin_tolerance")->value();
    builtin_tolerance->value(0.01);

    Ptr<FloatParameterValue> builtin_minimumChordLength =
        postParameters->itemByName("builtin_minimumChordLength")->value();
    builtin_minimumChordLength->value(0.33);

    // Update/apply post parameters
    newProgram->updatePostParameters(postParameters);

    // Post-process
    // Set post options, by default post process only valid operations containing toolpath data
    Ptr<NCProgramPostProcessOptions> postOptions = NCProgramPostProcessOptions::create();

    // Ensure toolpaths are visible
    faceOp->isLightBulbOn(true);
    adaptiveOp->isLightBulbOn(true);

    // To avoid errors, post-process only when toolpath generation has completed
    if (!genFuture)
        return false;
    while (!genFuture->isGenerationCompleted())
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(1));
    }
    newProgram->postProcess(postOptions);

    // Advise where the NC file is located to indicate completion
    ui->messageBox(
        "The result has been written to:\n" + outputFolder + "/" + nc_program_filename->value() + ncExtension,
        "Post processing is complete  \t\t\t\t\t");

    return true;
}
import adsk.core, adsk.fusion, adsk.cam, traceback
import time

def run(context):
    ui = None
    try:

        #################### Initialisation #####################
        app = adsk.core.Application.get()
        ui  = app.userInterface

        PROJECT_URN = 'urn:adsk.wipprod:fs.file:vf.KoBHzV4mTOiNvFStiBwpzA?version=1' # Production

        # Load by URN a specific sample project to demonstrate a basic milling workflow.
        doc = loadProjectFromURN(PROJECT_URN)
        if doc is None:
            return

        # Switch to manufacturing space
        camWS: adsk.core.Workspace = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the CAM product
        products: adsk.core.Products = doc.products

        #################### Find tools in sample tool library ####################
        # Get the tool libraries from the library manager
        camManager = adsk.cam.CAMManager.get()
        libraryManager: adsk.cam.CAMLibraryManager = camManager.libraryManager
        toolLibraries: adsk.cam.ToolLibraries = libraryManager.toolLibraries

        # We can use a library URl directly if we know its address (here we use Fusion's Metric sample library)
        url = adsk.core.URL.create('systemlibraryroot://Samples/Milling Tools (Metric).json')

        # Load tool library
        toolLibrary: adsk.cam.ToolLibrary = toolLibraries.toolLibraryAtURL(url)

        # Create some variables for the milling tools which will be used in the operations
        faceTool: adsk.cam.Tool = None
        adaptiveTool: adsk.cam.Tool = None

        # Searching the face mill and the bull nose using a loop for the roughing operations
        for tool in toolLibrary:
            # Read the tool type
            toolType = tool.parameters.itemByName('tool_type').value.value

            # Select the first face tool found
            if toolType == 'face mill' and not faceTool:
                faceTool = tool

            # Search the roughing tool
            elif toolType == 'bull nose end mill' and not adaptiveTool:
                # We look for a bull nose end mill tool larger or equal to 10mm but less than 14mm
                diameter = tool.parameters.itemByName('tool_diameter').value.value
                if diameter >= 1.0 and diameter < 1.4:
                    adaptiveTool = tool

            # Exit when the 2 tools are found
            if faceTool and adaptiveTool:
                break

        #################### Create setup ####################
        cam: adsk.cam.CAM = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
        setups: adsk.cam.Setups = cam.setups
        setupInput: adsk.cam.SetupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)
        # Create a list for the models to add to the setup Input
        models = []

        # Identify the part or exit gracefully
        try:
            part: adsk.fusion.BRepBody = cam.designRootOccurrence.bRepBodies.item(0)
        except Exception as e:
            ui.messageBox('No part found in the current document, exiting sample script.')
            return

        # Add the part to the model list
        models.append(part)
        # Pass the model list to the setup input
        setupInput.models = models
        # Create the setup
        setup: adsk.cam.Setup = setups.add(setupInput)
        # Change some properties of the setup
        setup.name = 'CAM Basic Script Sample'
        setup.stockMode = adsk.cam.SetupStockModes.RelativeBoxStock
        # Set offset mode
        setup.parameters.itemByName('job_stockOffsetMode').expression = "'simple'"
        # Set offset stock side
        setup.parameters.itemByName('job_stockOffsetSides').expression = '0 mm'
        # Set offset stock top
        setup.parameters.itemByName('job_stockOffsetTop').expression = '2 mm'
        # Set setup origin
        setup.parameters.itemByName('wcs_origin_boxPoint').value.value = 'top 1'

        #################### Face operation ####################
        # Create a face operation input
        faceInput: adsk.cam.OperationInput = setup.operations.createInput('face')
        faceInput.tool = faceTool
        faceInput.displayName = 'Face Operation'
        faceInput.parameters.itemByName('tolerance').expression = '0.01 mm'
        faceInput.parameters.itemByName('stepover').expression = '0.75 * tool_diameter'
        faceInput.parameters.itemByName('direction').expression = "'climb'"

        # Add the operation to the setup
        faceOp: adsk.cam.OperationBase = setup.operations.add(faceInput)

        #################### Adaptive operation ####################
        adaptiveInput = setup.operations.createInput('adaptive')
        adaptiveInput.tool = adaptiveTool
        adaptiveInput.displayName = 'Adaptive Roughing'
        adaptiveInput.parameters.itemByName('tolerance').expression = '0.1 mm'
        adaptiveInput.parameters.itemByName('maximumStepdown').expression = '5 mm'
        adaptiveInput.parameters.itemByName('fineStepdown').expression = '0.25 * maximumStepdown'
        adaptiveInput.parameters.itemByName('flatAreaMachining').expression = 'false'

        # Add the operation to the setup
        adaptiveOp: adsk.cam.OperationBase = setup.operations.add(adaptiveInput)

        ##################### Generate operations ####################
        cam.generateToolpath(faceOp)
        genFuture: adsk.cam.GenerateToolpathFuture = cam.generateToolpath(adaptiveOp)

        #################### ncProgram and post-processing ####################
        # Get the post library from library manager
        postLibrary: adsk.cam.PostLibrary = libraryManager.postLibrary

        # Query post library to get postprocessor list
        libraryLocation = adsk.cam.LibraryLocations.Fusion360LibraryLocation
        postQuery: adsk.cam.PostConfigurationQuery = postLibrary.createQuery(libraryLocation)
        postQuery.vendor = "Autodesk"
        postQuery.capability = adsk.cam.PostCapabilities.Milling
        postConfigs: list[adsk.cam.PostConfiguration] = postQuery.execute()

        # Find the "XYZ" post in the post library and import it to local library
        ncExtension = ''
        for config in postConfigs:
            if config.description == 'XYZ':
                ncExtension = config.extension
                url = adsk.core.URL.create("user://")
                importedURL = postLibrary.importPostConfiguration(config, url, "NCProgramSamplePost.cps")

        # Get the imported local post config
        postConfig: adsk.cam.PostConfiguration = postLibrary.postConfigurationAtURL(importedURL)

        # Create NCProgramInput object
        ncInput: adsk.cam.NCProgramInput = cam.ncPrograms.createInput()
        ncInput.displayName = 'NC Program Sample'

        # Change some nc program parameters...
        ncFilename = 'NCProgramSample'
        ncParameters: adsk.cam.CAMParameters = ncInput.parameters
        ncParameters.itemByName('nc_program_filename').value.value = ncFilename
        ncParameters.itemByName('nc_program_openInEditor').value.value = True
        ncParameters.itemByName('nc_program_nc_extension').value.value = ncExtension

        # Set temp directory as output directory
        # Make the path valid for Fusion by replacing \\ to / in the path
        outputFolder = str(cam.temporaryFolder).replace('\\', '/')
        ncParameters.itemByName('nc_program_output_folder').value.value = outputFolder

        # Select the operations to generate
        ncInput.operations = [faceOp, adaptiveOp]

        # Add a new ncprogram from the ncprogram input
        newProgram: adsk.cam.NCProgram = cam.ncPrograms.add(ncInput)

        # Set post processor
        newProgram.postConfiguration = postConfig

        # Change some post parameters
        postParameters: adsk.cam.CAMParameters = newProgram.postParameters

        # NcProgram parameters are passed without units to the postprocessor
        postParameters.itemByName('builtin_tolerance').value.value = 0.01
        postParameters.itemByName('builtin_minimumChordLength').value.value = 0.33

        # Update/apply post parameters
        newProgram.updatePostParameters(postParameters)

        # Post-process
        # Set post options, by default post process only valid operations containing toolpath data
        postOptions = adsk.cam.NCProgramPostProcessOptions.create()

        # Ensure toolpaths are visible
        faceOp.isLightBulbOn = True
        adaptiveOp.isLightBulbOn = True

        # To avoid errors, post-process only when toolpath generation has completed
        while not genFuture.isGenerationCompleted:
            time.sleep(1)
        newProgram.postProcess(postOptions)

        # Advise where the NC file is located to indicate completion
        ui.messageBox(f'The results have been written to:\n{outputFolder}/{ncFilename}{ncExtension}',
                     'Post processing is complete  \t\t\t\t\t'); # Prevent line breaks of the pathname

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def loadProjectFromURN(urn:str = None) -> adsk.core.Document:
    ''' Minimal self-contained function to load and return a document via URN or return None safely '''
    doc: adsk.core.Document = None
    app = adsk.core.Application.get()
    if urn is not None:
        try: # File not found causes an exception
            project: adsk.core.DataFile = app.data.findFileById(urn)
            if project:
                doc = app.documents.open(project, True)
            else:
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
        except Exception as e:
            if str(e)[0:38] == '3 : Design is located in another team.':
                # Although the document has been loaded, variable 'doc' may not be populated
                if doc is None:
                    doc: adsk.core.Document = adsk.core.Application.get().activeDocument
            elif str(e)[0:20] == '3 : file not found':
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
            else:
                # Abandon for unhandled errors, displaying the error message.
                app.userInterface.messageBox(f'Failed:{str(e)}\n{traceback.format_exc()}')
    return doc


CAM Parameter Modification API Sample

Description

Demonstrates changing parameters of existing toolpaths.

Code Samples

  • Python
  • C++
import adsk.core, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        doc = app.activeDocument
        products = doc.products

        # Get the CAM product
        cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))

        # List of all setups
        setups = cam.setups

        for setup in setups:
            # Change the program name of each setup to 1234
            programNameParam = setup.parameters.itemByName('job_programName')
            programNameParam.expression = "1234"

            for operation in setup.operations:
                # Change tolerance in all operations
                toleranceParam = operation.parameters.itemByName('tolerance')
                toleranceParam.expression = "0.1mm"

        # Generate all toolpaths, skipping any that are already valid
        cam.generateAllToolpaths(True)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <CAM/CAMAll.h>

using namespace adsk::core;
using namespace adsk::cam;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Document> doc = Application::get()->activeDocument();
    Ptr<CAM> cam = doc->products()->itemByProductType("CAMProductType");

    // List of CAM setups
    Ptr<Setups> setups = cam->setups();

    for each (Ptr<Setup> setup in setups)
    {
        // Change the program name for each setup
        setup->parameters()->itemByName("job_programName")->expression("12345");
        for each (Ptr<Operation> operation in setup->allOperations())
        {
            // Change the tolerance of each operation
            operation->parameters()->itemByName("tolerance")->expression("0.1mm");
        }
    }

    // Generate all toolpaths
    cam->generateAllToolpaths(true);

    return true;
}


Create Engravings Selection Sets API Sample

Description

This sample script demonstrates how to find and machine engravings in the Z+ direction using pocket recognition.

The script will first open an example model via its URN. Using pocket recognition, it will identify pockets that may be engravings based on their dimensions.

We assume here that an engraving pocket is:

  • Made with a flat bottom face and no fillet.
  • A closed pocket.
  • Have a Z height less than 2 mm

We demonstrate creating selection sets in both design and manufacture workspaces and use one of the selection sets as an operation geometry selection input to generate an engraving operation.

The engraving toolpath can be seen by expanding the setup and selecting the operation.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback

PROJECT_URN = 'urn:adsk.wipprod:fs.file:vf.XhO3KCCLTUi83YJLaAiCRg?version=1'
TOOL_LIBRARY_URN = 'systemlibraryroot://Samples/Milling Tools (Metric).json'

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Open document by its URN.
        doc = loadProjectFromURN(PROJECT_URN)
        if doc is None:
            return

        # Switch to the manufacturing space.
        camWS = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the cam product.
        products = doc.products
        cam: adsk.cam.CAM = products.itemByProductType('CAMProductType')

        # Get the design product.
        design: adsk.fusion.Design = products.itemByProductType('DesignProductType')

        ############# Find design and manufacturins bRepBodies #############

        # Get the first body of the design root component.
        designBody = design.rootComponent.bRepBodies.item(0)

        # Find the equivalent body in manufacturing space.
        comp = designBody.parentComponent
        camBody: adsk.fusion.BRepBody = None
        for body in cam.designRootOccurrence.bRepBodies:
            if body.parentComponent.name == comp.name:
                camBody = body
                break

        ############# Find engravings using pocket recognition #############

        # Define recognition vector: recognize pockets on top side (Z- view direction).
        searchVector = adsk.core.Vector3D.create(0, 0, -1)

        # Recognize any pockets in the design body.
        recognizedPockets = adsk.cam.RecognizedPocket.recognizePockets(designBody, searchVector)

        # Identify pockets that may be engravings based on their dimensions.
        # We assume here that an engraving pocket is:
        #  - made of a flat bottom face (no fillet or such)
        #  - must be a closed pocket
        #  - Z height is less than 2 mm
        POCKET_MAX_DEPTH = 0.2

        engravingFeatures: list[EngravingFeature] = []
        for recognizedPocket in recognizedPockets:
            # Pocket must be closed.
            if recognizedPocket.isClosed:
                # Check the pocket depth.
                if recognizedPocket.depth <= POCKET_MAX_DEPTH:
                    # Look only at flat types.
                    if recognizedPocket.bottomType == adsk.cam.RecognizedPocketBottomType.RecognizedPocketBottomTypeFlat:
                        # This pocket matches the requirements so adding it as an engraving.
                        engraving = EngravingFeature(designBody, recognizedPocket, searchVector)
                        engravingFeatures.append(engraving)

        ############# Create selections sets in design space #############

        # Create a list of all engraved bottom faces from design body.
        bottomFaces: list[adsk.fusion.BRepFace] = []
        for engraving in engravingFeatures:
            bottomFaces.extend(engraving.bottomFaces)

        # Add into the design space
        design.selectionSets.add(bottomFaces, '(design) Engravings bottom faces (all)')

        ############# Create selections sets in manufacturing space #############

        # Find the equivalent BRep face in the manufacturing space using tempID.
        bottomFacesInCam = findEquivalentFacesInManufacturingSpace(camBody, bottomFaces)
        # Add into the manufacturing space, using this selection set as operation geometry selection input also.
        engravingsBottomFacesSelectionSet = cam.selectionSets.add(bottomFacesInCam, '(cam) Engravings bottom faces (all)')

        ############# Create an operation using selections set data #############

        # Create a basic setup.
        setupInput = cam.setups.createInput(adsk.cam.OperationTypes.MillingOperation)
        setupInput.name = 'Sample setup with engraving operation'
        setupInput.models = [camBody]
        setup = cam.setups.add(setupInput)

        # Find an engraving tool from tool library using a query.
        toolLibraries = adsk.cam.CAMManager.get().libraryManager.toolLibraries
        url = adsk.core.URL.create(TOOL_LIBRARY_URN)
        toolLibrary = toolLibraries.toolLibraryAtURL(url)
        query = toolLibrary.createQuery()
        query.criteria.add('tool_type', adsk.core.ValueInput.createByString('chamfer mill'))
        query.criteria.add('tool_diameter.min', adsk.core.ValueInput.createByReal(0.4)) # 4 mm
        query.criteria.add('tool_diameter.max', adsk.core.ValueInput.createByReal(0.6)) # 6 mm
        results = query.execute()
        tools: list[adsk.cam.Tool] = []
        for result in results:
            tools.append(result.tool)
        engravingTool = tools[0] # We pick the first tool found.

        # Create an engraving operation.
        operationInput = setup.operations.createInput('engrave')
        operationInput.tool = engravingTool
        operationInput.displayName = 'Engraving Operation'
        operationInput.parameters.itemByName('topHeight_offset').expression = '1 mm'

        # Add the selection set data to the operationInput as a new face contour selection entry.
        cadContours2dParam: adsk.cam.CadContours2dParameterValue = operationInput.parameters.itemByName('contours').value
        curveSelections = cadContours2dParam.getCurveSelections()
        chain = curveSelections.createNewFaceContourSelection()
        chain.inputGeometry = engravingsBottomFacesSelectionSet.entities
        cadContours2dParam.applyCurveSelections(curveSelections)

        # Add the operationInput to the setup.
        setup.operations.add(operationInput)
        setup.operations.item(setup.operations.count-1).isLightBulbOn = True

        # Generate operation.
        cam.generateAllToolpaths(True)

        # Raise a done! message.
        ui.messageBox('- Selection Sets have been created in both design and manufacturing workspaces.\n' + \
                        '- An engraving operation has been created.',
                        'Fusion' + '\t' * 6, # Widen the messageBox width
                        adsk.core.MessageBoxButtonTypes.OKButtonType,
                        adsk.core.MessageBoxIconTypes.InformationIconType)

    except Exception as e:
        if ui:
            ui.messageBox(f'Failed: {e}\n{traceback.format_exc()}', 'Fusion',
                            adsk.core.MessageBoxButtonTypes.OKButtonType,
                            adsk.core.MessageBoxIconTypes.CriticalIconType)

def findEquivalentFacesInManufacturingSpace(camBody: adsk.fusion.BRepBody, designFaces: list[adsk.fusion.BRepFace]):
    ''' From given list of design faces, find the equivalent faces in a cam body using tempID '''
    camFaces: list[adsk.fusion.BRepFace] = []
    for face in designFaces:
        items = camBody.findByTempId(face.tempId)
        for item in items:
            if isinstance(item, adsk.fusion.BRepFace):
                camFaces.append(item)
    return camFaces

############# Engraving pocket feature object #############

class EngravingFeature():
    ''' Engraving pocket feature object (that can deal with bottom and wall faces extraction) '''
    def __init__(self, body: adsk.fusion.BRepBody, recognizedPocket: adsk.cam.RecognizedPocket, searchVector: adsk.core.Vector3D):
        self.__body = body
        self.__recognizedPocket = recognizedPocket
        self.__searchVector = searchVector
        self.__component = self.__body.parentComponent
        self.__wallFaces: list[adsk.fusion.BRepFace] = []
        self.__bottomFaces: list[adsk.fusion.BRepFace] = []
        # Extract the bottom and top faces when the object is created.
        self.__extractFaces()

    @property
    def wallFaces(self):
        ''' Return engraving pocket wall faces '''
        return self.__wallFaces

    @property
    def bottomFaces(self):
        ''' Return engraving pocket bottom faces '''
        return self.__bottomFaces

    def __extractFaces(self):
        ''' Extract pocket bottom and wall faces '''
        boundaries = self.__recognizedPocket.boundaries
        islands = self.__recognizedPocket.islands

        # Get the pocket boundary key points.
        points: list[adsk.core.Point3D] = []
        for boundary in boundaries:
            boundaryPoints = self.__getPointsFromCurve3DPath(boundary)
            points.extend(boundaryPoints)

        # Get any pocket island key points.
        for island in islands:
            islandPoints = self.__getPointsFromCurve3DPath(island)
            points.extend(islandPoints)

        # Extract the faces.
        self.__wallFaces = self.__getWallFaces(points)
        self.__bottomFaces = self.__getBottomFaces(points)

    def __getPointsFromCurve3DPath(self, curves: adsk.core.Curve3DPath):
        ''' Get a list of exact points on the curve 3D paths '''
        points: list[adsk.core.Point3D] = []
        for curve in curves:
            # Cast to get the actual segment type as casting returns None if the wrong object is passed.
            line3D = adsk.core.Line3D.cast(curve)
            arc3D = adsk.core.Arc3D.cast(curve)
            circle3D = adsk.core.Circle3D.cast(curve)
            ellipse3D = adsk.core.Ellipse3D.cast(curve)
            nurbsCurve3D = adsk.core.NurbsCurve3D.cast(curve)
            ellipticalArc3D = adsk.core.EllipticalArc3D.cast(curve)

            nurbs: adsk.core.NurbsCurve3D = None
            if line3D:
                nurbs = line3D.asNurbsCurve
            elif arc3D:
                nurbs = arc3D.asNurbsCurve
            elif circle3D:
                nurbs = circle3D.asNurbsCurve
            elif ellipse3D:
                nurbs = ellipse3D.asNurbsCurve
            elif nurbsCurve3D:
                nurbs = nurbsCurve3D.copy()
            elif ellipticalArc3D:
                nurbs = ellipticalArc3D.asNurbsCurve
            else:
                classType = curve.classType()
                raise Exception('Unsupported curve type: ' + classType)

            if nurbs:
                _, startPoint, endPoint = nurbs.evaluator.getEndPoints()
                # There is no need to add the end point as the start of the end of the curve is the start of the next one...
                points.append(startPoint)

        return points

    def __getBottomFaces(self, points: list[adsk.core.Point3D]):
        ''' Search the pocket bottom faces using the provided boundary points '''
        faces: list[adsk.fusion.BRepFace] = []
        for point in points:
            breps = self.__component.findBRepUsingPoint(point, adsk.fusion.BRepEntityTypes.BRepFaceEntityType, -1, True)
            for brep in breps:
                # Cast so we have a nicely typed object.
                brep = adsk.fusion.BRepFace.cast(brep)
                # Filter to find only the wall faces where the normal is parallel to the search vector.
                _ , normal = brep.evaluator.getNormalAtPoint(brep.pointOnFace)
                if normal.isParallelTo(self.__searchVector):
                    if not brep in faces:
                        faces.append(brep)
        return faces

    def __getWallFaces(self, points: list[adsk.core.Point3D]):
        ''' Search the pocket wall faces using the provided boundary points '''
        faces: list[adsk.fusion.BRepFace] = []
        for point in points:
            breps = self.__component.findBRepUsingPoint(point, adsk.fusion.BRepEntityTypes.BRepFaceEntityType, -1, True)
            for brep in breps:
                # Cast so we have a nicely typed object.
                brep = adsk.fusion.BRepFace.cast(brep)
                # Filter to find only the wall faces where the normal is perpendicular to the search vector.
                _ , normal = brep.evaluator.getNormalAtPoint(brep.pointOnFace)
                if normal.isPerpendicularTo(self.__searchVector):
                    if not brep in faces:
                        faces.append(brep)
        return faces

def loadProjectFromURN(urn:str = None) -> adsk.core.Document:
    ''' Minimal self-contained function to load and return a document via URN or return None safely '''
    doc: adsk.core.Document = None
    app = adsk.core.Application.get()
    if urn is not None:
        try: # File not found causes an exception
            project: adsk.core.DataFile = app.data.findFileById(urn)
            if project:
                doc = app.documents.open(project, True)
            else:
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
        except Exception as e:
            if str(e)[0:38] == '3 : Design is located in another team.':
                # Although the document has been loaded, variable 'doc' may not be populated
                if doc is None:
                    doc: adsk.core.Document = adsk.core.Application.get().activeDocument
            elif str(e)[0:20] == '3 : file not found':
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
            else:
                # Abandon for unhandled errors, displaying the error message.
                app.userInterface.messageBox(f'Failed:{str(e)}\n{traceback.format_exc()}')
    return doc


Create Setups From Hole Recognition API Sample

Description

This sample script demonstrates how to create a correctly oriented setup using Hole Recognition functionality.

The Fusion Manufacturing Extension is required for Hole Recognition.

The script starts by opening a sample model from the CAM Samples folder via its URN. The model comprises a 3 way coupling containing holes in various orientations and mounted on a fixture. A reference setup is created for the model using a simple stock mode and offsets. The Hole Recognition feature of the Fusion Manufacturing Extension creates 5 hole groups containing 11 holes between them. For each unique hole group vector captured, a new setup is created and its orientation transformed to match the vector.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback, math

#################### Global settings ####################
_app = adsk.core.Application.get()
_ui = _app.userInterface

# A Constant that sets the vector output to 6 decimal places.
DECIMAL_PLACES = 6

# The name of the part for which we create a reference setup.
BODY_NAME = 'Body999'

# Names of any fixtures.
FIXTURE_NAMES: list[str] = ['5 Axis-V562-VPY56:1', 'Component30:1']

# Our sample model, 3 way coupling part + Fixture.
PROJECT_URN = 'urn:adsk.wipprod:fs.file:vf.9Y50bpnXR-eWplz5h8SAYg?version=1'

# If True, print results of hole information to the TEXT COMMAND window of Fusion.
PRINT_RESULTS = True

#################### Script entry point ####################
def run(context):
    ''' Main entry point for the script. '''
    try:
        #################### Initialisation #####################

        doc = loadProjectFromURN(PROJECT_URN)
        if doc is None: return

        # Switch to the manufacturing workspace (CAM environment).
        camWS = _ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the CAM product.
        products = doc.products
        cam: adsk.cam.CAM = products.itemByProductType("CAMProductType")

        # Get the CAD product.
        design: adsk.fusion.Design = products.itemByProductType('DesignProductType')

        #################### Get body or component ####################
        part = getBRepBodyByName(design, BODY_NAME)
        if not part:
            userMessageBox(f'{BODY_NAME} not found in the Fusion document', True)
            return

        #################### Reference Setup ####################

        # Create a reference setup based on the sample part.
        referenceSetup = createReferenceSetup(design, cam, part)

        # The Fusion Manufacturing Extension is required  for hole recogintion.
        if not isManufacturingExtensionActive(referenceSetup):
            userMessageBox('Fusion Manufacturing Extension is required for hole recognition.', True)
            return

        #################### Define Z Vectors ####################
        # Create a list of vectors for each hole group from which setups will be generated.
        zVectors = getVectorsFromRecognziedHoles(part)

        # Create a dummy anchor component.
        # This is required if the default option:
        # 'First component grounded to parent' is ticked in Preferences > Design > Assemblies.
        occurrence, component = createComponent(design, 'dummyAnchorComponent')

        # Use a list to store the created setups.
        createdSetups: list[adsk.cam.Setup] = []

        #################### Loop to Create Setups for Each Z Vector ####################
        for vector in zVectors:

            # Generate a name string based on the vector.
            name = createStringFromVector(vector)

            # Create a new component.
            newOccurrence, newComponent = createComponent(design, name)

            # Transform if it's not vertical.
            if not vector.isEqualTo(adsk.core.Vector3D.create(0, 0, 1)):
                transformMatrix = getTransformMatrixFromVector(vector)
                transformComponent(transformMatrix, newOccurrence, design)

            newSetup = createNewSetupFromReference(cam, referenceSetup, name)

            axisX, axisY, origin = getComponentAxes(newComponent, newOccurrence)
            newSetup = applyAxesToSetup(axisX, axisY, origin, newSetup)

            createdSetups.append(newSetup)

        _app.log(f'---Completed Creation of {len(createdSetups)} Setup{'s' if len(createdSetups) > 1 else ''}---')
        userMessageBox('Completed. Please expand Setups to view the new setups.', False)

    except Exception as e:
        userMessageBox(f'Failed:{e}\n{traceback.format_exc()}', True)

#################### Custom Axes Setup Creation Functions ####################

def createComponent(design: adsk.fusion.Design, name: str):
    '''
    Creates a new component in the design and names it.
    Returns the occurrence and the component.
    '''
    rootComp = design.rootComponent
    occurrence = rootComp.occurrences.addNewComponent(adsk.core.Matrix3D.create())
    component = occurrence.component
    component.name = f'setVector: {name}'
    return occurrence, component

def transformComponent(transformMatrix: adsk.core.Matrix3D, occurrence: adsk.fusion.Occurrence, design: adsk.fusion.Design):
    ''' Transforms the given occurrence using the provided transformation matrix. '''
    try:
        occurrence.transform2 = transformMatrix
        design.snapshots.add()

    except Exception as e:
        if str(e)[0:35] != '3 : this is not a parametric design': # We handle this specific error.
            # Abandon for unhandled errors, displaying the error message.
            userMessageBox(str(e), True)
            return

def getComponentAxes(component: adsk.fusion.Component, occurrence: adsk.fusion.Occurrence):
    ''' Retrieves the X and Y axes and origin point of the given component in the assembly context. '''
    axisX = component.xConstructionAxis.createForAssemblyContext(occurrence)
    axisY = component.yConstructionAxis.createForAssemblyContext(occurrence)
    origin = component.originConstructionPoint.createForAssemblyContext(occurrence)
    return axisX, axisY, origin

def createNewSetupFromReference(cam: adsk.cam.CAM, referenceSetup: adsk.cam.Setup, setupName: str):
    ''' Duplicates a reference setup and renames it based on the given setup name. '''
    setups = cam.setups

    # Duplicate the reference setup.
    duplicateSetup = referenceSetup.duplicate()

    # Move the duplicated setup after the last one.
    if duplicateSetup:
        newSetup = setups[1]
        newSetup.moveAfter(setups[-1])
    else:
        userMessageBox('Failed to duplicate setup', True)

    # Set stock mode to previous setup and rename the new setup.
    newSetup.parameters.itemByName('job_stockMode').expression = "'previoussetup'"
    newSetup.name = f'Setup {setupName}'
    return newSetup

def createStringFromVector(vector: adsk.core.Vector3D):
    '''Converts a vector to a string for naming purposes.'''
    # Adding zero so a -0.0 will become 0.0 (nicer for printing a zero value).
    x = round(vector.x, DECIMAL_PLACES) + 0
    y = round(vector.y, DECIMAL_PLACES) + 0
    z = round(vector.z, DECIMAL_PLACES) + 0
    vectorString = f'[{x}, {y}, {z}]'
    return vectorString

def applyAxesToSetup(axisX: adsk.fusion.ConstructionAxis, axisY: adsk.fusion.ConstructionAxis, \
                     origin: adsk.fusion.ConstructionPoint, setup: adsk.cam.Setup):
    ''' Applies the given axes and origin to the WCS of the setup. '''
    setup.parameters.itemByName('wcs_orientation_mode').expression = "'axesXY'"

    # Apply the input X and Y axes to the setup.
    axisXSelection: adsk.cam.CadObjectParameterValue = setup.parameters.itemByName('wcs_orientation_axisX').value
    axisXSelection.value = [axisX]
    axisYSelection: adsk.cam.CadObjectParameterValue = setup.parameters.itemByName('wcs_orientation_axisY').value
    axisYSelection.value = [axisY]

    # Apply the origin point to the setup.
    setup.parameters.itemByName('wcs_origin_mode').expression = "'point'"
    originSelection: adsk.cam.CadObjectParameterValue = setup.parameters.itemByName('wcs_origin_point').value
    originSelection.value = [origin]
    return setup

def getTransformMatrixFromVector(zVector: adsk.core.Vector3D):
    ''' Generates a transformation matrix based on a Z vector. '''
    zVector.normalize()

    # Define an initial X vector.
    xVector = adsk.core.Vector3D.create(1, 0, 0)

    # If the Z vector is too close to the X vector, use Y as an alternative.
    if abs(zVector.angleTo(xVector)) < math.radians(1):
        xVector = adsk.core.Vector3D.create(0, 1, 0)

    # Compute the orthogonal Y vector.
    yVector = zVector.crossProduct(xVector)
    yVector.normalize()

    # Recompute the orthogonal X vector.
    xVector = yVector.crossProduct(zVector)
    xVector.normalize()

    # Create the transformation matrix.
    transformMatrix = adsk.core.Matrix3D.create()
    transformMatrix.setWithCoordinateSystem(adsk.core.Point3D.create(0, 0, 0), xVector, yVector, zVector)
    return transformMatrix

#################### Helper Functions ####################

def getBRepBodyByName(design: adsk.fusion.Design, name: str):
    ''' Get a body by its name (return None if not found) '''

    for i in range(design.rootComponent.bRepBodies.count):
        body = design.rootComponent.bRepBodies.item(i)
        if body.name == name:
            return body

    for i in range(design.rootComponent.allOccurrences.count):
        occ = design.rootComponent.allOccurrences.item(i)
        for j in range(occ.bRepBodies.count):
            body = occ.bRepBodies.item(j)
            if body.name == name:
                return body
    return None

def isManufacturingExtensionActive(setup: adsk.cam.Setup):
    ''' Checks if manufacturing extension is active '''
    for op in setup.operations.compatibleStrategies:
        if op.name == 'steep_and_shallow':
            # The Fusion Manufacturing Extension is required for Hole Recogintion.
            if op.isGenerationAllowed:
                return True
            else:
               return False
    return False

def userMessageBox(messageText: str, isWarning: bool = False):
    ''' Keep messageBox calls informative but succinct'''
    iconType = adsk.core.MessageBoxIconTypes.WarningIconType if isWarning else adsk.core.MessageBoxIconTypes.InformationIconType
    _ui.messageBox(messageText, 'Fusion\t\t\t\t\t\t', adsk.core.MessageBoxButtonTypes.OKButtonType, iconType) # Title tabs widen messageBox.

def createReferenceSetup(design: adsk.fusion.Design, cam: adsk.cam.CAM, part: adsk.fusion.BRepBody):
    ''' Creates a reference setup with a simple stock mode and offsets. '''
    setups = cam.setups
    setupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)

    # Add the part to the setup input models.
    models = [part]
    setupInput.models = models

    # Add fixture items into the setup.
    modelsOther: list[adsk.fusion.Occurrence] = []
    for fixtureName in FIXTURE_NAMES:
        modelsOther.append(design.rootComponent.allOccurrences.itemByName(fixtureName))

    setupInput.fixtures = modelsOther

    # Create the setup and configure stock properties.
    setup = setups.add(setupInput)
    setup.name = 'Setup Reference'
    setup.stockMode = adsk.cam.SetupStockModes.RelativeBoxStock

    # Configure stock offsets.
    setup.parameters.itemByName('job_stockOffsetMode').expression = "'simple'"
    setup.parameters.itemByName('job_stockOffsetSides').expression = '0 mm'
    setup.parameters.itemByName('job_stockOffsetTop').expression = '1 mm'
    return setup

def isVectorInListOfVectors(vector: adsk.core.Vector3D, vectors: list[adsk.core.Vector3D]):
    ''' Check if the vector is already in a list of vectors '''
    for v in vectors:
        if vector.isEqualTo(v):
            return True
    return False

def getVectorsFromRecognziedHoles(part: adsk.fusion.BRepBody):
    ''' Hole Recognition of body in documnent and extract vectors '''
    vectors: list[adsk.core.Vector3D] = []

    # The Fusion Manufacturing Extension is required for Hole Recogintion.
    recognizedHolesInput = adsk.cam.RecognizedHolesInput.create()
    holeGroups = adsk.cam.RecognizedHoleGroup.recognizeHoleGroupsWithInput([part], recognizedHolesInput)
    holes = adsk.cam.RecognizedHole.recognizeHoles([part])
    if PRINT_RESULTS:
        _app.log(f'Hole Group count = {holeGroups.count} (Additional groups are created for differing hole types sharing the same orientation)')
        _app.log(f'Total number of holes in model = {holes.count}')
    grpNum = 0

    # Deal with hole groups.
    for holeGroup in holeGroups:
        grpNum += 1
        hole = holeGroup.item(0) # This is the first hole in the group.
        axis = hole.axis
        if PRINT_RESULTS:
            strVect = createStringFromVector(hole.axis)
            _app.log(f'Number of holes in group {grpNum} = {holeGroup.count} : Vector direction = {strVect}')

        # We make sure the vector is not added to the Fusion Setup list if it's a duplicate.
        if not isVectorInListOfVectors(axis, vectors):
            vectors.append(axis)

    _app.log('***Completed hole recognition***')
    return vectors

def loadProjectFromURN(urn:str = None) -> adsk.core.Document:
    ''' Minimal self-contained function to load and return a document via URN or return None safely '''
    doc: adsk.core.Document = None
    app = adsk.core.Application.get()
    if urn is not None:
        try: # File not found causes an exception
            project: adsk.core.DataFile = app.data.findFileById(urn)
            if project:
                doc = app.documents.open(project, True)
            else:
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
        except Exception as e:
            if str(e)[0:38] == '3 : Design is located in another team.':
                # Although the document has been loaded, variable 'doc' may not be populated
                if doc is None:
                    doc: adsk.core.Document = adsk.core.Application.get().activeDocument
            elif str(e)[0:20] == '3 : file not found':
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
            else:
                # Abandon for unhandled errors, displaying the error message.
                app.userInterface.messageBox(f'Failed:{str(e)}\n{traceback.format_exc()}')
    return doc


Generate Setup Sheets API Sample

Description

Demonstrates generating the setup sheets for an existing toolpath..

Code Samples

  • C++
  • Python
#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;
}
# 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()))


Generate Toolpaths API Sample

Description

Demonstrates generating the toolpaths in the active document.

Code Samples

  • C++
  • Python
#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;
}
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()))


Hole and Pocket Recognition API Sample

Description

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket also return some BRepFaces but it needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

This script works only if the Manufacturing Extension is active.

Code Samples

  • Python
import adsk.fusion, adsk.core, adsk.cam, traceback
import math
from enum import Enum

#################### CONSTANTS & ENUMERATORS ####################
# Milling & drilling tool libraries to get tools from
MILLING_TOOL_LIBRARY_URL  = adsk.core.URL.create('systemlibraryroot://Samples/Milling Tools (Metric).json')
DRILLING_TOOL_LIBRARY_URL = adsk.core.URL.create('systemlibraryroot://Samples/Hole Making Tools (Metric).json')

# Colors
POCKET_WALL_FACES_COLOR   = adsk.core.Color.create(0, 255, 255, 255)
POCKET_BOTTOM_FACES_COLOR = adsk.core.Color.create(0, 145, 230, 255)
HOLE_SIMPLE_COLOR         = adsk.core.Color.create(130, 225, 10, 255)
HOLE_COUNTERBORE_COLOR    = adsk.core.Color.create(180, 120, 255, 255)

# Tool types used in this script (enumerator)
class ToolType(Enum):
    BULL_NOSE_END_MILL = 'bull nose end mill'
    DRILL              = 'drill'
    FLAT_END_MILL      = 'flat end mill'
    SPOT_DRILL         = 'spot drill'

# Pocket search vector: only look for pockets from top view: visible and machinable from Z+
POCKET_SEARCH_VECTOR = adsk.core.Vector3D.create(0, 0, -1)

#################### ENTRY POINT #####################
def run(context) -> None:
    try:
        app = adsk.core.Application.get()
        ui: adsk.core.UserInterface = app.userInterface

        # Create a new empty document
        doc: adsk.core.Document = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        # Switch to manufacturing space
        camWS: adsk.core.Workspace = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the CAM product
        products: adsk.core.Products = doc.products
        cam: adsk.cam.CAM = products.itemByProductType("CAMProductType")

        # Get the CAD product
        design: adsk.fusion.Design = products.itemByProductType('DesignProductType')

        # Get the root component of the active design as we will need to create sketches later on...
        rootComponent: adsk.fusion.Component = design.rootComponent
        sketches:adsk.fusion.Sketches = rootComponent.sketches

        #################### CREATE SAMPLE PART ####################

        body: adsk.fusion.BRepBody = createSampleBody(rootComponent)

        # Refresh screen and fit model to view
        app.activeViewport.refresh()
        app.activeViewport.fit()
        adsk.doEvents()

        #################### TOOL LIBRARIES ####################

        # Get the tool libraries from the library manager
        camManager = adsk.cam.CAMManager.get()
        libraryManager: adsk.cam.CAMLibraryManager = camManager.libraryManager
        toolLibraries: adsk.cam.ToolLibraries = libraryManager.toolLibraries

        # Load tool libraries
        millingToolLibrary: adsk.cam.ToolLibrary = toolLibraries.toolLibraryAtURL(MILLING_TOOL_LIBRARY_URL)
        drillingToolLibrary: adsk.cam.ToolLibrary = toolLibraries.toolLibraryAtURL(DRILLING_TOOL_LIBRARY_URL)

        ####################### HOLE & POCKETS RECOGNITION - SAMPLE SCRIPT MAIN LOGIC STARTS #######################

        # Create setups
        holeRecognitionSetup: adsk.cam.Setup = createSetup('Holes (using "RecognizedHoleGroup")', body)
        pocketRecognitionSetup: adsk.cam.Setup = createSetup('Pockets (using "RecognizedPocket")', body)
        pocketSelectionSetup: adsk.cam.Setup = createSetup('Pockets (using "PocketRecognitionSelection")', body)

        # Get body parent component
        pocketComponent: adsk.fusion.Component = body.parentComponent

        # Get a tool to machine the pockets
        tools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(millingToolLibrary, ToolType.FLAT_END_MILL.value, 1, 1, 2)
        roughingTool: adsk.cam.Tool = tools[0] # Use the first tool found

        ########## MAKE POCKETS USING POCKET RECOGNITION API ##########

        # Recognize pockets
        pockets: adsk.cam.RecognizedPockets = adsk.cam.RecognizedPocket.recognizePockets(body, POCKET_SEARCH_VECTOR)

        # Variable used to capture operations created
        op: adsk.cam.Operation = None

        # List of operations created, used to highlight them once created
        ops: list[adsk.cam.Operation] = []

        # Get boundary key points to find bottom faces (if any) and create roughing operation
        for pocket in pockets:
            # Check if the pocket is circular (if it's basically a simple hole) since we will deal with those using drilling
            if isCircularPocket(pocket):
                continue

            # Pocket boundaries
            boundaries: list[adsk.core.Curve3DPath] = pocket.boundaries

            # Get pocket boundary key points (used later on to find and color faces)
            points: list[adsk.core.Point3D] = []
            for boundary in boundaries:
                boundaryPoints: list[adsk.core.Point3D] = getBoundaryKeyPoints(boundary)
                points.extend(boundaryPoints)

            # Create pocket operations
            if pocket.isThrough:
                # THROUGH POCKETS: Searching the side faces for coloring. Bottom faces are missing so we will draw sketch to define pocket bottom boundary.

                # Search the wall faces as breps using the points of the boundary
                _, pocketWallFaces = getPocketBottomAndWallFaces(pocket)

                # Color the pocket walls
                colorFaces(design, pocketWallFaces, 'pocketWallFacesColor', POCKET_WALL_FACES_COLOR)

                # Create a sketch on XY plane since there is no bottom face to use here
                sketch: adsk.fusion.Sketch = sketches.add(rootComponent.xYConstructionPlane)
                sketch.name = 'Through pocket sketch'
                drawSketchCurves(sketch, boundary)

                # Create an operation using that sketch
                op = createClosedThroughPocketOperation(pocketRecognitionSetup, 'Closed through pocket', sketch, pocket, roughingTool)
                ops.append(op)

            else:
                # BLIND POCKETS: Search the pocket bottom face to use in the operation and side faces for coloring.

                # Get the bottom and wall face breps of a pocket
                pocketBottomFaces, pocketWallFaces = getPocketBottomAndWallFaces(pocket)

                # Color the pocket bottom faces
                colorFaces(design, pocketBottomFaces, 'pocketBottomFaces', POCKET_BOTTOM_FACES_COLOR)

                # Color the pocket walls
                colorFaces(design, pocketWallFaces, 'pocketWallFacesColor', POCKET_WALL_FACES_COLOR)

                # Define the pocket name
                name = 'Closed blind pocket' if pocket.isClosed else 'Open blind pocket'

                op = createBlindPocketOperation(pocketRecognitionSetup, name, pocketBottomFaces, pocket, roughingTool)
                ops.append(op)

            # ask Fusion to refresh the screen
            app.activeViewport.refresh()

        ########## MAKE POCKETS USING POCKET RECOGNITION SELECTION (FROM UI) ##########

        # Create basic roughing operations
        # The distinction between the pockets is done by filtering the pocket heights, within the functions below...
        op = createClosedThroughPocketSelectionOperation(pocketSelectionSetup, 'Closed through pocket (PocketSelection)', roughingTool)
        ops.append(op)

        op = createClosedBlindPocketSelectionOperation(pocketSelectionSetup, 'Closed blind pocket (PocketSelection)', roughingTool)
        ops.append(op)

        ########## MAKE HOLES USING HOLE GROUP RECOGNITION API ##########

        # Hole group recognition using "RecognizedHoleGroup()" is grouping holes of the same type
        # You could also use "RecognizedHole()": this will give you all holes but ungrouped...
        recognizedHolesInput = adsk.cam.RecognizedHolesInput.create()
        holeGroups: adsk.cam.RecognizedHoleGroups = adsk.cam.RecognizedHoleGroup.recognizeHoleGroupsWithInput([body], recognizedHolesInput)

        # Loop through the hole groups found
        for holeGroup in holeGroups:

            # Analyze the first hole from the group to understand their geometry (hole from a group are all the same)
            holeToCheck: adsk.cam.RecognizedHole = holeGroup.item(0)

            # Check the number of segments and the geometry that makes the hole to identify the hole type
            if holeToCheck.segmentCount == 1:
                firstSegment: adsk.cam.RecognizedHoleSegment = holeToCheck.segment(0)
                if firstSegment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCylinder:
                    # This is a simple hole made of one cylinder so let's drill that hole group

                    # Color the faces
                    for hole in holeGroup:
                        simpleHoleFaces :list[adsk.fusion.BRepFace] = []
                        simpleHoleFaces.extend(hole.segment(0).faces)
                        colorFaces(design, simpleHoleFaces, 'simpleHoleColor', HOLE_SIMPLE_COLOR)

                    # Tool selection
                    drillDiameter: float = firstSegment.bottomDiameter # Check hole diameter to select the right drill
                    drillDepth: float = firstSegment.height + 0.5 # Check the hole length to make sure the drill is long enough... and add a clearance of 5mm
                    drillTools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(drillingToolLibrary, ToolType.DRILL.value, drillDiameter, drillDiameter, drillDepth)
                    drillTool: adsk.cam.Tool = drillTools[0] # Select the first tool found

                    # Create the operation
                    op = createSimpleDrillOperation('Simple drill', holeRecognitionSetup, drillTool, holeGroup)
                    ops.append(op)

            elif holeToCheck.segmentCount == 4:
                # A hole with 4 segments might be a counterbore through model with a top chamfer... so let's check the geometry...
                firstSegment: adsk.cam.RecognizedHoleSegment = holeToCheck.segment(0)
                secondSegment: adsk.cam.RecognizedHoleSegment = holeToCheck.segment(1)
                thirdSegment: adsk.cam.RecognizedHoleSegment = holeToCheck.segment(2)
                fourthSegment: adsk.cam.RecognizedHoleSegment = holeToCheck.segment(3)

                if firstSegment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCone:
                    if secondSegment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCylinder:
                        if thirdSegment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeFlat:
                            if fourthSegment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCylinder:
                                # A hole made by a cone, a cylinder, a flat and finally a cylinder is our definition of a counterbore through model with a top chamfer, in this example
                                # We will ignore other types of hole made by 4 segments here if any...

                                # Color the faces
                                for hole in holeGroup:
                                    couterboreHoleFaces :list[adsk.fusion.BRepFace] = []
                                    couterboreHoleFaces.extend(hole.segment(0).faces)
                                    couterboreHoleFaces.extend(hole.segment(1).faces)
                                    couterboreHoleFaces.extend(hole.segment(2).faces)
                                    couterboreHoleFaces.extend(hole.segment(3).faces)
                                    colorFaces(design, couterboreHoleFaces, 'counterboreHoleColor', HOLE_COUNTERBORE_COLOR)

                                # Tool selection
                                drillDiameter:float = fourthSegment.bottomDiameter # Check hole diameter to select the right drill
                                # Check the hole length to make sure the drill is long enough... and add a clearance of 5mm
                                drillDepth:float = firstSegment.height + secondSegment.height + fourthSegment.height + 0.5 # No need to use the third segment height as it's a flat face
                                drillTools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(drillingToolLibrary, ToolType.DRILL.value, drillDiameter, drillDiameter, drillDepth)
                                drillTool:adsk.cam.Tool = drillTools[0] # Select the first tool found

                                # Create the drill operation
                                op = createCounterboreDrillOperation('Counterbore drill', holeRecognitionSetup, drillTool, holeGroup)
                                ops.append(op)

                                # Check the counterbopre diameter to select the right flat end mill
                                # We will drill the hole first meaning we don't need to take this into account...
                                # Select a flat end mill for the counterbore
                                minCounterboreToolDiameter: float = secondSegment.bottomDiameter - fourthSegment.bottomDiameter
                                maxCounterboreToolDiameter: float = secondSegment.bottomDiameter * 0.75
                                counterboreToolMinFluteLength: float =  firstSegment.height + secondSegment.height + 0.5 # Adding 5mm clearance
                                counterboreTools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(millingToolLibrary, ToolType.FLAT_END_MILL.value, minCounterboreToolDiameter, maxCounterboreToolDiameter, counterboreToolMinFluteLength)
                                counterboreTool: adsk.cam.Tool = counterboreTools[0] # Select the first tool found

                                # Counterbore
                                op = createCounterboreMillOperation('Counterbore mill', holeRecognitionSetup, counterboreTool, holeGroup)
                                ops.append(op)

                                # Select tools
                                # Pick a spot drill tool for the top chamfer (we will roll over the chamfer so no need for a very large tool)
                                minChamferToolDiameter:float = 1
                                maxChamferToolDiameter:float = 1.4
                                chamferTools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(drillingToolLibrary, ToolType.SPOT_DRILL.value, minChamferToolDiameter, maxChamferToolDiameter)
                                chamferTool: adsk.cam.Tool = chamferTools[0] # Pick first tool found
                                # Create chamfer operation
                                op = createCounterboreChamferOperation('Counterbore chamfer', holeRecognitionSetup, chamferTool, holeGroup)
                                ops.append(op)

            # ask Fusion to refresh the screen
            app.activeViewport.refresh()

        # Compute all tool paths
        cam.generateAllToolpaths(True)

        # Highligt the operations created
        for op in ops:
            ui.activeSelections.add(op)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

####################### SAMPLE SCRIPT MAIN LOGIC ENDS #######################
#############################################################################

####################### TOOLS #######################

def getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(toolLibrary: adsk.cam.ToolLibrary, tooltype: str, minDiameter: float, maxDiameter: float, minimumFluteLength: float = None) -> list[adsk.cam.Tool]:
    ''' Return a list of tools that fits the search '''
    # Define the search critera
    query: adsk.cam.ToolQuery = toolLibrary.createQuery()
    query.criteria.add('tool_type', adsk.core.ValueInput.createByString(tooltype))
    query.criteria.add('tool_diameter.min', adsk.core.ValueInput.createByReal(minDiameter))
    query.criteria.add('tool_diameter.max', adsk.core.ValueInput.createByReal(maxDiameter))
    if minimumFluteLength:
        query.criteria.add('tool_fluteLength.min', adsk.core.ValueInput.createByReal(minimumFluteLength))

    # Get the query results
    results: list[adsk.cam.ToolQueryResult] = query.execute()

    # Get the tools from the query
    tools: list[adsk.cam.Tool] = []
    for result in results:
        # A valid result has a tool, url, toolLibrary and the index of the tool in that library: we just return the tool here
        tools.append(result.tool)
    return tools

####################### SETUPS #######################

def createSetup(name: str, body: adsk.fusion.BRepBody) -> adsk.cam.Setup:
    ''' Create a setup '''
    app = adsk.core.Application.get()
    doc: adsk.core.Document = app.activeDocument
    products: adsk.core.Products = doc.products
    cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
    setups: adsk.cam.Setups = cam.setups

    # Create setup input and set the parameters
    input: adsk.cam.SetupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)
    input.models = [body]
    input.name = name
    input.stockMode = adsk.cam.SetupStockModes.RelativeBoxStock
    input.parameters.itemByName('job_stockOffsetMode').expression = "'keep'"

    # Create the setup
    setup: adsk.cam.Setup = setups.add(input)
    return setup

####################### POCKETS (USING API) #######################

def createClosedThroughPocketOperation(setup: adsk.cam.Setup, name: str, sketch: adsk.fusion.Sketch, pocket: adsk.cam.RecognizedPocket, tool: adsk.cam.Tool) -> adsk.cam.Operation:
    ''' Produce the toolpath for the closed through pocket using API '''
    input: adsk.cam.OperationInput = setup.operations.createInput('adaptive2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('doMultipleDepths').expression = 'true'
    pocketHeightIncludingBottomOffsetInMM: float = round((pocket.depth  * 10) + 2, 3)  # Convert cm to mm and add 2 mm from bottomHeight_offset
    input.parameters.itemByName('maximumStepdown').expression = str(pocketHeightIncludingBottomOffsetInMM / 2) + ' mm' # Divide total height by 2 to get 2 passes
    input.parameters.itemByName('topHeight_mode').expression = "'from contour'"
    input.parameters.itemByName('topHeight_offset').expression = str(pocket.depth * 10) + ' mm'
    input.parameters.itemByName('bottomHeight_offset').expression = str(-2) + 'mm' # Set bottom to be 2 mm below pocket bottom

    # Apply the sketch boundary to the operation input
    pocketSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('pockets').value
    chains: adsk.cam.CurveSelections = pocketSelection.getCurveSelections()
    chain: adsk.cam.SketchSelection = chains.createNewSketchSelection()
    chain.inputGeometry = [sketch]
    chain.loopType = adsk.cam.LoopTypes.OnlyOutsideLoops
    chain.sideType = adsk.cam.SideTypes.AlwaysInsideSideType
    pocketSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.OperationBase = setup.operations.add(input)
    return op

def createBlindPocketOperation(setup: adsk.cam.Setup, name: str, pocketBottomFaces: list[adsk.fusion.BRepFace], pocket: adsk.cam.RecognizedPocket, tool: adsk.cam.Tool) -> adsk.cam.Operation:
    ''' Produce the toolpath for the closed blind pocket using API '''
    input: adsk.cam.OperationInput = setup.operations.createInput('adaptive2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('doMultipleDepths').expression = 'true'
    input.parameters.itemByName('maximumStepdown').expression = str(round(pocket.depth / 2, 3) * 10) + ' mm' # Divide total height by 2 to get 2 passes
    input.parameters.itemByName('topHeight_mode').expression = "'from contour'"
    input.parameters.itemByName('topHeight_offset').expression = str(pocket.depth * 10) + ' mm'

    # Apply the limits edge to the operation input
    pocketSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('pockets').value
    chains: adsk.cam.CurveSelections = pocketSelection.getCurveSelections()
    chain: adsk.cam.PocketSelection = chains.createNewPocketSelection()
    chain.inputGeometry = pocketBottomFaces
    pocketSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.OperationBase = setup.operations.add(input)
    return op

####################### POCKETS (USING UI) #######################

def createClosedThroughPocketSelectionOperation(setup: adsk.cam.Setup, name: str, tool: adsk.cam.Tool) -> adsk.cam.Operation:
    ''' Produce the toolpath for the closed through pocket using UI '''
    input: adsk.cam.OperationInput = setup.operations.createInput('adaptive2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('doMultipleDepths').expression = 'true'
    input.parameters.itemByName('maximumStepdown').expression = '12 mm' # Divide the pocket height by 2 to ensure 2 steps
    input.parameters.itemByName('bottomHeight_offset').expression = str(-2) + ' mm' # Bottom height = 2 mm below pocket bottom

    # Apply the sketch boundary to the operation input
    pocketSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('pockets').value
    chains: adsk.cam.CurveSelections = pocketSelection.getCurveSelections()
    chain: adsk.cam.PocketRecognitionSelection = chains.createNewPocketRecognitionSelection()
    chain.maximumPocketDepth = 2.5 # (cm) Define some pocket recognition settings to filter pockets by height (measured from UI)
    chain.minimumPocketDepth = 1.5 # (cm)
    pocketSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.Operation = setup.operations.add(input)
    return op

def createClosedBlindPocketSelectionOperation(setup: adsk.cam.Setup, name: str, tool: adsk.cam.Tool) -> adsk.cam.Operation:
    ''' Produce the toolpath for the closed blind pocket using UI '''
    input: adsk.cam.OperationInput = setup.operations.createInput('adaptive2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('doMultipleDepths').expression = 'true'
    input.parameters.itemByName('maximumStepdown').expression = '6 mm'

    # Apply the sketch boundary to the operation input
    pocketSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('pockets').value
    chains: adsk.cam.CurveSelections = pocketSelection.getCurveSelections()
    chain: adsk.cam.PocketRecognitionSelection = chains.createNewPocketRecognitionSelection()
    chain.maximumPocketDepth = 1.5 # (cm) Define some pocket recognition settings to filter pockets by height (measured from UI)
    chain.minimumPocketDepth = 0   # (cm)
    pocketSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.OperationBase = setup.operations.add(input)
    return op

####################### POCKET HELPER FUNCTION #######################

def isCircularPocket(pocket: adsk.cam.RecognizedPocket) -> bool:
    ''' Returns true if this is a circular pocket (= a hole) made of boundaries with circular segments only '''
    isCircleFound: bool = False
    boundaries: list[adsk.core.Curve3DPath] = pocket.boundaries
    for i in range(len(boundaries)):
        boundary: adsk.core.Curve3DPath = boundaries[i]
        for j in range(boundary.count):
            segment: adsk.core.Curve3D = boundary.item(j)
            if segment.classType() == adsk.core.Circle3D.classType():
                isCircleFound = True
            else:
                return False

    return isCircleFound

def getBoundaryKeyPoints(boundary: list[adsk.core.Curve3DPath]) -> list[adsk.core.Point3D]:
    ''' Get some key points on the pocket boundary '''
    points: list[adsk.core.Point3D] = []
    for segment in boundary:
        # Cast to get the actual segment type (casting returns None if the wrong object is passed)
        line3D = adsk.core.Line3D.cast(segment)
        arc3D  = adsk.core.Arc3D.cast(segment)

        if line3D:
            points.append(line3D.startPoint)
            points.append(line3D.endPoint)
        elif arc3D:
            points.append(arc3D.startPoint)
            points.append(arc3D.endPoint)
        else:
            classType = segment.classType()
            raise Exception('Unsupported pocket curve type for this sample script: ' + classType)

    return points

def getPocketBottomAndWallFaces(pocket: adsk.cam.RecognizedPocket) -> tuple[list[adsk.fusion.BRepFace], list[adsk.fusion.BRepFace]]:
    ''' Get the pocket bottom and wall faces '''
    pocketBottomFaces: list[adsk.fusion.BRepFace] = []
    pocketWallFaces: list[adsk.fusion.BRepFace] = []

    for face in pocket.faces:
        _, n = face.evaluator.getNormalAtPoint(face.pointOnFace)
        # check if the face normal vector is parallel to the search vector
        # using "isParallelTo()" instead of "isEqualTo()" since the face normal is opposite to the pocket search vector
        if n.isParallelTo(POCKET_SEARCH_VECTOR):
            pocketBottomFaces.append(face)
        else:
            pocketWallFaces.append(face)

    return pocketBottomFaces, pocketWallFaces

####################### DRILLING #######################

def createSimpleDrillOperation(name: str, setup: adsk.cam.Setup, tool: adsk.cam.Tool, holeGroup: adsk.cam.RecognizedHoleGroup) -> adsk.cam.Operation:
    ''' Create simple drilling operation '''
    input: adsk.cam.OperationInput = setup.operations.createInput('drill')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('drillTipThroughBottom').expression = 'true'
    input.parameters.itemByName('breakThroughDepth').expression = '2 mm'

    # Select the hole faces to drill
    faces: list[adsk.fusion.BRepFace] = []
    for i in range(holeGroup.count):
        hole: adsk.cam.RecognizedHole = holeGroup.item(i)
        firstSegment: adsk.cam.RecognizedHoleSegment = hole.segment(0)
        faces.extend(firstSegment.faces)
    holeSelection: adsk.cam.CadObjectParameterValue = input.parameters.itemByName('holeFaces').value
    holeSelection.value = faces

    # Add to the setup
    op: adsk.cam.Operation = setup.operations.add(input)
    return op

def createCounterboreDrillOperation(name: str, setup: adsk.cam.Setup, tool: adsk.cam.Tool, holeGroup: adsk.cam.RecognizedHoleGroup) -> adsk.cam.Operation:
    ''' Create drilling operation for the counterbore hole '''
    input: adsk.cam.OperationInput = setup.operations.createInput('drill')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('drillTipThroughBottom').expression = 'true'
    input.parameters.itemByName('breakThroughDepth').expression = '2 mm'

    # Select the hole faces to drill
    faces: list[adsk.fusion.BRepFace] = []
    for i in range(holeGroup.count):
        hole: adsk.cam.RecognizedHole = holeGroup.item(i)
        firstSegment: adsk.cam.RecognizedHoleSegment = hole.segment(0)
        secondSegment: adsk.cam.RecognizedHoleSegment = hole.segment(1)
        fourthSegment: adsk.cam.RecognizedHoleSegment = hole.segment(3)
        faces.extend(firstSegment.faces)
        faces.extend(secondSegment.faces)
        faces.extend(fourthSegment.faces)
    holeSelection: adsk.cam.CadObjectParameterValue = input.parameters.itemByName('holeFaces').value
    holeSelection.value = faces

    # Add to the setup
    op: adsk.cam.Operation = setup.operations.add(input)
    return op

def createCounterboreMillOperation(name: str, setup: adsk.cam.Setup, tool: adsk.cam.Tool, holeGroup: adsk.cam.RecognizedHoleGroup) -> adsk.cam.Operation:
    ''' Create milling operation for the counterbore part of the hole '''
    input: adsk.cam.OperationInput = setup.operations.createInput('contour2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('doLeadIn').expression = 'false'
    input.parameters.itemByName('doRamp').expression = 'true'
    input.parameters.itemByName('rampAngle').expression = '2 deg'
    input.parameters.itemByName('exit_verticalRadius').expression = '0 mm'
    input.parameters.itemByName('exit_radius').expression = '0 mm'

    # Select the counterbore bottom edge to mill
    edges: list[adsk.fusion.BRepEdge] = []
    for i in range(holeGroup.count):
        hole: adsk.cam.RecognizedHole = holeGroup.item(i)
        secondSegment: adsk.cam.RecognizedHoleSegment = hole.segment(1) # Counterbore segment
        edge: adsk.fusion.BRepEdge = getHoleSegmentBottomEdge(secondSegment)
        edges.append(edge)
    holeSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('contours').value
    chains: adsk.cam.CurveSelections = holeSelection.getCurveSelections()

    # Each edge is a separate chain selection since they are owned by different holes
    for edge in edges:
        chain: adsk.cam.ChainSelection = chains.createNewChainSelection()
        chain.isReverted = True
        chain.inputGeometry = [edge]
    holeSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.Operation = setup.operations.add(input)
    return op

def createCounterboreChamferOperation(name: str, setup: adsk.cam.Setup, tool: adsk.cam.Tool, holeGroup: adsk.cam.RecognizedHoleGroup) -> adsk.cam.Operation:
    ''' Create an operation for the top chamfer of the counterbore '''
    input: adsk.cam.OperationInput = setup.operations.createInput('chamfer2d')
    input.displayName = name
    input.tool = tool
    input.parameters.itemByName('chamferClearance').expression = '0 mm'
    input.parameters.itemByName('entry_distance').expression = '5 mm'
    input.parameters.itemByName('chamferTipOffset').expression = '1 mm'

    # Select the counterbore chamfer's bottom edge to mill
    edges: list[adsk.fusion.BRepEdge] = []
    for i in range(holeGroup.count):
        hole: adsk.cam.RecognizedHole = holeGroup.item(i)
        firstSegment: adsk.cam.RecognizedHoleSegment = hole.segment(0) # Chamfer segment
        edge: adsk.fusion.BRepEdge = getHoleSegmentBottomEdge(firstSegment)
        edges.append(edge)
    holeSelection: adsk.cam.CadContours2dParameterValue = input.parameters.itemByName('contours').value
    chains: adsk.cam.CurveSelections = holeSelection.getCurveSelections()

    for edge in edges:
        # Each edge is a separate chain selection since they are owned by different holes
        chain: adsk.cam.ChainSelection = chains.createNewChainSelection()
        chain.isReverted = True
        chain.inputGeometry = [edge]
    holeSelection.applyCurveSelections(chains)

    # Add to the setup
    op: adsk.cam.Operation = setup.operations.add(input)
    return op

def getHoleSegmentBottomEdge(segment: adsk.cam.RecognizedHoleSegment) -> adsk.fusion.BRepEdge:
    ''' Get the bottom edge of a given hole segment (assuming the hole is algned on Z+) '''
    # We assume:
    #  - the segment is made by one face
    #  - the hole is aligned with Z+ (bounding box checking)
    if len(segment.faces) != 1:
        raise Exception('A hole segment with a single face is expected!')

    face = adsk.fusion.BRepFace.cast(segment.faces[0])
    faceEdges: adsk.fusion.BRepEdges = face.edges
    edge: adsk.fusion.BRepEdge = None
    if len(faceEdges) != 2:
        raise Exception('A hole segment with a single face made of 2 edges is expected!')
    if faceEdges[0].boundingBox.maxPoint.z < faceEdges[1].boundingBox.maxPoint.z:
        edge = faceEdges[0]
    else:
        edge = faceEdges[1]

    return edge

####################### SKETCHING #######################

def drawSketchCurves(sketch: adsk.fusion.Sketch, boundary: list[adsk.core.Curve3D]) -> None:
    ''' Create a sketch from given pocket boundary or island '''
    for segment in boundary:
        # Cast to get the actual segment type (casting returns None if the wrong object is passed)
        line3D = adsk.core.Line3D.cast(segment)
        arc3D = adsk.core.Arc3D.cast(segment)
        circle3D = adsk.core.Circle3D.cast(segment)

        if line3D:
            startPoint: adsk.core.Point3D = line3D.startPoint
            endPoint: adsk.core.Point3D = line3D.endPoint
            sketchLine(sketch, startPoint, endPoint)
        elif arc3D:
            startPoint: adsk.core.Point3D = arc3D.startPoint
            centerPoint: adsk.core.Point3D = arc3D.center
            sweepAngle: float = arc3D.endAngle
            normal: adsk.core.Vector3D = arc3D.normal
            sketchTwoPointArc(sketch, centerPoint, startPoint, sweepAngle, normal)
        elif circle3D:
            centerPoint: adsk.core.Point3D = circle3D.center
            radius: float = circle3D.radius
            sketchCircles(sketch, centerPoint, radius)
        else:
            classType = segment.classType()
            raise Exception('Unsupported pocket curve type for this sample script: ' + classType)

    mergeCoincidentPoints(sketch)

def mergeCoincidentPoints(sketch: adsk.fusion.Sketch) -> None:
    ''' Merge sketchpoints that are coincident. '''
    endPoints: list[adsk.fusion.SketchPoint] = []

    # Get the end points of all lines and arcs.
    for skLine in sketch.sketchCurves.sketchLines:
        endPoints.append(skLine.startSketchPoint)
        endPoints.append(skLine.endSketchPoint)

    for skArc in sketch.sketchCurves.sketchArcs:
        endPoints.append(skArc.startSketchPoint)
        endPoints.append(skArc.endSketchPoint)

    # Check if the points are at the same location and add a constraint.
    for i in range(len(endPoints)):
        point1: adsk.fusion.SketchPoint = endPoints[i]
        if not point1 is None:
            for j in range(i+ 1, len(endPoints)):
                point2: adsk.fusion.SketchPoint = endPoints[j]
                if not point2 is None:
                    if point1.geometry.isEqualTo(point2.geometry):
                        point1.merge(point2)
                        endPoints[i] = None
                        endPoints[j] = None

def sketchCircles(sketch: adsk.fusion.Sketch, centerPoint: adsk.core.Point3D, radius: float) -> adsk.fusion.SketchCircle:
    ''' Create a circle based on the points  '''
    circles: adsk.fusion.SketchCircles = sketch.sketchCurves.sketchCircles
    circle: adsk.fusion.SketchCircle = circles.addByCenterRadius(centerPoint, radius)
    return circle

def sketchTwoPointArc(sketch: adsk.fusion.Sketch, centerPoint: adsk.core.Point3D, startPoint: adsk.core.Point3D, sweepAngle: float, normal: adsk.core.Vector3D) -> adsk.fusion.SketchArc:
    ''' Sketch a arc based on center, radius and sweepangle '''
    arcs: adsk.fusion.SketchArcs = sketch.sketchCurves.sketchArcs
    arc: adsk.fusion.SketchArc = arcs.addByCenterStartSweep(centerPoint, startPoint, sweepAngle)
    arcNormal: adsk.core.Vector3D = arc.geometry.normal
    # Check whether the arc is drawn in the right direction
    if not arcNormal.z - normal.z < 0.000001 and arcNormal.y - normal.y < 0.000001 and arcNormal.x - normal.x < 0.000001:
        arc.deleteMe()
        arc = arcs.addByCenterStartSweep(centerPoint, startPoint, -sweepAngle)
    return arc

def sketchLine(sketch: adsk.fusion.Sketch, startPoint: adsk.core.Point3D, endPoint: adsk.core.Point3D) -> adsk.fusion.SketchLine:
    ''' Sketch a straight line based on the starting and ending points '''
    lines: adsk.fusion.SketchLines = sketch.sketchCurves.sketchLines
    line: adsk.fusion.SketchLine = lines.addByTwoPoints(startPoint, endPoint)
    return line

####################### COLORING #######################

def colorFaces(design: adsk.fusion.Design, faces: list[adsk.fusion.BRepFace], colorName: str, color: adsk.core.Color) -> None:
    ''' Color given BRepFaces '''
    app = adsk.core.Application.get()

    # Look for the color
    fusionMaterials: adsk.core.MaterialLibrary = app.materialLibraries.itemById('BA5EE55E-9982-449B-9D66-9F036540E140')
    newColor: adsk.core.Appearance = design.appearances.itemByName(colorName)
    if not newColor:
        # Get the existing Red appearance.
        redColor: adsk.core.Appearance = fusionMaterials.appearances.itemById('Prism-093')
        # Copy it to the design, giving it a new name.
        newColor: adsk.core.Appearance = design.appearances.addByCopy(redColor, colorName)
        # Change the color of the default appearance to the provided one.
        theColor: adsk.core.ColorProperty = newColor.appearanceProperties.itemById('opaque_albedo')
        theColor.value = color

    # Color given faces
    for face in faces:
        face.appearance = newColor

    # ask Fusion to update graphics
    app.activeViewport.refresh()

####################### CREATE SAMPLE PART #######################

def createSampleBody(component: adsk.fusion.Component) -> adsk.fusion.BRepBody:
    ''' Create a sample part for the script '''
    app = adsk.core.Application.get()

    # Get reference to the sketchs
    sketches: adsk.fusion.Sketches = component.sketches

    # Get the extrude features Collection for the component
    extrudes: adsk.fusion.ExtrudeFeatures = component.features.extrudeFeatures
    chamfers: adsk.fusion.ChamferFeatures = component.features.chamferFeatures

    # Create a cuiboid
    rectangle: adsk.fusion.Sketch = sketches.add(component.xYConstructionPlane)
    rectangle.sketchCurves.sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(22.0, 15.0, 0))
    blockExtrude: adsk.fusion.ExtrudeFeature = createExtrudeFeature(extrudes, rectangle, 2, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    # Create a simple hole
    holeOne: adsk.fusion.Sketch = sketches.add(component.xYConstructionPlane)
    circleOne: list[adsk.core.Circle3D] = [adsk.core.Circle3D.createByCenter(adsk.core.Point3D.create(3, 11.5, 2), adsk.core.Vector3D.create(0, 0, 1), 0.5)]
    drawSketchCurves(holeOne, circleOne)
    createExtrudeFeature(extrudes, holeOne, -2, adsk.fusion.FeatureOperations.CutFeatureOperation)

    # Create another simple hole
    holeTwo: adsk.fusion.Sketch = sketches.add(component.xYConstructionPlane)
    circleTwo: list[adsk.core.Circle3D] = [adsk.core.Circle3D.createByCenter(adsk.core.Point3D.create(5, 11.5, 2), adsk.core.Vector3D.create(0, 0, 1), 0.5)]
    drawSketchCurves(holeTwo, circleTwo)
    createExtrudeFeature(extrudes, holeTwo, -2, adsk.fusion.FeatureOperations.CutFeatureOperation)

    # Create six counterbore holes
    sk: adsk.fusion.Sketch = sketches.add(blockExtrude.endFaces[0])
    skPoints = adsk.core.ObjectCollection.create()
    for i in range(1, 3):
        for j in range(1, 4):
            pstn = adsk.core.Point3D.create(3 * j, 3 * i, 0)
            skPoint: adsk.fusion.SketchPoint = sk.sketchPoints.add(pstn)
            skPoints.add(skPoint)

    holes: adsk.fusion.HoleFeatures = component.features.holeFeatures
    counterBoreDiam = adsk.core.ValueInput.createByReal(2)
    counterBoreDepth = adsk.core.ValueInput.createByReal(1)
    holeDiam = adsk.core.ValueInput.createByReal(1)
    holeInput: adsk.fusion.HoleFeatureInput = holes.createCounterboreInput(holeDiam, counterBoreDiam, counterBoreDepth)
    holeInput.setAllExtent(adsk.fusion.ExtentDirections.PositiveExtentDirection)
    holeInput.setPositionBySketchPoints(skPoints)
    holeFeature: adsk.fusion.HoleFeature = holes.add(holeInput)

    # Find the top edges of the holes to add a chamfer.
    topFace: adsk.fusion.BRepFace = blockExtrude.endFaces[0]
    chamferEdges = adsk.core.ObjectCollection.create()
    for cylinderFace in holeFeature.faces:
        if isinstance(cylinderFace.geometry, adsk.core.Cylinder):
            commonEdge: adsk.fusion.BRepEdge = findCommonEdge(cylinderFace, topFace)
            if commonEdge:
                chamferEdges.add(commonEdge)

    # Create the chamfer
    chamferInput: adsk.fusion.ChamferFeatureInput = chamfers.createInput2()
    offset = adsk.core.ValueInput.createByReal(0.3)
    chamferInput.chamferEdgeSets.addEqualDistanceChamferEdgeSet(chamferEdges, offset, False)
    chamfers.add(chamferInput)

    # Create a closed pocket
    pocketOne: adsk.fusion.Sketch =  sketches.add(component.xYConstructionPlane)
    geometries: list[adsk.core.Curve3D] = []
    geometries.append(adsk.core.Line3D.create(adsk.core.Point3D.create(12, 1.5, 2),adsk.core.Point3D.create(13, 1.5, 2)))
    geometries.append(adsk.core.Line3D.create(adsk.core.Point3D.create(14, 2.5, 2),adsk.core.Point3D.create(14, 4.5, 2)))
    geometries.append(adsk.core.Line3D.create(adsk.core.Point3D.create(13, 5.5, 2),adsk.core.Point3D.create(12, 5.5, 2)))
    geometries.append(adsk.core.Line3D.create(adsk.core.Point3D.create(11, 4.5, 2),adsk.core.Point3D.create(11, 2.5, 2)))
    geometries.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(12, 2.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(-1, 0, 0), 1, 0, math.pi / 2))
    geometries.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(13, 2.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(0, -1, 0), 1, 0, math.pi / 2))
    geometries.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(13, 4.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(1, 0, 0), 1, 0, math.pi / 2))
    geometries.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(12, 4.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(0, 1, 0), 1, 0, math.pi / 2))
    drawSketchCurves(pocketOne, geometries)
    createExtrudeFeature(extrudes, pocketOne, -1, adsk.fusion.FeatureOperations.CutFeatureOperation)

    # Create a open pocket
    pocketTwo: adsk.fusion.Sketch = sketches.add(component.xYConstructionPlane)
    pocketTwoOutline: list[adsk.core.Curve3D] = []
    pocketTwoOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(12, 7.5, 2),adsk.core.Point3D.create(18, 7.5, 2)))
    pocketTwoOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(19, 8.5, 2),adsk.core.Point3D.create(19, 11.5, 2)))
    pocketTwoOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(18, 12.5, 2),adsk.core.Point3D.create(12, 12.5, 2)))
    pocketTwoOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(11, 11.5, 2),adsk.core.Point3D.create(11, 8.5, 2)))
    pocketTwoOutline.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(12, 8.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(-1,0,0), 1, 0, math.pi / 2))
    pocketTwoOutline.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(18, 8.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(0,-1,0), 1, 0, math.pi / 2))
    pocketTwoOutline.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(18, 11.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(1,0,0), 1, 0, math.pi / 2))
    pocketTwoOutline.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(12, 11.5, 2), adsk.core.Vector3D.create(0, 0, 1), adsk.core.Vector3D.create(0,1,0), 1, 0, math.pi / 2))
    drawSketchCurves(pocketTwo, pocketTwoOutline)
    createExtrudeFeature(extrudes, pocketTwo, -2, adsk.fusion.FeatureOperations.CutFeatureOperation)

    # Create a pocket on the side
    pocketThree: adsk.fusion.Sketch =  sketches.add(component.xYConstructionPlane)
    pocketThreeOutline: list[adsk.core.Curve3D] = []
    pocketThreeOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(18, 0, 2),adsk.core.Point3D.create(22, 0, 2)))
    pocketThreeOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(22, 0, 2),adsk.core.Point3D.create(22, 4.5, 2)))
    pocketThreeOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(22, 4.5, 2),adsk.core.Point3D.create(19, 4.5, 2)))
    pocketThreeOutline.append(adsk.core.Line3D.create(adsk.core.Point3D.create(18, 3.5, 2),adsk.core.Point3D.create(18, 0, 2)))
    pocketThreeOutline.append(adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(19, 3.5, 2), adsk.core.Vector3D.create(0,0,1), adsk.core.Vector3D.create(0, 1, 0), 1, 0, math.pi / 2))
    drawSketchCurves(pocketThree, pocketThreeOutline)
    createExtrudeFeature(extrudes, pocketThree, -1.5, adsk.fusion.FeatureOperations.CutFeatureOperation)

    # Return the created body
    part: adsk.fusion.BRepBody = component.bRepBodies.item(0)
    return part

def createExtrudeFeature(extrudeFeatures: adsk.fusion.ExtrudeFeatures, sketch:adsk.fusion.Sketch, height: float, operation: adsk.fusion.FeatureOperations) -> adsk.fusion.ChamferFeature:
    ''' Create an extrude feature '''
    # Get the profile defined by the circle
    shape: adsk.fusion.Profile = sketch.profiles.item(0)

    # Define that the extent is a distance extent of 1 cm
    distance = adsk.core.ValueInput.createByReal(height)

    # Create the extrusion
    extrudeFeature: adsk.fusion.ExtrudeFeature = extrudeFeatures.addSimple(shape, distance, operation)
    return extrudeFeature

# Find the edge that connects to the input faces.
def findCommonEdge(face1: adsk.fusion.BRepFace, face2: adsk.fusion.BRepFace) -> adsk.fusion.BRepEdge:
    # Checks to see if any of the edges of face1 connect to face2.
    edge: adsk.fusion.BRepEdge = None
    for edge in face1.edges:
        for face in edge.faces:
            if face == face2:
                return edge

    return None


Library Item API Sample

Description

Demonstrates how to examine library items using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the existing default code. The script will search for and record all components and library items in the current project. They are displayed in a dialog when the script has finished.

Code Samples

  • C++
  • Python
// We will activate the Design Environment before identifying components and/or library items if they exist.
// Library items are commonly used components such as fasteners that may include nuts, bolts, washers and screws.
// They may be utilised across many projects, especially those including assemblies.

#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

// Function to concatenate a list of strings punctuated by linefeeds into a single string.
std::string concatenateStrings(const std::vector<std::string>& stringList)
{
    std::string concatenatedString;
    for (const auto& str : stringList)
    {
        concatenatedString += str + "\n";
    }
    return concatenatedString;
}

extern "C" XI_EXPORT bool run(const char* context)
{
    // Initialisation.
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();

    // Ensure we are in the Design environment.
    Ptr<Workspace> designWorkspace = ui->workspaces()->itemById("FusionSolidEnvironment");
    if (ui->activeWorkspace() != designWorkspace)
    {
        designWorkspace->activate();
    }

    // Assume initially we have no library components.
    std::string resultMessage = "This design has no library items.";
    std::string resultText = resultMessage;
    std::string indent1 = "      ";
    std::string indent2 = "\t";

    // Initialise a list of non - library components with a heading.
    std::vector<std::string> nonlib = {"Components"};

    // Initialise a list of library item components with a heading.
    std::vector<std::string> output = {"Library Components"};

    Ptr<Design> design = app->activeProduct();
    if (design)
    {
        // Get the 'LibraryItem' property group in the root component of the design.

        auto allComponents = design->allComponents();
        auto allCompCount = allComponents->count();

        // Iterate over all components.
        for (auto i = 0; i < allCompCount; ++i)
        {
            auto component = allComponents->item(i);

            // Concentrate first on library items.
            if (component->isLibraryItem())
            {
                // Capture and indent the component name.
                output.push_back(indent1 + component->name());

                // Get a list of available library items.
                auto propertyGroups = component->propertyGroups();
                auto groupLibraryItem = propertyGroups->itemById("libraryItem");

                // Iterate over all library items.
                auto countLibProps = groupLibraryItem->count();
                for (int j = 0; j < countLibProps; ++j)
                {
                    auto property = groupLibraryItem->item(j);
                    auto propName = property->name();

                    // Get string value from string property.
                    auto stringProperty =
                        static_cast<StringProperty*>(property->queryInterface(StringProperty::classType()));
                    output.push_back(indent2 + propName + " = " + stringProperty->value());
                }
                // Provide an extra linebreak.
                output.push_back(indent1);
            }
            else
            {
                // Indent the names of any non - library items.
                nonlib.push_back(indent1 + component->name());
            }
        }
        // Overwrite our reassuring message with the results if there are any.
        if ((std::size(output) > 1) || (std::size(nonlib) > 2))
        {
            resultText = concatenateStrings(nonlib);
            resultText += "\n";
            resultText += concatenateStrings(output);

            resultMessage = "The results are displayed in the TEXT COMMANDS window.";
        }
        Ptr<TextCommandPalette> textPalette = ui->palettes()->itemById("TextCommands");
        if (!textPalette->isVisible())
        {
            textPalette->isVisible(true);
            adsk::doEvents();
        }
        app->log(resultText);

        // Indicate in a messageBox that the script has finished
        ui->messageBox(
            resultMessage,
            "Library Items Sample\t\t\t\t\t",
            MessageBoxButtonTypes::OKButtonType,
            MessageBoxIconTypes::InformationIconType);
    }

    return true;
}
# We will activate the Design Environment before identifying components and/or library items if they exist.
# Library items are commonly used components such as fasteners that may include nuts, bolts, washers and screws.
# They may be utilised across many projects, especially those including assemblies.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:

        # Initialisation.
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Ensure we are in the Design environment.
        designWorkspace: adsk.core.Workspace = ui.workspaces.itemById("FusionSolidEnvironment")
        if ui.activeWorkspace != designWorkspace:
            designWorkspace.activate()

        # Assume initially we have no library components.
        resultMessage = 'This design has no library items.'
        resultText = resultMessage
        indent1 = '        '
        indent2 = '\t'
        messageBoxLineLimit = 25

        # Initialise a list of non-library components with a heading.
        nonlib: list[str] = ['Components']

        # Initialise a list of library item components with a heading.
        output: list[str] = ['Library Components']

        design = adsk.fusion.Design.cast(app.activeProduct)
        if design:

            # Get the 'LibraryItem' property group in the root component of the design.
            allComponents: adsk.fusion.Components = design.allComponents

            # Iterate over all components.
            for i in range(allComponents.count):
                component: adsk.fusion.Component = allComponents.item(i)

                # Concentrate first on library items.
                if component.isLibraryItem:

                    # Capture and indent the component name.
                    output.append(f'{indent1}{component.name}')

                    # Get a list of available library items.
                    propertyGroups: adsk.core.PropertyGroups = component.propertyGroups
                    groupLibraryItem: adsk.core.PropertyGroup = propertyGroups.itemById('libraryItem')

                    # Iterate over all library items.
                    for j in range(groupLibraryItem.count):
                        property: adsk.core.Property = groupLibraryItem.item(j)

                        # Get string value from string property.
                        stringProperty = adsk.core.StringProperty.cast(property)
                        output.append(f'{indent2}{property.name}  = {stringProperty.value}')

                    # Provide an extra linebreak.
                    output.append(indent1)
                else:
                    # Indent the names of any non-library items.
                    nonlib.append(f'{indent1}{component.name}')

        # Overwrite our reassuring message with the results if there are any.
        if len(output) > 1 or len(nonlib) > 2:
            resultLines = nonlib + [indent1] + output
            resultMessage = '\n'.join(resultLines[0:messageBoxLineLimit])
            if len(resultLines) >= messageBoxLineLimit:
                resultMessage += '\n...\n\nThe full results are displayed in the TEXT COMMANDS window.'
            resultText = '\n'.join(resultLines)

        # Display our full conclusions in the text palette
        textPalette = ui.palettes.itemById('TextCommands')
        if not textPalette.isVisible:
            textPalette.isVisible = True
            adsk.doEvents()
        app.log(resultText)

        # Display our possibly truncated conclusions in a messageBox.
        ui.messageBox(
            resultMessage,
            'Library Items Sample' + indent2 * 5,
            adsk.core.MessageBoxButtonTypes.OKButtonType,
            adsk.core.MessageBoxIconTypes.InformationIconType)

    # Capture and highlight any reason for error
    except Exception as e:
        if ui:
            ui.messageBox(
                f'Failed: {e}\n{format(traceback.format_exc())}',
                'Unable to continue',
                adsk.core.MessageBoxButtonTypes.OKButtonType,
                adsk.core.MessageBoxIconTypes.CriticalIconType)


Manufacturing Workflow API Sample

Description

Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Code Samples

  • C++
  • Python
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <Cam/CamAll.h>
#include <algorithm>

using namespace adsk::core;
using namespace adsk::fusion;
using namespace adsk::cam;

// Constants used in the script
// We assume we are cutting Aluminum here...

// Milling tool library to get tools from
const std::string MILLING_TOOL_LIBRARY = "Milling Tools (Metric)";

// Material properties for feed and speed calculation
const int ALUMINUM_CUTTING_SPEED = 300;     // mm/min
const double ALUMINUM_FEED_PER_TOOTH = 0.1; // mm/tooth

// Tool preset names (which we know exists for the selected tools)
const std::string ALUMINUM_PRESET_ROUGHING = "alu* rou*";
const std::string ALUMINUM_PRESET_FINISHING = "Aluminum - Finishing";

// Tool types used in this script
const std::string BULL_NOSE_END_MILL = "bull nose end mill";
const std::string BALL_END_MILL = "ball end mill";
const std::string FACE_MILL = "face mill";

// Setup work coordinate system (WCS) location
const std::string TOP_CENTER = "top center";
const std::string TOP_XMIN_YMIN = "top 1";
const std::string TOP_XMAX_YMIN = "top 2";
const std::string TOP_XMIN_YMAX = "top 3";
const std::string TOP_XMAX_YMAX = "top 4";
const std::string TOP_SIDE_YMIN = "top side 1";
const std::string TOP_SIDE_XMAX = "top side 2";
const std::string TOP_SIDE_YMAX = "top side 3";
const std::string TOP_SIDE_XMIN = "top side 4";
const std::string CENTER = "center";
const std::string MIDDLE_XMIN_YMIN = "middle 1";
const std::string MIDDLE_XMAX_YMIN = "middle 2";
const std::string MIDDLE_XMIN_YMAX = "middle 3";
const std::string MIDDLE_XMAX_YMAX = "middle 4";
const std::string MIDDLE_SIDE_YMIN = "middle side 1";
const std::string MIDDLE_SIDE_XMAX = "middle side 2";
const std::string MIDDLE_SIDE_YMAX = "middle side 3";
const std::string MIDDLE_SIDE_XMIN = "middle side 4";
const std::string BOTTOM_CENTER = "bottom center";
const std::string BOTTOM_XMIN_YMIN = "bottom 1";
const std::string BOTTOM_XMAX_YMIN = "bottom 2";
const std::string BOTTOM_XMIN_YMAX = "bottom 3";
const std::string BOTTOM_XMAX_YMAX = "bottom 4";
const std::string BOTTOM_SIDE_YMIN = "bottom side 1";
const std::string BOTTOM_SIDE_XMAX = "bottom side 2";
const std::string BOTTOM_SIDE_YMAX = "bottom side 3";
const std::string BOTTOM_SIDE_XMIN = "bottom side 4";

const double PI = 3.14159265358979323846;

std::vector<std::string> getLibrariesURLs(Ptr<ToolLibraries> libraries, Ptr<URL> url);
std::vector<Ptr<Tool>> getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(
    Ptr<ToolLibrary> toolLibrary,
    std::string tooltype,
    double minDiameter,
    double maxDiameter,
    double minimumFluteLength = 0.0);
Ptr<BRepBody> createSamplePart(Ptr<Design> design);

extern "C" XI_EXPORT bool run(const char* context)
{
    // Initialisation
    Ptr<Application> app = Application::get();
    Ptr<UserInterface> ui = app->userInterface();

    // Create a new empty document
    Ptr<Document> doc = app->documents()->add(DocumentTypes::FusionDesignDocumentType);

    // Get the design document used to create the sample part
    Ptr<Design> design = app->activeProduct();

    // Switch to manufacturing space
    Ptr<Workspace> camWS = ui->workspaces()->itemById("CAMEnvironment");
    camWS->activate();

    // Get the CAM product
    Ptr<Products> products = doc->products();

    // Create sample part
    Ptr<BRepBody> part = createSamplePart(design);

    // Select cutting tools
    // Get the tool libraries from the library manager
    Ptr<CAMManager> camManager = CAMManager::get();
    Ptr<CAMLibraryManager> libraryManager = camManager->libraryManager();
    Ptr<ToolLibraries> toolLibraries = libraryManager->toolLibraries();

    Ptr<URL> url;
    const bool useHardCodedUrl = false;
    if (useHardCodedUrl)
    {
        // We can use a library URl directly if we know its address
        std::string libUrl = "systemlibraryroot://Samples/Milling Tools (Metric).json";
        url = URL::create(libUrl);
    }
    else
    {
        // Or we can use the tool library objects fusion folder in the tool library
        Ptr<URL> fusionFolder = toolLibraries->urlByLocation(LibraryLocations::Fusion360LibraryLocation);
        std::vector<std::string> fusionLibs = getLibrariesURLs(toolLibraries, fusionFolder);

        // Search the required library url in the libraries
        for (std::string& libUrl : fusionLibs)
        {
            if (libUrl.find(MILLING_TOOL_LIBRARY) != std::string::npos)
            {
                url = URL::create(libUrl);
                break;
            }
        }
    }

    // Load the tool library
    Ptr<ToolLibrary> toolLibrary = toolLibraries->toolLibraryAtURL(url);
    if (!toolLibrary)
    {
        ui->messageBox("Failed to load tool library");
        return false;
    }

    // Create variables to host the milling tools to be used in the operations
    Ptr<Tool> faceTool;
    Ptr<Tool> adaptiveTool;
    Ptr<Tool> finishingTool;

    // Search for the face mill and the bull nose using a loop for the roughing operations
    for (Ptr<Tool> tool : toolLibrary)
    {
        // Read the tool type
        Ptr<ChoiceParameterValue> toolTypeParameter = tool->parameters()->itemByName("tool_type")->value();
        std::string toolType = toolTypeParameter->value();

        if (toolType == FACE_MILL && !faceTool)
        {
            // Select the first face tool found
            faceTool = tool;
        }
        else if (toolType == BULL_NOSE_END_MILL && !adaptiveTool)
        {
            // Search the roughing tool
            // We look for a bull nose end mill tool larger or equal to 12mm but less than 14mm
            Ptr<FloatParameterValue> diameterParameter = tool->parameters()->itemByName("tool_diameter")->value();
            double diameter = diameterParameter->value();
            if (diameter >= 1.2 && diameter < 1.4)
            {
                adaptiveTool = tool;
            }
        }

        // Exit when the 2 tools are found
        if (faceTool && adaptiveTool)
        {
            break;
        }
    }

    if (!faceTool)
    {
        ui->messageBox("No face mill tool found");
        return false;
    }
    if (!adaptiveTool)
    {
        ui->messageBox("No bull nose end mill tool found");
        return false;
    }

    // Using a query, search for a ball end mill tool having diameter between 6 mm and 10 mm and a minimum flute length
    // of 20.001mm
    std::vector<Ptr<Tool>> finishingTools =
        getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(toolLibrary, BALL_END_MILL, 0.6, 1, 2.0001);

    // For this example, we select the first tool found as our finishing tool
    if (finishingTools.size() == 0)
    {
        ui->messageBox("No ball end mill tool found");
        return false;
    }
    finishingTool = finishingTools[0];

    // Create a setup
    Ptr<CAM> cam = products->itemByProductType("CAMProductType");
    Ptr<Setups> setups = cam->setups();
    Ptr<SetupInput> setupInput = setups->createInput(OperationTypes::MillingOperation);
    // Create a list for the models to add to the setup Input
    std::vector<Ptr<Base>> models;
    // Add the part to the model list
    models.push_back(part);
    // Pass the model list to the setup input
    setupInput->models(models);
    // Create the setup and set some properties
    Ptr<Setup> setup = setups->add(setupInput);
    setup->name("CAM Automation Script Sample");
    setup->stockMode(SetupStockModes::RelativeBoxStock);
    // Set the offset mode
    setup->parameters()->itemByName("job_stockOffsetMode")->expression("\"simple\"");
    // Set the offset stock side
    setup->parameters()->itemByName("job_stockOffsetSides")->expression("0 mm");
    // Set the offset stock top
    setup->parameters()->itemByName("job_stockOffsetTop")->expression("1 mm");
    // Set the setup origin
    Ptr<ChoiceParameterValue> wcs_origin = setup->parameters()->itemByName("wcs_origin_boxPoint")->value();
    wcs_origin->value(TOP_XMIN_YMIN);

    // Face operations
    // Calculate the feed and speed for the face operation
    Ptr<FloatParameterValue> toolDiameterParameter = faceTool->parameters()->itemByName("tool_diameter")->value();
    double toolDiameter = toolDiameterParameter->value(); // cm
    Ptr<IntegerParameterValue> numberOfFlutesParameter =
        faceTool->parameters()->itemByName("tool_numberOfFlutes")->value();
    int numberOfFlutes = numberOfFlutesParameter->value();                            // int
    double spindleSpeed = ALUMINUM_CUTTING_SPEED / PI / (toolDiameter * 10) * 1000;   // rpm
    double cuttingFeedrate = spindleSpeed * ALUMINUM_FEED_PER_TOOTH * numberOfFlutes; // mm/min

    // Create a preset with those calculated feeds
    Ptr<ToolPreset> facePreset = faceTool->presets()->add();
    facePreset->name("Aluminum (set by script)");
    Ptr<FloatParameterValue> tool_spindleSpeed = facePreset->parameters()->itemByName("tool_spindleSpeed")->value();
    tool_spindleSpeed->value(int(spindleSpeed));
    facePreset->parameters()
        ->itemByName("tool_feedCutting")
        ->expression(std::to_string(int(cuttingFeedrate)) + " mm/min");

    // Create a face operation input
    Ptr<OperationInput> input = setup->operations()->createInput("face");
    input->tool(faceTool);
    input->toolPreset(facePreset); // Assign created preset
    input->displayName("Face Operation");
    input->parameters()->itemByName("tolerance")->expression("0.01 mm");
    input->parameters()->itemByName("stepover")->expression("0.75 * tool_diameter");
    input->parameters()->itemByName("direction")->expression("\"climb\"");

    // Determine the pass angle along the largest part dimension
    // Get the stock box dimensions in cm
    Ptr<FloatParameterValue> stockXParameter = setup->parameters()->itemByName("job_stockInfoDimensionX")->value();
    double stockX = stockXParameter->value();
    Ptr<FloatParameterValue> stockYParameter = setup->parameters()->itemByName("job_stockInfoDimensionY")->value();
    double stockY = stockYParameter->value();
    // Determine the pass angle to be along the largest length (X or Y) of the block
    if (stockX >= stockY)
    {
        input->parameters()->itemByName("passAngle")->expression("0 deg");
    }
    else
    {
        input->parameters()->itemByName("passAngle")->expression("90 deg");
    }

    // Add the operation to the setup
    Ptr<OperationBase> faceOp = setup->operations()->add(input);

    // Adaptive operations
    input = setup->operations()->createInput("adaptive");
    input->tool(adaptiveTool);
    input->displayName("Adaptive Roughing");
    input->parameters()->itemByName("tolerance")->expression("0.1 mm");
    input->parameters()->itemByName("maximumStepdown")->expression("5 mm");
    input->parameters()->itemByName("fineStepdown")->expression("0.25 * maximumStepdown");
    input->parameters()->itemByName("flatAreaMachining")->expression("false");

    // Look for a tool preset related to aluminum roughing
    std::vector<Ptr<ToolPreset>> presets = adaptiveTool->presets()->itemsByName(ALUMINUM_PRESET_ROUGHING);
    if (presets.size() > 0)
    {
        // We select and use the first preset found
        Ptr<ToolPreset> adaptivePreset = presets[0];
        input->toolPreset(adaptivePreset);
    }

    // Add the operation to the setup
    Ptr<OperationBase> adaptiveOp = setup->operations()->add(input);

    // Finishing tool preset
    // Get a tool preset from the finishing tool
    Ptr<ToolPreset> finishingPreset;
    presets = finishingTool->presets()->itemsByName(ALUMINUM_PRESET_FINISHING);
    if (presets.size() > 0)
    {
        // Use the first aluminum finishing preset found
        finishingPreset = presets[0];
    }

    // Parallel operations
    input = setup->operations()->createInput("parallel");
    input->tool(finishingTool);
    input->displayName("Parallel Finishing");
    input->parameters()->itemByName("tolerance")->expression("0.01 mm");
    input->parameters()->itemByName("cuspHeightStepover")->expression("0.005 mm");
    input->parameters()->itemByName("boundaryMode")->expression("\"selection\"");
    if (finishingPreset)
    {
        // Assign the finishig tool preset
        input->toolPreset(finishingPreset);
    }

    // Add the operation to the setup
    Ptr<OperationBase> parallelOp = setup->operations()->add(input);

    // Use a contour for the sake of demonstration
    Ptr<BRepEdge> limitEdge;
    for (Ptr<BRepEdge> e : part->edges())
    {
        // This is the inner one: intersection of a plane and a sphere making up a circle
        if (e->geometry()->curveType() == Curve3DTypes::Circle3DCurveType)
        {
            limitEdge = e;
            break;
        }
    }

    if (limitEdge)
    {
        // Apply the limits edge to the operation
        Ptr<CadContours2dParameterValue> cadcontours2dParam =
            parallelOp->parameters()->itemByName("machiningBoundarySel")->value();
        Ptr<CurveSelections> chains = cadcontours2dParam->getCurveSelections();
        Ptr<ChainSelection> chain = chains->createNewChainSelection();
        chain->inputGeometry({limitEdge});
        cadcontours2dParam->applyCurveSelections(chains);
    }

    // Steep and shallow operations
    // Create a folder for finishing operations that require Machining Extension
    Ptr<OperationInput> operationInput = setup->operations()->createInput("folder");
    operationInput->displayName("Machining Extension Required");
    Ptr<CAMFolder> folder = setup->operations()->add(operationInput);

    // Create a steep and shallow operation in the folder
    input = setup->operations()->createInput("steep_and_shallow");
    input->tool(finishingTool);
    input->displayName("Steep and Shallow Finishing");
    input->parameters()->itemByName("tolerance")->expression("0.01 mm");
    input->parameters()->itemByName("useAvoidFlats")->expression("true");
    input->parameters()->itemByName("cuspHeightStepdown")->expression("0.005 mm");
    input->parameters()->itemByName("cuspHeightStepover")->expression("cuspHeightStepdown");
    input->parameters()->itemByName("spiral")->expression("true");
    input->parameters()->itemByName("shallowSpiral")->expression("true");
    input->parameters()->itemByName("offsetSmoothing")->expression("true");
    if (finishingPreset)
    {
        // Assign the finishig tool preset
        input->toolPreset(finishingPreset);
    }

    // Add the operation to the folder
    Ptr<OperationBase> steepAndShallowOp = folder->operations()->add(input);

    // Check whether this toolpath is generatable ("steep_and_shallow" required the manufacturing extension)
    bool isSteepAndShallowGeneratable = false;
    for (Ptr<OperationStrategy> op : setup->operations()->compatibleStrategies())
    {
        if (op->name() == "steep_and_shallow")
        {
            if (op->isGenerationAllowed())
            {
                // isGenerationAllowed will be false if the extension is not active thus preventing the
                // steep_and_shallow operation
                isSteepAndShallowGeneratable = true;
            }
            break;
        }
    }

    // Generate operations
    // List the valid operations to generate
    Ptr<ObjectCollection> operations = ObjectCollection::create();
    operations->add(faceOp);
    operations->add(adaptiveOp);
    operations->add(parallelOp);
    if (isSteepAndShallowGeneratable)
    {
        operations->add(steepAndShallowOp);
    }

    // Create progress bar
    Ptr<ProgressDialog> progressDialog = ui->createProgressDialog();
    progressDialog->isCancelButtonShown(false);
    progressDialog->show("Generating operations->()..", "%p%", 0, 100);
    adsk::doEvents(); // Allow Fusion to update so that the progressDialog updates nicely

    // Generate the valid operations
    Ptr<GenerateToolpathFuture> gtf = cam->generateToolpath(operations);

    // Wait for the generation to be finished and update the progress bar
    while (!gtf->isGenerationCompleted())
    {
        // Calculate progress and update the progress bar
        int total = gtf->numberOfOperations();
        int completed = gtf->numberOfCompleted();
        int progress = int(completed * 100 / total);
        progressDialog->progressValue(progress);
        adsk::doEvents(); // Allow Fusion to update so that the screen does not freeze
    }

    // Generation done
    progressDialog->progressValue(100);
    progressDialog->hide();

    // NC Program and post-processing
    // Get the post library from the library manager
    Ptr<PostLibrary> postLibrary = libraryManager->postLibrary();

    // Query the post library to get the postprocessor list
    Ptr<PostConfigurationQuery> postQuery = postLibrary->createQuery(LibraryLocations::Fusion360LibraryLocation);
    postQuery->vendor("Autodesk");
    postQuery->capability(PostCapabilities::Milling);
    std::vector<Ptr<PostConfiguration>> postConfigs = postQuery->execute();

    // Find the "XYZ" post in the post library and import it to the local library
    Ptr<URL> importedURL;
    for (Ptr<PostConfiguration> config : postConfigs)
    {
        if (config->description() == "XYZ")
        {
            Ptr<URL> _url = URL::create("user://");
            importedURL = postLibrary->importPostConfiguration(config, _url, "NCProgramSamplePost.cps");
        }
    }

    // Get the imported local post config
    Ptr<PostConfiguration> postConfig = postLibrary->postConfigurationAtURL(importedURL);

    // Create the NCProgramInput object
    Ptr<NCProgramInput> ncInput = cam->ncPrograms()->createInput();
    ncInput->displayName("NC Program Sample");

    // Change some nc program parameters...
    Ptr<CAMParameters> ncParameters = ncInput->parameters();
    std::string programName = "NCProgramSample";
    Ptr<StringParameterValue> nc_program_filename = ncParameters->itemByName("nc_program_filename")->value();
    nc_program_filename->value(programName);
    Ptr<BooleanParameterValue> nc_program_openInEditor = ncParameters->itemByName("nc_program_openInEditor")->value();
    nc_program_openInEditor->value(true);

    // Set the temporary directory as the output directory
    std::string outputFolder = cam->temporaryFolder();
    Ptr<StringParameterValue> nc_program_output_folder = ncParameters->itemByName("nc_program_output_folder")->value();
    nc_program_output_folder->value(outputFolder);

    // Select the operations to generate (we skip steep_and_shallow here)
    ncInput->operations({faceOp, adaptiveOp, parallelOp});

    // Add a new ncprogram from the ncprogram input
    Ptr<NCProgram> newProgram = cam->ncPrograms()->add(ncInput);

    // Set the post processor
    newProgram->postConfiguration(postConfig);

    // Change some of the post parameters
    Ptr<CAMParameters> postParameters = newProgram->postParameters();
    Ptr<FloatParameterValue> builtin_tolerance = postParameters->itemByName("builtin_tolerance")->value();
    builtin_tolerance->value(0.02); // NcProgram parameter is passed unchanged to the postprocessor (it has no units)
    Ptr<FloatParameterValue> builtin_minimumChordLength =
        postParameters->itemByName("builtin_minimumChordLength")->value();
    builtin_minimumChordLength->value(0.33); // NcProgram parameter is passed unchanged (it has no units)

    // Update/apply post parameters
    newProgram->updatePostParameters(postParameters);

    // Set post options, by default post process only valid operations containing toolpath data
    Ptr<NCProgramPostProcessOptions> postOptions = NCProgramPostProcessOptions::create();
    // postOptions.PostProcessExecutionBehaviors =
    // adsk.cam.PostProcessExecutionBehaviors.PostProcessExecutionBehavior_PostAll

    // Post-process
    newProgram->postProcess(postOptions);

    // Show the output file
    ui->messageBox(
        "Post processing is complete. The results have been written to:\n" + outputFolder + "/" + programName + ".csv");

    return true;
}

// Return the list of libraries' URLs for the specified libraries
std::vector<std::string> getLibrariesURLs(Ptr<ToolLibraries> libraries, Ptr<URL> url)
{
    std::vector<std::string> urls;
    std::vector<Ptr<URL>> libs = libraries->childAssetURLs(url);
    for (auto& elem : libs)
    {
        urls.push_back(elem->toString());
    }
    for (Ptr<URL> folder : libraries->childFolderURLs(url))
    {
        std::vector<std::string> folderUrls = getLibrariesURLs(libraries, folder);
        urls.insert(urls.end(), folderUrls.begin(), folderUrls.end());
    }
    return urls;
}

//  Return a list of tools that fits the search
std::vector<Ptr<Tool>> getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(
    Ptr<ToolLibrary> toolLibrary,
    std::string tooltype,
    double minDiameter,
    double maxDiameter,
    double minimumFluteLength)
{
    Ptr<ToolQuery> query = toolLibrary->createQuery();
    // Set the search critera
    query->criteria()->add("tool_type", ValueInput::createByString(tooltype));
    query->criteria()->add("tool_diameter.min", ValueInput::createByReal(minDiameter));
    query->criteria()->add("tool_diameter.max", ValueInput::createByReal(maxDiameter));
    if (minimumFluteLength)
    {
        query->criteria()->add("tool_fluteLength.min", ValueInput::createByReal(minimumFluteLength));
    }
    // Get query results
    std::vector<Ptr<ToolQueryResult>> results = query->execute();
    // Get the tools from the query
    std::vector<Ptr<Tool>> tools;
    // Results have a tool, url, toollibrary and the index of the tool in that library: we just return the tool here
    for (auto& elem : results)
    {
        tools.push_back(elem->tool());
    }
    return tools;
}

// CAD creation functions
Ptr<BRepBody> createBox(Ptr<Design> design, double sizeX, double sizeY, double sizeZ);
Ptr<BRepBody> createSphere(Ptr<Design> design, double radius);
Ptr<BRepBody> getBodyFromBooleanOperation(Ptr<Design> design, Ptr<BRepBody> body1, Ptr<BRepBody> body2);

// Create the sample part for this script
Ptr<BRepBody> createSamplePart(Ptr<Design> design)
{

    // The sample part is a box containing a concave side generated by subtracting the intersection from a sphere.
    // The lower face of the box is at Z = 0 and we position the sphere above but intersecting with the box upper face.
    // Fusion's default behaviour is now to ground the first component of an assembly to the parent.
    // This can be overriden, see Preferences->General->Design->Assemblies->First component grounded to parent.
    // However if we make the first component the box, we can move the sphere without changing anything.

    Ptr<BRepBody> box = createBox(design, 22, 15, 5);
    Ptr<BRepBody> sphere = createSphere(design, 7.5);

    // Get the root component
    Ptr<Component> rootComp = design->rootComponent();
    Ptr<Occurrences> occs = rootComp->occurrences();

    // Get the second Occurrence(sphere) as the first occurrence(box) may be grounded to the parent
    Ptr<Occurrence> occ = occs->item(1);
    Ptr<Matrix3D> mat = occ->transform();

    // Matrix translation, moving the sphere up by 10 units along Z axis
    Ptr<Vector3D> origin = Vector3D::create(0, 0, 10);
    mat->translation(origin);

    // Set the transform
    occ->transform(mat);

    // Snapshot - Determining the position is important!!!
    design->snapshots()->add();

    // Cut the sphere / box intersection from the box to leave a concave face
    Ptr<BRepBody> part = getBodyFromBooleanOperation(design, box, sphere);
    return part;
}

// Create a sample box
Ptr<BRepBody> createBox(Ptr<Design> design, double sizeX, double sizeY, double sizeZ)
{
    Ptr<Component> component = design->rootComponent();
    // Create a sketch
    Ptr<Sketches> sketches = component->sketches();
    Ptr<Sketch> sketch = sketches->add(component->xYConstructionPlane());
    Ptr<SketchLines> lines = sketch->sketchCurves()->sketchLines();
    Ptr<SketchLineList> recLines = lines->addTwoPointRectangle(
        Point3D::create(-sizeX / 2, -sizeY / 2, 0), Point3D::create(sizeX / 2, sizeY / 2, 0));
    Ptr<Profile> prof = sketch->profiles()->item(0);
    Ptr<ExtrudeFeatures> extrudes = component->features()->extrudeFeatures();
    Ptr<ValueInput> distance = ValueInput::createByReal(sizeZ);
    Ptr<ExtrudeFeature> ext = extrudes->addSimple(prof, distance, FeatureOperations::NewComponentFeatureOperation);
    return ext->bodies()->item(0);
}

// Create a sample sphere
Ptr<BRepBody> createSphere(Ptr<Design> design, double radius)
{
    Ptr<Component> component = design->rootComponent();
    // Create a new sketch on the xy plane
    Ptr<Sketches> sketches = component->sketches();
    Ptr<ConstructionPlane> xyPlane = component->xYConstructionPlane();
    Ptr<Sketch> sketch = sketches->add(component->xYConstructionPlane());
    // Draw a circle
    Ptr<SketchCircles> circles = sketch->sketchCurves()->sketchCircles();
    Ptr<SketchCircle> circle = circles->addByCenterRadius(Point3D::create(0, 0, 0), radius);
    // Draw a line to use as the axis of revolution
    Ptr<SketchLines> lines = sketch->sketchCurves()->sketchLines();
    Ptr<SketchLine> axisLine = lines->addByTwoPoints(Point3D::create(-radius, 0, 0), Point3D::create(radius, 0, 0));
    // Get the profile defined by half of the circle
    Ptr<Profile> 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
    Ptr<RevolveFeatures> revolves = component->features()->revolveFeatures();
    Ptr<RevolveFeatureInput> revInput =
        revolves->createInput(prof, axisLine, FeatureOperations::NewComponentFeatureOperation);
    // Define that the extent is an angle of 2*pi to get a sphere
    Ptr<ValueInput> angle = ValueInput::createByReal(2 * PI);
    revInput->setAngleExtent(false, angle);
    // Create the extrusion
    Ptr<RevolveFeature> ext = revolves->add(revInput);

    return ext->bodies()->item(0);
}

// Creates a boolean operation between two bodies
Ptr<BRepBody> getBodyFromBooleanOperation(Ptr<Design> design, Ptr<BRepBody> body1, Ptr<BRepBody> body2)
{
    Ptr<Component> model = design->activeComponent();
    Ptr<Features> features = model->features();
    Ptr<ObjectCollection> bodyCollection = ObjectCollection::create();
    bodyCollection->add(body2);
    Ptr<CombineFeatures> combineFeatures = features->combineFeatures();
    Ptr<CombineFeatureInput> combineFeatureInput = combineFeatures->createInput(body1, bodyCollection);
    combineFeatureInput->operation(FeatureOperations(1));
    combineFeatureInput->isKeepToolBodies(false);
    combineFeatureInput->isNewComponent(false);
    Ptr<CombineFeature> returnValue = combineFeatures->add(combineFeatureInput);
    Ptr<BRepBody> part = returnValue->bodies()->item(0);
    return part;
}
import math, os, traceback
from enum import Enum
import adsk.fusion, adsk.core, adsk.cam

#################### Script Constants ####################
# We assume we are cutting Aluminum here...

# Milling tool library to get tools from
MILLING_TOOL_LIBRARY = 'Milling Tools (Metric)'

# Some material properties for feed and speed calculation
ALUMINUM_CUTTING_SPEED = 300  # mm/min
ALUMINUM_FEED_PER_TOOTH = 0.1 # mm/tooth

# Some tool preset names, known to exist for the selected tools
ALUMINUM_PRESET_ROUGHING = 'alu* rou*'
ALUMINUM_PRESET_FINISHING = 'Aluminum - Finishing'

#################### Useful Enumerators ####################
# Some tool types used in this script (enumerator)
class ToolType(Enum):
    BULL_NOSE_END_MILL = 'bull nose end mill'
    BALL_END_MILL = 'ball end mill'
    FACE_MILL = 'face mill'

# Setup work coordinate system (WCS) location (enumerator)
class SetupWCSPoint(Enum):
    TOP_CENTER = 'top center'
    TOP_XMIN_YMIN = 'top 1'
    TOP_XMAX_YMIN = 'top 2'
    TOP_XMIN_YMAX = 'top 3'
    TOP_XMAX_YMAX = 'top 4'
    TOP_SIDE_YMIN = 'top side 1'
    TOP_SIDE_XMAX = 'top side 2'
    TOP_SIDE_YMAX = 'top side 3'
    TOP_SIDE_XMIN = 'top side 4'
    CENTER = 'center'
    MIDDLE_XMIN_YMIN = 'middle 1'
    MIDDLE_XMAX_YMIN = 'middle 2'
    MIDDLE_XMIN_YMAX = 'middle 3'
    MIDDLE_XMAX_YMAX = 'middle 4'
    MIDDLE_SIDE_YMIN = 'middle side 1'
    MIDDLE_SIDE_XMAX = 'middle side 2'
    MIDDLE_SIDE_YMAX = 'middle side 3'
    MIDDLE_SIDE_XMIN = 'middle side 4'
    BOTTOM_CENTER = 'bottom center'
    BOTTOM_XMIN_YMIN = 'bottom 1'
    BOTTOM_XMAX_YMIN = 'bottom 2'
    BOTTOM_XMIN_YMAX = 'bottom 3'
    BOTTOM_XMAX_YMAX = 'bottom 4'
    BOTTOM_SIDE_YMIN = 'bottom side 1'
    BOTTOM_SIDE_XMAX = 'bottom side 2'
    BOTTOM_SIDE_YMAX = 'bottom side 3'
    BOTTOM_SIDE_XMIN = 'bottom side 4'

#################### Script Entry Point ####################
def run(context) -> None:
    ui = None
    try:

        #################### Initialisation #####################
        app = adsk.core.Application.get()
        ui: adsk.core.UserInterface  = app.userInterface

        # Create a new empty document
        doc: adsk.core.Document = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        # Get the design document used to create the sample part
        design: adsk.core.Product = app.activeProduct

        # Switch to manufacturing space
        camWS: adsk.core.Workspace = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the CAM product
        products: adsk.core.Products = doc.products

        #################### Create Sample Part ####################

        part: adsk.fusion.BRepBody = createSamplePart(design)

        #################### Select Cutting Tools ####################

        # Get the tool libraries from the library manager
        camManager = adsk.cam.CAMManager.get()
        libraryManager: adsk.cam.CAMLibraryManager = camManager.libraryManager
        toolLibraries: adsk.cam.ToolLibraries = libraryManager.toolLibraries

        url: adsk.core.URL = None
        libUrl = None
        useHardCodedUrl: bool = False
        if useHardCodedUrl:
            # We could use a library URl directly if we know its address ...
            libUrl = 'systemlibraryroot://Samples/Milling Tools (Metric).json'
            url = adsk.core.URL.create(libUrl)

        else:
            # ... or we can use the tool library objects
            # Fusion folder in the tool library
            fusionFolder: adsk.core.URL = toolLibraries.urlByLocation(adsk.cam.LibraryLocations.Fusion360LibraryLocation)
            fusionLibs: list[str] = getLibrariesURLs(toolLibraries, fusionFolder)

            # Search the required library url in the libraries
            for libUrl in fusionLibs:
                if MILLING_TOOL_LIBRARY in libUrl:
                    url = adsk.core.URL.create(libUrl)
                    break

        # Load the tool library
        toolLibrary: adsk.cam.ToolLibrary = toolLibraries.toolLibraryAtURL(url)

        # Create some variables to host the milling tools which will be used in the operations
        faceTool: adsk.cam.Tool = None
        adaptiveTool: adsk.cam.Tool = None
        finishingTool: adsk.cam.Tool = None

        # For the roughing operations, search for the face mill and the bull nose using a loop
        for tool in toolLibrary:
            # Read the tool type
            toolType: adsk.cam.ToolType = tool.parameters.itemByName('tool_type').value.value

            # Select the first face tool found
            if toolType == ToolType.FACE_MILL.value and not faceTool:
                faceTool = tool

            # Search for the roughing tool
            elif toolType == ToolType.BULL_NOSE_END_MILL.value and not adaptiveTool:
                # Look for a bull nose end mill tool larger or equal to 12mm but less than 14mm
                diameter: float = tool.parameters.itemByName('tool_diameter').value.value
                if diameter >= 1.2 and diameter < 1.4:
                    adaptiveTool = tool

            # Exit when the 2 tools are found
            if faceTool and adaptiveTool:
                break

        # Using a query, search for a ball end mill tool with diameter between 6 mm and 10 mm with a minimum flute length of 20.001mm
        finishingTools: list[adsk.cam.Tool] = getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(toolLibrary, ToolType.BALL_END_MILL.value, 0.6, 1, 2.0001)

        # For this example, we select the first tool found as our finishing tool
        finishingTool = finishingTools[0]

        #################### Create Setup ####################
        cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
        setups: adsk.cam.Setups = cam.setups
        setupInput: adsk.cam.SetupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)
        # Create a list for the models to add to the setup Input
        models:list = []
        # Add the part to the model list
        models.append(part)
        # Pass the model list to the setup input
        setupInput.models = models
        # Create the setup and set some properties
        setup: adsk.cam.Setup = setups.add(setupInput)
        setup.name = 'CAM Automation Script Sample'
        setup.stockMode = adsk.cam.SetupStockModes.RelativeBoxStock
        # Set the offset mode
        setup.parameters.itemByName('job_stockOffsetMode').expression = "'simple'"
        # Set offset stock side
        setup.parameters.itemByName('job_stockOffsetSides').expression = '0 mm'
        # Set offset stock top
        setup.parameters.itemByName('job_stockOffsetTop').expression = '1 mm'
        # Set setup origin
        setup.parameters.itemByName('wcs_origin_boxPoint').value.value = SetupWCSPoint.TOP_XMIN_YMIN.value

        #################### Face Operations ####################
        # Calculate feed and speed for the face operation
        toolDiameter: float = faceTool.parameters.itemByName('tool_diameter').value.value          # cm
        numberOfFlutes = faceTool.parameters.itemByName('tool_numberOfFlutes').value.value         # int
        spindleSpeed: float = ALUMINUM_CUTTING_SPEED / math.pi / (toolDiameter * 10) * 1000        # rpm
        cuttingFeedrate: float = spindleSpeed * ALUMINUM_FEED_PER_TOOTH * numberOfFlutes           # mm/min

        # Create a preset with those calculated feeds
        facePreset: adsk.cam.ToolPreset = faceTool.presets.add()
        facePreset.name = 'Aluminum (set by script)'
        facePreset.parameters.itemByName('tool_spindleSpeed').value.value = int(spindleSpeed)
        facePreset.parameters.itemByName('tool_feedCutting').expression = str(int(cuttingFeedrate)) + ' mm/min'

        # Create a face operation input
        input: adsk.cam.OperationInput = setup.operations.createInput('face')
        input.tool = faceTool
        input.toolPreset = facePreset # Assign created preset
        input.displayName = 'Face Operation'
        input.parameters.itemByName('tolerance').expression = '0.01 mm'
        input.parameters.itemByName('stepover').expression = '0.75 * tool_diameter'
        input.parameters.itemByName('direction').expression = "'climb'"

        # Determine pass angle along largest part dimension
        # Get stock box dimensions in cm
        stockX: float = setup.parameters.itemByName('job_stockInfoDimensionX').value.value
        stockY: float = setup.parameters.itemByName('job_stockInfoDimensionY').value.value

        # Determine pass angle to be along largest length (X or Y) of the block
        if stockX >= stockY:
            input.parameters.itemByName('passAngle').expression = '0 deg'
        else:
            input.parameters.itemByName('passAngle').expression = '90 deg'

        # Add the operation to the setup
        faceOp: adsk.cam.OperationBase = setup.operations.add(input)

        #################### Adaptive Operations ####################
        input = setup.operations.createInput('adaptive')
        input.tool = adaptiveTool
        input.displayName = 'Adaptive Roughing'
        input.parameters.itemByName('tolerance').expression = '0.1 mm'
        input.parameters.itemByName('maximumStepdown').expression = '5 mm'
        input.parameters.itemByName('fineStepdown').expression = '0.25 * maximumStepdown'
        input.parameters.itemByName('flatAreaMachining').expression = 'false'

        # Check if there is a tool preset related to aluminum roughing
        presets: adsk.cam.ToolPresets = adaptiveTool.presets.itemsByName(ALUMINUM_PRESET_ROUGHING)
        if len(presets) > 0:
            # Select the first preset found
            adaptivePreset: adsk.cam.ToolPreset = presets[0]
            input.toolPreset = adaptivePreset

        # Add the operation to the setup
        adaptiveOp: adsk.cam.OperationBase = setup.operations.add(input)

        #################### Finishing Tool Preset ####################
        # Select a tool preset from the finishing tool
        finishingPreset: adsk.cam.ToolPreset = None
        presets = finishingTool.presets.itemsByName(ALUMINUM_PRESET_FINISHING)
        if len(presets) > 0:
            # Use the first aluminum finishing preset found
            finishingPreset = presets[0]

        #################### Parallel Operations ####################
        input = setup.operations.createInput('parallel')
        input.tool = finishingTool
        input.displayName = 'Parallel Finishing'
        input.parameters.itemByName('tolerance').expression = '0.01 mm'
        input.parameters.itemByName('cuspHeightStepover').expression = '0.005 mm'
        input.parameters.itemByName('boundaryMode').expression = "'selection'"
        if finishingPreset:
            # Assign the finishing tool preset
            input.toolPreset = finishingPreset

        # Add the operation to the setup
        parallelOp: adsk.cam.OperationBase = setup.operations.add(input)

        # Lets use a contour for the sake of demonstration
        limitEdge: adsk.fusion.BRepEdge = None
        for e in part.edges:
            # This is the inner one: intersection of a plane and a sphere making up a circle
            if e.geometry.curveType == adsk.core.Curve3DTypes.Circle3DCurveType:
                limitEdge = e
                break

        if limitEdge:
            # Apply the limiting edge to the operation
            cadcontours2dParam: adsk.cam.CadContours2dParameterValue = parallelOp.parameters.itemByName('machiningBoundarySel').value
            chains: adsk.cam.CurveSelections = cadcontours2dParam.getCurveSelections()
            chain: adsk.cam.ChainSelection = chains.createNewChainSelection()
            chain.inputGeometry = [limitEdge]
            cadcontours2dParam.applyCurveSelections(chains)

        #################### Steep And Shallow Operations ####################
        # Create folder for finishing operations that require Machining Extension
        operationInput: adsk.cam.OperationInput = setup.operations.createInput('folder')
        operationInput.displayName = 'Machining Extension Required'
        folder: adsk.cam.CAMFolder = setup.operations.add(operationInput)

        # Create steep and shallow operation in the folder
        input = setup.operations.createInput('steep_and_shallow')
        input.tool = finishingTool
        input.displayName = 'Steep and Shallow Finishing'
        input.parameters.itemByName('tolerance').expression = '0.01 mm'
        input.parameters.itemByName('useAvoidFlats').expression = 'true'
        input.parameters.itemByName('cuspHeightStepdown').expression = '0.005 mm'
        input.parameters.itemByName('cuspHeightStepover').expression = 'cuspHeightStepdown'
        input.parameters.itemByName('spiral').expression = 'true'
        input.parameters.itemByName('shallowSpiral').expression = 'true'
        input.parameters.itemByName('offsetSmoothing').expression = 'true'

        # Assign the finishing tool preset
        if finishingPreset:
            input.toolPreset = finishingPreset

        # Add the operation to the folder
        steepAndShallowOp: adsk.cam.OperationBase = folder.operations.add(input)

        # Check if this toolpath is generatable as "steep_and_shallow" requires the manufacturing extension
        isSteepAndShallowGeneratable: bool = False
        for op in setup.operations.compatibleStrategies:
            if op.name == 'steep_and_shallow':
                if op.isGenerationAllowed:
                    # If isGenerationAllowed is False, the extension isn't active, preventing generation of the steep_and_shallow operation
                    isSteepAndShallowGeneratable = True
                break

        #################### Generate Operations ####################
        # Include the valid operations to generate
        operations = adsk.core.ObjectCollection.create()
        operations.add(faceOp)
        operations.add(adaptiveOp)
        operations.add(parallelOp)
        if isSteepAndShallowGeneratable:
            operations.add(steepAndShallowOp)

        # create progress bar
        progressDialog: adsk.core.ProgressDialog = ui.createProgressDialog()
        progressDialog.isCancelButtonShown = False
        progressDialog.show('Generating operations...', '%p%', 0, 100)
        adsk.doEvents() # Allow Fusion to update so the progressDialog shows up nicely

        # Generate the valid operations
        gtf: adsk.cam.GenerateToolpathFuture = cam.generateToolpath(operations)

        # Wait for the generation to be finished and update progress bar
        while not gtf.isGenerationCompleted:
            # Calculate progress and update progress bar
            total = gtf.numberOfOperations
            completed = gtf.numberOfCompleted
            progress = int(completed * 100 / total)
            progressDialog.progressValue = progress
            adsk.doEvents() # Allow Fusion to update so the screen doesn't freeze

        # Generation done
        progressDialog.progressValue = 100
        progressDialog.hide()

        #################### NC Program And Post-processing ####################
        # Get the post library from library manager
        postLibrary: adsk.cam.PostLibrary = libraryManager.postLibrary

        # Query post library to get postprocessor list
        postQuery: adsk.cam.PostConfigurationQuery = postLibrary.createQuery(adsk.cam.LibraryLocations.Fusion360LibraryLocation)
        postQuery.vendor = "Autodesk"
        postQuery.capability = adsk.cam.PostCapabilities.Milling
        postConfigs: list[adsk.cam.PostConfiguration] = postQuery.execute()

        # Find the "XYZ" post in the post library and import it to local library
        for config in postConfigs:
            if config.description == 'XYZ':
                url = adsk.core.URL.create("user://")
                importedURL: adsk.core.URL = postLibrary.importPostConfiguration(config, url, "NCProgramSamplePost.cps")

        # Get the imported local post config
        postConfig: adsk.cam.PostConfiguration = postLibrary.postConfigurationAtURL(importedURL)

        # Create NCProgramInput object
        ncInput: adsk.cam.NCProgramInput = cam.ncPrograms.createInput()
        ncInput.displayName = 'NC Program Sample'

        # Change some nc program parameters...
        ncParameters: adsk.cam.CAMParameters = ncInput.parameters
        ncParameters.itemByName('nc_program_filename').value.value = 'NCProgramSample'
        ncParameters.itemByName('nc_program_openInEditor').value.value = True

        # Set user desktop as output directory (Windows and Mac)
        # Make the path valid for Fusion by replacing \\ to / in the path
        desktopDirectory = os.path.expanduser("~/Desktop").replace('\\', '/')
        ncParameters.itemByName('nc_program_output_folder').value.value = desktopDirectory

        # Select the operations to generate (we skip steep_and_shallow here)
        ncInput.operations = [faceOp, adaptiveOp, parallelOp]

        # Add a new ncprogram from the ncprogram input
        newProgram: adsk.cam.NCProgram = cam.ncPrograms.add(ncInput)

        # Set post processor
        newProgram.postConfiguration = postConfig

        # Change some post parameter
        postParameters: adsk.cam.CAMParameters = newProgram.postParameters

        # NcProgram parameters are passed as theyare to the postprocessor (they have no units)
        postParameters.itemByName('builtin_tolerance').value.value = 0.01
        postParameters.itemByName('builtin_minimumChordLength').value.value = 0.33

        # Update/apply post parameters
        newProgram.updatePostParameters(postParameters)

        # Set post options, by default post process only valid operations containing toolpath data
        postOptions = adsk.cam.NCProgramPostProcessOptions.create()

        # Post-process
        newProgram.postProcess(postOptions)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

#################### Functions To Make Our Life Easier ####################

def getLibrariesURLs(libraries: adsk.cam.ToolLibraries, url: adsk.core.URL) -> list[str]:
    ''' Return the list of libraries' URLs for the specified libraries '''
    urls: list[str] = []
    libs: list[adsk.core.URL] = libraries.childAssetURLs(url)
    for lib in libs:
        urls.append(lib.toString())
    for folder in libraries.childFolderURLs(url):
        urls = urls + getLibrariesURLs(libraries, folder)
    return urls

def getToolsFromLibraryByTypeDiameterRangeAndMinFluteLength(toolLibrary: adsk.cam.ToolLibrary, tooltype: str, minDiameter: float, maxDiameter: float, minimumFluteLength: float = None) -> list[adsk.cam.Tool]:
    ''' Return a list of tools that satisfy the search '''
    query: adsk.cam.ToolQuery = toolLibrary.createQuery()
    # Set the search critera
    query.criteria.add('tool_type', adsk.core.ValueInput.createByString(tooltype))
    query.criteria.add('tool_diameter.min', adsk.core.ValueInput.createByReal(minDiameter))
    query.criteria.add('tool_diameter.max', adsk.core.ValueInput.createByReal(maxDiameter))
    if minimumFluteLength:
        query.criteria.add('tool_fluteLength.min', adsk.core.ValueInput.createByReal(minimumFluteLength))
    # Get query results
    results: list[adsk.cam.ToolQueryResult] = query.execute()
    # Get the tools from the query
    tools: list[adsk.cam.Tool] = []
    for result in results:
        # Results have a tool, url, toollibrary and the index of the tool in that library: we just return the tool here
        tools.append(result.tool)
    return tools

#################### CAD Creation ####################

def createSamplePart(design: adsk.fusion.Design) -> adsk.fusion.BRepBody:
    """ Creates the sample part for this script """
    # The sample part is a box containing a concave side generated by subtracting the intersection from a sphere.
    # The lower face of the box is at Z=0 and we position the sphere above but intersecting with the box upper face.
    # Fusion's default behaviour is now to ground the first component of an assembly to the parent.
    # This can be overriden, see Preferences ->General ->Design ->Assemblies ->First component grounded to parent
    # However if we make the first component the box, we can move the sphere without changing anything

    box: adsk.fusion.BRepBody = createBox(design, 22, 15, 5) # 1st component occurrence
    sphere: adsk.fusion.BRepBody = createSphere(design, 7.5) # 2nd component occurrence

    # Get the root component
    rootComp: adsk.fusion.Component = design.rootComponent
    occs: adsk.fusion.Occurrences = rootComp.occurrences

    # Get the second Occurrence (sphere) as the first occurrence (box) may be grounded to the parent
    occ: adsk.fusion.Occurrence = occs.item(1)
    mat: adsk.core.Matrix3D = occ.transform

    # Matrix translation, moving the sphere up by 10 units along Z axis
    mat.translation = adsk.core.Vector3D.create(0, 0, 10)

    # Set transform
    occ.transform = mat

    # Snapshot - Determining the position is important!!!
    design.snapshots.add()

    # Cut the sphere/box intersection from the box to leave a concave face
    part: adsk.fusion.BRepBody = getBodyFromBooleanOperation(design, box, sphere)
    return part

def createBox(design: adsk.fusion.Design, sizeX: float, sizeY: float, sizeZ: float) -> adsk.fusion.BRepBody:
    ''' Creates a sample box'''
    component: adsk.fusion.Component = design.rootComponent
    # Create sketch
    sketches: adsk.fusion.Sketches = component.sketches
    sketch: adsk.fusion.Sketch = sketches.add(component.xYConstructionPlane)
    lines: adsk.fusion.SketchLines = sketch.sketchCurves.sketchLines
    lines.addTwoPointRectangle(adsk.core.Point3D.create(-sizeX / 2, -sizeY / 2, 0), adsk.core.Point3D.create(sizeX / 2, sizeY / 2, 0))
    prof: adsk.fusion.Profile = sketch.profiles.item(0)
    extrudes: adsk.fusion.ExtrudeFeatures = component.features.extrudeFeatures
    distance = adsk.core.ValueInput.createByReal(sizeZ)
    ext: adsk.fusion.ExtrudeFeature = extrudes.addSimple(prof, distance, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)
    return ext.bodies.item(0)

def createSphere(design: adsk.fusion.Design, radius: float) -> adsk.fusion.BRepBody:
    ''' Creates a sample sphere '''
    component: adsk.fusion.Component = design.rootComponent
    # Create a new sketch on the xy plane.
    sketches: adsk.fusion.Sketches = component.sketches
    xyPlane: adsk.fusion.ConstructionPlane = component.xYConstructionPlane
    sketch: adsk.fusion.Sketch = sketches.add(xyPlane)
    # Draw a circle.
    circles: adsk.fusion.SketchCircles = sketch.sketchCurves.sketchCircles
    circles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), radius)
    # Draw a line to use as the axis of revolution.
    lines: adsk.fusion.SketchLines = sketch.sketchCurves.sketchLines
    axisLine: adsk.fusion.SketchLine = lines.addByTwoPoints(adsk.core.Point3D.create(-radius, 0, 0), adsk.core.Point3D.create(radius, 0, 0))
    # Get the profile defined by half of the circle.
    prof: adsk.fusion.Profile = sketch.profiles.item(0)
    # Create an revolution input for a revolution while specifying the profile and that a new component is to be created
    revolves: adsk.fusion.RevolveFeatures = component.features.revolveFeatures
    revInput: adsk.fusion.RevolveFeatureInput = revolves.createInput(prof, axisLine, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)
    # Define that the extent is an angle of 2*pi to get a sphere
    angle = adsk.core.ValueInput.createByReal(2*math.pi)
    revInput.setAngleExtent(False, angle)
    # Create the extrusion.
    ext: adsk.fusion.RevolveFeature = revolves.add(revInput)
    return ext.bodies.item(0)

def getBodyFromBooleanOperation(design: adsk.fusion.Design, body1: adsk.fusion.BRepBody, body2: adsk.fusion.BRepBody) -> adsk.fusion.BRepBody:
    """ Creates a boolean operation between two bodies """
    model: adsk.fusion.Component = design.activeComponent
    features: adsk.fusion.Features = model.features
    # Create a collection and add our sphere
    bodyCollection = adsk.core.ObjectCollection.create()
    bodyCollection.add(body2)

    # Create a CombineFeatureInput using our box (body1), sphere (bodyCollection) specifying a 'cut' operation
    combineFeatures: adsk.fusion.CombineFeatures = features.combineFeatures
    combineFeatureInput: adsk.fusion.CombineFeatureInput = combineFeatures.createInput(body1, bodyCollection)
    combineFeatureInput.operation = adsk.fusion.FeatureOperations.CutFeatureOperation
    combineFeatureInput.isKeepToolBodies = False
    combineFeatureInput.isNewComponent = False

    # Generate our combined feature
    returnValue: adsk.fusion.CombineFeature = combineFeatures.add(combineFeatureInput)
    part: adsk.fusion.BRepBody = returnValue.bodies[0]
    return part


Create CAM Operation From Template API Sample

Description

Demonstrates adding a new toolpath into the document using an existing CAM template. You can view the template here, although it will be loaded automatically. Run the sample script within any Fusion project containing at least one setup. A new facing operation will be created at the end of each setup discovered.

Code Samples

  • C++
  • Python
// Apply a CAM Template to a specific machining operation on the selected model of each setup.

#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <Cam/CamAll.h>
#include <fstream>
#include <algorithm>

using namespace adsk::core;
using namespace adsk::fusion;
using namespace adsk::cam;

// The location from where a sample template file can be downloaded if performed manually.
std::string TEMPLATE_URL = "https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/ExtraFiles/face.f3dhsm-template";

// The name of the template file.
std::string TEMPLATE_FILE = "face.f3dhsm-template";

// The URN is the identifier of the template as located within Fusion's library of sample templates.
std::string TEMPLATE_URN = "urn:adsk.wipprod:fs.file:vf.p0C9h2KARa61iM_vsZauog?version=1";

// Variable initialisation.
Ptr<Application> app = Application::get();
Ptr<UserInterface> ui = app->userInterface();
Ptr<Document> doc = app->activeDocument();

// Abandon the script with a dialog explaining the reason and solution
bool abandonScript(std::string& notice)
{
    notice += "\nAfter completing the above tasks, run this script again.";
    // Spaces appended to the title make the messageBox wider, preventing line wrapping.
    ui->messageBox(
        notice,
        "Please take note of the following:\t\t\t\t",
        MessageBoxButtonTypes::OKButtonType,
        MessageBoxIconTypes::WarningIconType);
    return true;
}

// Function to check whether the template file exists.
bool fileExists(const std::string& filename)
{
    std::ifstream file(filename);
    return file.good();
}

extern "C" XI_EXPORT bool run(const char* context)
{
    std::string notice = "";
    size_t occurrenceCount = 0;
    size_t bRepBodyCount = 0;

    // Switch to manufacturing space.
    Ptr<Workspace> camWS = ui->workspaces()->itemById("CAMEnvironment");
    camWS->activate();

    // Get the CAM product.
    Ptr<Products> products = doc->products();
    Ptr<Product> product = app->activeProduct();
    Ptr<CAM> cam = products->itemByProductType("CAMProductType");

    // Get the CAD product.
    Ptr<Design> design = products->itemByProductType("DesignProductType");

    // An alternative possibility.
    if (!design)
    {
        Ptr<Design> design = products->itemByProductType("WorkingModelProduct");
    }

    // Check that a model exists in this document.
    if (design)
    {
        occurrenceCount = design->rootComponent()->occurrences()->count();
        bRepBodyCount = design->rootComponent()->bRepBodies()->count();
    }
    else
    {
        notice += "No active Fusion design found.\n";
    }

    if (bRepBodyCount < 1 && occurrenceCount < 1)
    {
        notice += "\nNo model found. Open a Fusion document that contains a model.\n";
    }

    // Check we have an existing setup and abandon if not.
    Ptr<Setups> setups = cam->setups();
    if (setups->count() < 1)
    {
        notice += "\nNo setup found. Create a setup and assign a model to it.\n";
    }

    // Present a single messageBox stating problems, remedies and instructions.
    if (notice.length() > 0)
    {
        return abandonScript(notice);
    }

    // We are unable to read the content of a CAMTemplate dataFile directly from its URN.
    // Instead we download the dataFile from the URN into a temporary folder and read the file contents.

    // Set CAM temporary folder as inputFolder.
    std::string inputFolder = cam->temporaryFolder();

    // Variable inputFolder may contain backslashes but we need forward slashes.
    std::replace_if(
        inputFolder.begin(), inputFolder.end(), [](char ch) { return ch == '\\'; }, '/');

    // Specify the full filename of the template.
    std::string templatePathname = inputFolder + "/" + TEMPLATE_FILE;

    // Check if the template exists(from the path specified above).Show an error if it fails to download.
    if (!fileExists(templatePathname))
    {
        Ptr<DataFile> templateDataFile = app->data()->findFileById(TEMPLATE_URN);
        bool downloadSuccess = false;

        if (templateDataFile)
        {
            downloadSuccess = templateDataFile->download(templatePathname, NULL);
        }
        else
        {
            notice += "\nUnable to locate template via " + TEMPLATE_URN + "\n";
        }

        if (!downloadSuccess)
        {
            // We should never get here but if so, explain how to perform the previous step manually.
            notice += "\nThe template file: " + TEMPLATE_FILE + " has not been found.\n";
            notice += "\nCreate your own template file called \"" + TEMPLATE_FILE;
            notice += "\" or download a sample file from here : \n\n" + TEMPLATE_URL + "\n\n";
            notice += "Move the downloaded template file to this folder:\n\n" + inputFolder + "\n\n";
        }
    }

    // Present a single messageBox stating problems, remedies and instructions.
    if (notice.length() > 0)
    {
        return abandonScript(notice);
    }

    // Iterate through each setup and insert the template into the setup.
    // for each (Ptr<Setup> setup in cam->setups()) // for each iterator fails on Mac when tried.
    for (size_t i = 0; i < setups->count(); i++)
    {
        // Add the template to each setup.
        Ptr<ObjectCollection> results = setups->item(i)->createFromTemplate(templatePathname);

        // Get the operation that was created.What's created will vary depending on what's defined
        // in the template so you may need more logic to find the result you want.
        Ptr<Operation> operation = results->item(0);

        std::string name = operation->name() + " (API added operation)";
        operation->name(name);
    }

    // Generate all toolpaths, skipping any that are already valid.
    cam->generateAllToolpaths(true);

    // Indicate what has changed within the setup.
    notice = "Expand the setup to see all operations.\n\n";
    notice += "Note the operation names appended with: (API added operation).";
    ui->messageBox(
        notice,
        "Operation creation from template complete.\t\t",
        MessageBoxButtonTypes::OKButtonType,
        MessageBoxIconTypes::InformationIconType);

    return true;
}
# Apply a CAM Template to a specific machining operation on the selected model of each setup.

import adsk.core, adsk.fusion, adsk.cam, os, traceback

# The location from where a sample template file can be downloaded if performed manually.
TEMPLATE_URL = 'https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/ExtraFiles/face.f3dhsm-template'

# The name of the template file.
TEMPLATE_FILE = 'face.f3dhsm-template'

# The URN is the identifier of the template as located within Fusion's library of sample templates.
TEMPLATE_URN = 'urn:adsk.wipprod:fs.file:vf.p0C9h2KARa61iM_vsZauog?version=1'

# Variable initialisation.
app = adsk.core.Application.get()
ui = app.userInterface
doc = app.activeDocument

def abandonScript(notice:str):
    notice += '\nAfter completing the above tasks, run this script again.'
    # Spaces appended to the title make the messageBox wider, preventing line wrapping.
    ui.messageBox(
        notice,
        'Please take note of the following:\t\t\t\t',
        adsk.core.MessageBoxButtonTypes.OKButtonType,
        adsk.core.MessageBoxIconTypes.WarningIconType)

def run(context):

    # Variable initialisation.
    notice = ''
    occurrenceCount = 0
    bRepBodyCount = 0

    try:
        # Switch to manufacturing space.
        camWS = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the CAM product.
        products = doc.products
        cam: adsk.cam.CAM = products.itemByProductType('CAMProductType')

        # Get the CAD product.
        design: adsk.fusion.Design = products.itemByProductType('DesignProductType')

        # An alternative possibility.
        if not design:
            design = products.itemByProductType('WorkingModelProductType')

        # Check that a model exists in this document.
        if design:
            occurrenceCount  = design.rootComponent.occurrences.count
            bRepBodyCount = design.rootComponent.bRepBodies.count
        else:
            notice += 'No active Fusion design found.\n'

        if bRepBodyCount < 1 and occurrenceCount < 1:
            notice += f'\nNo model found. Open a Fusion document that contains a model.\n'

        # Check we have an existing setup and abandon if not.
        setups: adsk.cam.Setups = cam.setups
        if setups.count < 1:
            notice += '\nNo setup found. Create a setup and assign a model to it.\n'

        # Present a single messageBox stating problems, remedies and instructions.
        if (len(notice) > 0):
            abandonScript(notice)
            return

        # We are unable to read the content of a CAMTemplate dataFile directly from its URN.
        # Instead we download the dataFile from the URN into a temporary folder and read the file contents.

        # Set CAM temporary folder as inputFolder.
        # Variable inputFolder may contain backslashes but we need forward slashes.
        inputFolder = str(cam.temporaryFolder).replace('\\', '/')

        # Specify the full filename of the template.
        templatePathname = f'{inputFolder}/{TEMPLATE_FILE}'

        # Check if the template exists (from the path specified above). Show an error if it fails to download.
        if not os.path.exists(templatePathname):
            templateDataFile: adsk.core.DataFile = None
            try:
                templateDataFile = app.data.findFileById(TEMPLATE_URN)
            except:
                notice += f'\nUnable to locate template via {TEMPLATE_URN}.\n'

            downloadSuccess:bool = False
            if templateDataFile:
                try:
                    downloadSuccess = templateDataFile.download(templatePathname, None)
                except Exception as e:
                    notice += f'\n{e}\n'

            if not downloadSuccess:
                # We should never get here but if so, explain how to perform the previous step manually.
                notice += f'\nThe template file: {TEMPLATE_FILE} has not been found.\n'
                notice += f'\nCreate your own template file called {TEMPLATE_FILE} '
                notice += f'or download a sample file from here:\n\n{TEMPLATE_URL}\n\n'
                notice += f'Move the downloaded template file to this folder:\n\n{inputFolder}\n\n'

        # Present a single messageBox stating problems, remedies and instructions.
        if len(notice) > 0:
            abandonScript(notice)
            return

        # Go through each setup in the document.
        for setup in setups:
            # Add a templated operation to each setup.
            templateInput = adsk.cam.CreateFromCAMTemplateInput.create()
            camTemplate = adsk.cam.CAMTemplate.createFromFile(templatePathname)
            templateInput.camTemplate = camTemplate
            results: list[adsk.cam.OperationBase] = setup.createFromCAMTemplate2(templateInput)

            # Get the operation that was created. What's created will vary depending on what's defined
            # in the template so you may need more logic to find the result you want.
            operation: adsk.cam.OperationBase = results[0]

            # Change the operation name.
            name = operation.name + ' (API added operation)'
            operation.name = name

            # Make the toolpath visible.
            operation.isSuppressed = False
            operation.isLightBulbOn = True

        # Generate all toolpaths, skipping any that are already valid.
        cam.generateAllToolpaths(True)

        # Indicate what has changed within the setup.
        notice = 'Expand the setup to see all operations.\n\n'
        notice += 'Note the operation names appended with: (API added operation).'
        ui.messageBox(
            notice,
            'Operation creation from template complete.\t\t',
            adsk.core.MessageBoxButtonTypes.OKButtonType,
            adsk.core.MessageBoxIconTypes.InformationIconType)

    # Capture and highlight any reason for error
    except Exception as e:
        if ui:
            ui.messageBox(
                f'Failed: {e}\n{format(traceback.format_exc())}',
                'Unable to continue',
                adsk.core.MessageBoxButtonTypes.OKButtonType,
                adsk.core.MessageBoxIconTypes.CriticalIconType)


Post Toolpaths API Sample

Description

Demonstrates posting toolpaths in the active document.

Code Samples

  • C++
  • Python
/////////////////////////////////////////////////////////////////////////////////////////////////
// For this sample script to run, the active Fusion document needs 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;

// Define a base class pointer for common usage.
using CAMObjectPtr = Ptr<OperationBase>;

// Function to ensure pathnames use forward slashes as required by the NC Program Output Folder.
void replaceBackslashWithSlash(std::string& str)
{
    for (char& ch : str)
        if (ch == '\\')
            ch = '/';
}
// Customised messageBox to handle critical errors in one line
void criticalError(Ptr<UserInterface> ui, const std::string& message)
{
    ui->messageBox(
        message, "Critical Error", MessageBoxButtonTypes::OKButtonType, MessageBoxIconTypes::CriticalIconType);
}

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    Ptr<UserInterface> 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, abandon cleanly if not.
    std::string operationErrorMsg = "This script requires the active document to contain at least one CAM operation.";

    Ptr<CAM> camProduct = products->itemByProductType("CAMProductType");
    if (!camProduct)
    {
        criticalError(ui, operationErrorMsg);
        return false;
    }

    // Initialize the CAM manager to access the library manager and the post processor library.
    Ptr<CAMManager> camManager = CAMManager::get();
    Ptr<CAMLibraryManager> libraryManager = camManager->libraryManager();
    Ptr<PostLibrary> postLibrary = libraryManager->postLibrary();

    // Create a query to filter post processors from the Fusion library by the vendor "Autodesk".
    Ptr<PostConfigurationQuery> postQuery = postLibrary->createQuery(LibraryLocations::Fusion360LibraryLocation);
    postQuery->vendor("Autodesk");

    // Set the post configuration to use based on Operation Type of the first Setup.
    Ptr<Setup> setup;
    Ptr<Setups> setups = camProduct->setups();
    if (setups)
    {
        setup = setups->item(0);
        if (!setup)
        {
            criticalError(ui, operationErrorMsg);
            return false;
        }
    }

    OperationTypes opType = setup->operationType();

    switch (opType)
    {
    case adsk::cam::MillingOperation:
        postQuery->capability(adsk::cam::PostCapabilities::Milling);
        break;
    case adsk::cam::TurningOperation:
        postQuery->capability(adsk::cam::PostCapabilities::Turning);
        break;
    case adsk::cam::JetOperation:
        postQuery->capability(adsk::cam::PostCapabilities::Jet);
        break;
    default:
        postQuery->capability(adsk::cam::PostCapabilities::Milling);
        break;
    }

    std::vector<Ptr<PostConfiguration>> postConfigs = postQuery->execute();

    Ptr<URL> importedURL;
    std::string ncExtension;
    std::string postRequired = "RS-274D";
    std::string postDescription = "";

    // Find the required post in the post library and import it to local library.
    for (Ptr<PostConfiguration>& config : postConfigs)
    {
        if (config->description() == postRequired)
        {
            postDescription = postRequired;
            ncExtension = config->extension();
            Ptr<URL> configUrl = URL::create("user://");
            importedURL = postLibrary->importPostConfiguration(config, configUrl, "NCProgramSamplePost.cps");
            break;
        }
    }
    // Check if the required post was found, abandon cleanly if not.
    if (postDescription.empty())
    {
        criticalError(ui, "Unable to find postprocessor " + postRequired + ".");
        return false;
    }

    // Get the imported local post config.
    Ptr<PostConfiguration> postConfig = postLibrary->postConfigurationAtURL(importedURL);

    // Prompt the user with an option to view the resulting NC file.
    DialogResults dlgResults = ui->messageBox(
        "View nc file when done?",
        "Post-processing",
        MessageBoxButtonTypes::YesNoButtonType,
        MessageBoxIconTypes::QuestionIconType);
    bool viewResult = (dlgResults == DialogResults::DialogYes);

    // Create NCProgramInput object
    Ptr<NCProgramInput> ncInput = camProduct->ncPrograms()->createInput();

    // 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 = 1;
    std::string message = "Yes \t- All toolpaths will be posted.\n\n"
                          "No \t- Toolpaths in the first setup will be posted.\n\n"
                          "Cancel\t- The first toolpath in the first setup will be posted.\n";

    // Spaces appended to the title make the messageBox wider, preventing linw wrapping.
    DialogResults mbChoice = ui->messageBox(
        message,
        "Select what should be post-processed                                   ",
        MessageBoxButtonTypes::YesNoCancelButtonType,
        MessageBoxIconTypes::QuestionIconType);

    if (mbChoice == DialogResults::DialogYes)
    {
        scenario = 1;
    }
    else if (mbChoice == DialogResults::DialogNo)
    {
        scenario = 2;
    }
    else
    {
        scenario = 3;
    }

    // Adjust NC program parameters.
    ncInput->displayName("Sample NCProgram");

    Ptr<CAMParameters> ncParameters = ncInput->parameters();
    Ptr<StringParameterValue> nc_program_filename = ncParameters->itemByName("nc_program_filename")->value();

    // Embelish the nc filename to indicate chosen scenario and programming language.
    std::string programName = "NCProgramSampleCPP" + std::to_string(scenario);
    nc_program_filename->value(programName);

    // Provide a comment at the top of the file.
    Ptr<StringParameterValue> nc_program_comment = ncParameters->itemByName("nc_program_comment")->value();
    std::string comment = "This is the Post Toolpaths API Sample NC Program";
    nc_program_comment->value(comment);

    // Open nc file in editor if earlier requested.
    Ptr<BooleanParameterValue> nc_program_openInEditor = ncParameters->itemByName("nc_program_openInEditor")->value();
    nc_program_openInEditor->value(viewResult);

    // Set temp directory as output directory.
    std::string outputFolder = camProduct->temporaryFolder();

    // Variable outputFolder may contain backslashes but we need forward slashes.
    replaceBackslashWithSlash(outputFolder);
    Ptr<StringParameterValue> nc_program_output_folder = ncParameters->itemByName("nc_program_output_folder")->value();
    nc_program_output_folder->value(outputFolder);

    // We have already declared a setups Ptr for all 3 scenarios.
    // Scenarios 2 and 3 use firstSetup.
    Ptr<Setup> firstSetup = setups->item(0);

    switch (scenario)
    {
    case 1:
        {
            // ncInput->operations() expects a list of type 'OperationBase'.
            // For example: Operation, CAMFolder, CAMPattern, Setup.
            // It will not accept CAMFolders, CAMPatterns or Setups (all plural)
            // as they are derived from core.Base. We make our own list instead.

            // Create a vector for the content of core.Base objects.
            std::vector<CAMObjectPtr> camObjects;

            for (size_t i = 0; i < setups->count(); ++i)
            {
                // Add the operation to the operations list.
                camObjects.push_back(setups->item(i));
            }
            ncInput->operations({camObjects}); // Include all setups
            break;
        }
    case 2:
        {
            ncInput->operations({firstSetup}); // Only include the first setup
            break;
        }

    case 3:
        {
            Ptr<Operation> firstOperation = firstSetup->allOperations()->item(0);

            if (firstOperation->hasToolpath())
            {
                ncInput->operations({firstOperation}); // First operation of first setup
            }
            else
            {
                criticalError(ui, "Operation has no toolpath to post");
                return false;
            }
            break;
        }
    }

    // Create a new NC program using NC Program input and specified parameters and operations.
    Ptr<NCProgram> newProgram = camProduct->ncPrograms()->add(ncInput);

    // Configure the post processor
    newProgram->postConfiguration(postConfig);

    // Example of changing a post parameter. Parameters need to be declared as their correct type.
    Ptr<CAMParameters> postParams = newProgram->postParameters();

    // Parameter builtin_tolerance is of Type FloatParameterValue.
    Ptr<FloatParameterValue> builtInTolerance = postParams->itemByName("builtin_tolerance")->value();

    // Demonstrating how to check current parameter value and modify it.
    std::string previous = "Previous builtin_tolerance: " + std::to_string(builtInTolerance->value());
    builtInTolerance->value(0.004);
    app->log(previous + "\tNew value: " + std::to_string(builtInTolerance->value()));

    // The next assignment returns null if you use a post-processor that does not support
    // block numbering - for example "XYZ" or "Generic 2D", however you will not need it in that case.
    Ptr<CAMParameter> showSequenceNumbersParam = postParams->itemByName("showSequenceNumbers");
    if (showSequenceNumbersParam)
    {
        // Parameter showSequenceNumbers is of type ChoiceParameterValue so "false" is a string not a boolean.
        Ptr<ChoiceParameterValue> showSequenceNumbers = postParams->itemByName("showSequenceNumbers")->value();

        // Demonstrating how to check current parameter value and modify it.
        previous = "Previous showSequenceNumbers: " + showSequenceNumbers->value();
        showSequenceNumbers->value("false");
        app->log(previous + "\tNew value: " + showSequenceNumbers->value());
    }
    // Update to apply changes.
    newProgram->updatePostParameters(postParams);

    // Finally post the process.
    Ptr<NCProgramPostProcessOptions> postOptions = adsk::cam::NCProgramPostProcessOptions::create();
    newProgram->postProcess(postOptions);

    // Activate CAM workspace if it is not the active one.
    if (ui->activeWorkspace()->name() != "Manufacture")
    {
        DialogResults result = ui->messageBox(
            "Activate the CAM Workspace?",
            "CAM Workspace Activate",
            MessageBoxButtonTypes::YesNoButtonType,
            MessageBoxIconTypes::QuestionIconType);
        if (result == DialogResults::DialogYes)
        {
            Ptr<Workspace> camWorkspace = ui->workspaces()->itemById("CAMEnvironment");
            camWorkspace->activate();
        }
    }

    // Indicate completion.
    ui->messageBox(
        "Post processing is complete. See file:\n" + outputFolder + "/" + programName + ncExtension,
        "Post Toolpath API Sample  \t\t\t\t\t"); // Prevent line breaks

    return true;
}
# For this sample script to run, the active Fusion document needs at least one CAM operation.

import adsk.core, adsk.fusion, adsk.cam, traceback

app = adsk.core.Application.get()
ui = app.userInterface

def criticalError(message:str):
    ''' Customised messageBox to handle critical errors in one line '''
    ui.messageBox(  message,
                    'Critical Error',
                    adsk.core.MessageBoxButtonTypes.OKButtonType,
                    adsk.core.MessageBoxIconTypes.CriticalIconType)

def run(context):
    try:
        doc: adsk.core.Document = app.activeDocument
        products: adsk.core.Products = doc.products
        try:
            product: adsk.core.Product = products.itemByProductType('CAMProductType')
        except Exception:
            product = None

        # Check if the document has a CAMProductType, abandon cleanly if not.
        operationErrorMsg = 'This script requires the active document to contain at least one CAM operation.'
        if product == None:
            criticalError(operationErrorMsg)
            return

        cam = adsk.cam.CAM.cast(product)

        # Initialize the CAM manager to access the library manager and the post processor library.
        camManager = adsk.cam.CAMManager.get()
        libraryManager: adsk.cam.CAMLibraryManager = camManager.libraryManager
        postLibrary: adsk.cam.PostLibrary = libraryManager.postLibrary

        # Create a query to filter post processors from the Fusion library by the vendor "Autodesk".
        postQuery: adsk.cam.PostConfigurationQuery = \
                postLibrary.createQuery(adsk.cam.LibraryLocations.Fusion360LibraryLocation)
        postQuery.vendor = "Autodesk"

        # Set the post configuration to use based on Operation Type of the first Setup.
        try:
            firstSetupOperationType: adsk.cam.OperationTypes = cam.setups.item(0).operationType
        except:
            criticalError(operationErrorMsg)
            return

        if firstSetupOperationType == adsk.cam.OperationTypes.MillingOperation:
            postQuery.capability = adsk.cam.PostCapabilities.Milling
        elif firstSetupOperationType == adsk.cam.OperationTypes.TurningOperation:
            postQuery.capability = adsk.cam.PostCapabilities.Turning
        elif firstSetupOperationType == adsk.cam.OperationTypes.JetOperation:
            postQuery.capability = adsk.cam.PostCapabilities.Jet

        postConfigs: list[adsk.cam.PostConfiguration] = postQuery.execute()

        # Check for post configs being available.
        if len(postConfigs) == 0:
            criticalError('No post-configurations found.')
            return

        # Find the post required in the post library and import it to local library.
        postRequired = "RS-274D"
        postDescription = None
        for config in postConfigs:
            if config.description == postRequired:
                postDescription = postRequired
                ncExtension = config.extension
                url = adsk.core.URL.create("user://")
                importedURL = postLibrary.importPostConfiguration(config, url, "NCProgramSamplePost.cps")
                break

        # Check if the required post was found, abandon cleanly if not.
        if not postDescription:
            criticalError(f'Unable to find postprocessor {postRequired}.')
            return

        # Get the imported local post config.
        postConfig: adsk.cam.PostConfiguration = postLibrary.postConfigurationAtURL(importedURL)

        # Prompt the user with an option to view the resulting NC file.
        dlgResults: adsk.core.DialogResults = ui.messageBox(
                                    'View results when post is complete?', 'Post-processing',
                                    adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                    adsk.core.MessageBoxIconTypes.QuestionIconType)
        viewResult: bool  = (dlgResults == adsk.core.DialogResults.DialogYes)

        # Create ncInput object.
        ncInput: adsk.cam.NCProgramInput = cam.ncPrograms.createInput()

        # 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 = 1

        # Spaces appended to the title make the messageBox wider, preventing linw wrapping.
        mbChoice: adsk.core.DialogResults = ui.messageBox(
                                    "Yes \t- All toolpaths will be posted.\n\n" \
                                    "No \t- Toolpaths in the first setup will be posted.\n\n" \
                                    "Cancel\t- The first toolpath in the first setup will be posted.\n",
                                    "Select what should be post-processed                                   ",
                                    adsk.core.MessageBoxButtonTypes.YesNoCancelButtonType,
                                    adsk.core.MessageBoxIconTypes.QuestionIconType)

        if (mbChoice == adsk.core.DialogResults.DialogYes):
            scenario = 1
        elif (mbChoice == adsk.core.DialogResults.DialogNo):
            scenario = 2
        else:
            scenario = 3

        # Adjust NC program parameters.
        ncInput.displayName = 'Sample NCProgram'

        # Embelish the nc filename to indicate chosen scenario and programming language.
        programName:str = f'NCProgramSamplePy{scenario}'
        programfilename: adsk.cam.CAMParameter = ncInput.parameters.itemByName('nc_program_filename')
        programfilename.value.value = programName

        # Provide a comment at the top of the file.
        comment: adsk.cam.CAMParameter = ncInput.parameters.itemByName('nc_program_comment')
        comment.value.value = "This is the Post Toolpaths API Sample NC Program"

        # Open nc file in editor if earlier requested.
        openInEditor: adsk.cam.CAMParameter = ncInput.parameters.itemByName('nc_program_openInEditor')
        openInEditor.value.value = viewResult

        # Set temp directory as output directory
        # Make the path valid for Fusion by replacing \\ to / in the path
        outputFolder = str(cam.temporaryFolder).replace('\\', '/')
        ncInput.parameters.itemByName('nc_program_output_folder').value.value = outputFolder

        if scenario == 1:
            # ncInput.operations() expects a list of type 'OperationsBase': Operation, CAMFolder, CAMPattern, Setup
            # It will not accept CAMFolders, CAMPatterns or Setups (all plural) as they are derived from core.Base
            opsBaseList: list[adsk.cam.OperationBase] = []
            setups: adsk.cam.Setups = cam.setups
            for setup in setups:
                opsBaseList.append(setup)
            ncInput.operations = opsBaseList # Include all setups
        elif scenario == 2:
            ncInput.operations = [cam.setups.item(0)]  # Only include the first setup
        elif scenario == 3:
            firstSetup: adsk.cam.Setup = cam.setups.item(0)
            firstOperation: adsk.core.Base = firstSetup.allOperations.item(0)
            if firstOperation.hasToolpath:
                ncInput.operations = [firstOperation]  # Only include the first operation of the first setup
            else:
                ui.messageBox('Operation has no toolpath to post')
                return

        # Create a new NC program using the current NC Program input including specified parameters and operations
        newProgram: adsk.cam.NCProgram = cam.ncPrograms.add(ncInput)

        # Configure the post processor
        newProgram.postConfiguration = postConfig

        # Example of changing a post parameter. Parameters need to be declared as their correct type.
        postParams: adsk.cam.CAMParameters = newProgram.postParameters

        # Parameter builtin_tolerance is of Type FloatParameterValue.
        builtInTolerance: adsk.cam.FloatParameterValue = postParams.itemByName('builtin_tolerance')
        builtInTolerance.value.value = 0.004

        # Parameter showSequenceNumbers is of type ChoiceParameterValue so "false" is a string not a boolean.
        showSequenceNumbers: adsk.cam.ChoiceParameterValue = postParams.itemByName('showSequenceNumbers')

        # Not all posts support SequenceNumbers
        if showSequenceNumbers:
            showSequenceNumbers.value.value = str('false')
        else:
            criticalError(f'Parameter showSequenceNumbers cannot be modified for postprocessor: {postRequired} - skipping!')

        # Update to apply changes.
        newProgram.updatePostParameters(postParams)

        # Finally post the process.
        postOptions = adsk.cam.NCProgramPostProcessOptions.create()
        newProgram.postProcess(postOptions)

        # Prompt user with an option to switch to the CAM workspace if it's not already active
        if ui.activeWorkspace.name != 'Manufacture':
            activateCAMWorkspace: adsk.core.DialogResults = ui.messageBox(
                                    f'Activate the CAM Workspace?','CAM Workspace Activate',
                                    adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                    adsk.core.MessageBoxIconTypes.QuestionIconType)

            if activateCAMWorkspace == adsk.core.DialogResults.DialogYes:
                camWorkspace: adsk.core.Workspace = ui.workspaces.itemById("CAMEnvironment")
                camWorkspace.activate()

        # Indicate completion.
        ui.messageBox(f'See file:\n{outputFolder}/{programName}{ncExtension}',
                      'Post processing is complete  \t\t\t\t\t'); # Prevent line breaks of the pathname

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Set Vise Origin As Setup WCS Origin API Sample

Description

This sample script demonstrates how to define our setup WCS origin relative to our vise origin from either a component, a sketch point or a joint origin.

The Work Coordinate System is a reference point set in our CAM workspace and on our machine. All machine coordinates are drawn from the WCS. This script demonstrates defining the WCS by each of 4 alternative methods:

Setup by default with no origin defined.

Setup using vise origin as WCS origin.

Setup using a sketch point as WCS origin.

Setup using a joint origin as WCS origin.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback

# Project URN for this script to open.
PROJECT_URN = 'urn:adsk.wipprod:fs.file:vf.Bp9h61ZBSzyiNd47VexneA?version=1'

# Name of project components, sketch and joint origin.
MODEL_COMPONENT_NAME = 'Model'
STOCK_COMPONENT_NAME = 'Stock'
VISE_COMPONENT_NAME = 'Vise'
VISE_COMPONENT_SKETCH_NAME = 'Sketch with a SkethPoint representing origin location'
VISE_COMPONENT_JOINT_ORIGIN_NAME = 'Vise Joint Origin'

# Name of the setup that will be created.
SETUP_NO_ORIGIN = 'Setup by default (no origin defined)'
SETUP_BY_ORIGIN = 'Setup using vise origin as WCS origin'
SETUP_BY_SKETCH = 'Setup using sketch point as WCS origin'
SETUP_BY_JOINT_ORIGIN = 'Setup using joint origin as WCS origin'

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Open document by its URN
        doc = loadProjectFromURN(PROJECT_URN)
        if doc is None:
            return

        # Switch to the manufacturing workspace.
        camWS = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # Get the cam product.
        products = doc.products
        cam: adsk.cam.CAM = products.itemByProductType('CAMProductType')

        # Get design product.
        design: adsk.fusion.Design = products.itemByProductType('DesignProductType')

        # Find the occurences of the components that we need to pass to the setups.
        occurrences = design.rootComponent.allOccurrences
        models: list[adsk.fusion.Occurrence] = []
        stocks: list[adsk.fusion.Occurrence] = []
        fixtures: list[adsk.fusion.Occurrence] = []
        fixtureOrigin: adsk.fusion.ConstructionPoint = None

        for occurrence in occurrences:
            if occurrence.component.name == VISE_COMPONENT_NAME:
                fixtures.append(occurrence)
                # Get the construction point in its assembly context to return
                # the originConstructionPoint equivalent in the cam workspace.
                fixtureOrigin = occurrence.component.originConstructionPoint.createForAssemblyContext(occurrence)
            elif occurrence.component.name == STOCK_COMPONENT_NAME:
                stocks.append(occurrence)
            elif occurrence.component.name == MODEL_COMPONENT_NAME:
                models.append(occurrence)

        ####### Create a first setup with no origin assignment. We can compare the difference over the rest.#######
        setupBasic = createBaseSetup(cam, models, stocks, fixtures, SETUP_NO_ORIGIN)

        ####### Create a second setup and assign the vise origin point as setup origin. #######
        # Create a base setup...
        setupVise = createBaseSetup(cam, models, stocks, fixtures, SETUP_BY_ORIGIN)
        # ... then modify its origin.
        setupVise.parameters.itemByName('wcs_orientation_mode').expression = "'coordinateSystem'"
        setupVise.parameters.itemByName('wcs_orientation_cSys').value.value = [fixtureOrigin]

        ####### create a third setup and assign the sketch point as setup origin... #######
        # Get the sketch that contains the point we want to use.
        firstFixtureComponent = fixtures[0].component
        sketch = firstFixtureComponent.sketches.itemByName(VISE_COMPONENT_SKETCH_NAME)

        # The first sketchPoint item(0) is the sketch origin, we're interested in the second point here:
        # the one we manually added to the sketch to define an origin point item(1).
        sketchPoint = sketch.sketchPoints.item(1)

        # Create a base setup...
        setupSketch = createBaseSetup(cam, models, stocks, fixtures, SETUP_BY_SKETCH)
        # ... then modify its origin.
        setupSketch.parameters.itemByName('wcs_orientation_mode').expression = "'modelOrientation'"
        setupSketch.parameters.itemByName('wcs_origin_mode').expression = "'point'"
        setupSketch.parameters.itemByName('wcs_origin_point').value.value = [sketchPoint]

        ####### Create a fourth setup and assign the joint origin point as setup origin. #######
        # Get the joint origin we want to use
        jointOrigin = fixtures[0].component.jointOrigins.itemByName(VISE_COMPONENT_JOINT_ORIGIN_NAME)

        # Create a base setup...
        setupSketch = createBaseSetup(cam, models, stocks, fixtures, SETUP_BY_JOINT_ORIGIN)
        # ... then modify its origin.
        setupSketch.parameters.itemByName('wcs_orientation_mode').expression = "'modelOrientation'"
        setupSketch.parameters.itemByName('wcs_origin_mode').expression = "'point'"
        setupSketch.parameters.itemByName('wcs_origin_point').value.value = [jointOrigin]

        # Raise a done! message.
        setupMsg = f'\n- {SETUP_NO_ORIGIN}\n- {SETUP_BY_ORIGIN}\n- {SETUP_BY_SKETCH}\n- {SETUP_BY_JOINT_ORIGIN}'
        ui.messageBox(f'Setups created: \n{setupMsg}',
                        'Fusion\t\t\t',
                        adsk.core.MessageBoxButtonTypes.OKButtonType,
                        adsk.core.MessageBoxIconTypes.InformationIconType)

    except Exception as e:
        if ui:
            ui.messageBox(f'Failed:{e}\n{traceback.format_exc()}',
                            'Fusion\t\t\t',
                            adsk.core.MessageBoxButtonTypes.OKButtonType,
                            adsk.core.MessageBoxIconTypes.CriticalIconType)

def createBaseSetup(cam: adsk.cam.CAM, models: list[adsk.fusion.Occurrence], \
                    stocks: list[adsk.fusion.Occurrence], fixtures: list[adsk.fusion.Occurrence], name: str):
    ''' Create a basic setup with no origin defined'''
    # Create setup input object.
    setupInput = cam.setups.createInput(adsk.cam.OperationTypes.MillingOperation)
    setupInput.name = name

    # Set model.
    setupInput.models = models

    # Set fixture.
    setupInput.fixtureEnabled = True
    setupInput.fixtures = fixtures

    # Create the setup.
    setup = cam.setups.add(setupInput)

    # Set stock on the setup. After the first setup is created, the newly created setups are created with
    # default stock equivalent to their preceeding stock so, applying this to the setup to overwrite default
    objCollection = adsk.core.ObjectCollection.createWithArray(stocks)
    setup.stockMode = adsk.cam.SetupStockModes.SolidStock
    setup.stockSolids = objCollection

    # Return created setup
    return setup

def loadProjectFromURN(urn:str = None) -> adsk.core.Document:
    ''' Minimal self-contained function to load and return a document via URN or return None safely '''
    doc: adsk.core.Document = None
    app = adsk.core.Application.get()
    if urn is not None:
        try: # File not found causes an exception
            project: adsk.core.DataFile = app.data.findFileById(urn)
            if project:
                doc = app.documents.open(project, True)
            else:
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
        except Exception as e:
            if str(e)[0:38] == '3 : Design is located in another team.':
                # Although the document has been loaded, variable 'doc' may not be populated
                if doc is None:
                    doc: adsk.core.Document = adsk.core.Application.get().activeDocument
            elif str(e)[0:20] == '3 : file not found':
                app.userInterface.messageBox(f'File not found for URN: {urn}!')
            else:
                # Abandon for unhandled errors, displaying the error message.
                app.userInterface.messageBox(f'Failed:{str(e)}\n{traceback.format_exc()}')
    return doc


Wood Routing Workflow Sample

Description

This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Code Samples

  • C++
  • Python
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <Cam/CamAll.h>

using namespace adsk::core;
using namespace adsk::fusion;
using namespace adsk::cam;

// Assumes a model is loaded in Fusion, eg a couple of flat panels

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    Ptr<UserInterface> ui = app->userInterface();

    // use existing doc:
    Ptr<Document> doc = app->activeDocument();

    // switch to manufacturing space
    Ptr<Workspace> camWS = ui->workspaces()->itemById("CAMEnvironment");
    camWS->activate();

    // get the CAM product
    Ptr<Products> products = doc->products();

    /*
     * Search a tool in our tool library
     */
    // get the tool libraries from the library manager
    Ptr<CAMManager> camManager = CAMManager::get();
    Ptr<CAMLibraryManager> libraryManager = camManager->libraryManager();
    Ptr<ToolLibraries> toolLibraries = libraryManager->toolLibraries();

    // we can use a library URl directly if we know its address (using Fusion metric sample lib)
    Ptr<URL> toolLibraryUrl = URL::create("systemlibraryroot://Samples/Milling Tools (Metric).json");

    // load tool library
    Ptr<ToolLibrary> toolLibrary = toolLibraries->toolLibraryAtURL(toolLibraryUrl);
    if (!toolLibrary)
    {
        ui->messageBox("Failed to load tool library");
        return false;
    }

    Ptr<Tool> MyTool = nullptr;
    // search an end mill for the contour operation
    for (Ptr<Tool>& tool : toolLibrary)
    {
        // read the tool type
        Ptr<ChoiceParameterValue> toolTypeParameter = tool->parameters()->itemByName("tool_type")->value();
        std::string toolType = toolTypeParameter->value();

        // compare toolType and filter on "flat end mill"
        if (toolType == "flat end mill" && !MyTool)
        {
            // search for tool diameter larger or equal to 10mm but less than 12mm
            Ptr<FloatParameterValue> diameterParameter = tool->parameters()->itemByName("tool_diameter")->value();
            double diameter = diameterParameter->value();
            if (diameter >= 1.0 && diameter < 1.2)
            {
                MyTool = tool;
                break;
            }
        }
    }
    if (!MyTool)
    {
        ui->messageBox("No flat end mill tool found");
        return false;
    }

    /*
     * create setup
     */
    Ptr<CAM> cam = products->itemByProductType("CAMProductType");
    Ptr<Setups> setups = cam->setups();
    Ptr<SetupInput> setupInput = setups->createInput(OperationTypes::MillingOperation);
    // create a list for the models to add to the setup Input
    std::vector<Ptr<Base>> models;

    // loop across all bRep bodies and add them all to our model list
    int countParts = cam->designRootOccurrence()->bRepBodies()->count();
    int i = 0;
    while (i < countParts)
    {
        Ptr<BRepBody> part = cam->designRootOccurrence()->bRepBodies()->item(i);
        models.push_back(part);
        i = i + 1;
    }

    // pass the model list to the setup input
    setupInput->models(models);
    // create the setup
    Ptr<Setup> setup = setups->add(setupInput);

    // change some properties of the setup & stock
    setup->name("CAM Woodworking Script Sample");
    setup->stockMode(SetupStockModes::FixedBoxStock);
    // set setup origin in the corner
    Ptr<ChoiceParameterValue> wcs_origin_boxPoint = setup->parameters()->itemByName("wcs_origin_boxPoint")->value();
    wcs_origin_boxPoint->value("top 1");
    // set stock size XYZ
    setup->parameters()->itemByName("job_stockFixedX")->expression("2440 mm");
    setup->parameters()->itemByName("job_stockFixedY")->expression("1220 mm");
    setup->parameters()->itemByName("job_stockFixedZ")->expression("18 mm");

    /*
     * 2D contour operation
     */
    // set operation properties
    Ptr<OperationInput> input = setup->operations()->createInput("contour2d");
    input->tool(MyTool);
    input->displayName("2D Contour");
    input->parameters()->itemByName("tolerance")->expression("0.1 mm");

    // add tabs
    // activate tabs group to enable tabs and be able to modify its parameters
    input->parameters()->itemByName("group_tabs")->expression("true");
    input->parameters()->itemByName("tabWidth")->expression("18 mm");
    input->parameters()->itemByName("tabHeight")->expression("18 mm");
    input->parameters()->itemByName("tabDistance")->expression("100 mm");

    // add the operation to the setup
    Ptr<Operation> contourOp = setup->operations()->add(input);

    // add silhouette to contour selection for 2D contour operation
    // requires the operation to exist
    Ptr<CadContours2dParameterValue> cadcontours2dParam = contourOp->parameters()->itemByName("contours")->value();
    Ptr<CurveSelections> chains = cadcontours2dParam->getCurveSelections();
    // calculate and add a new silhouette curve to the geometry selection list
    chains->createNewSilhouetteSelection();
    cadcontours2dParam->applyCurveSelections(chains);

    // calculate operation
    cam->generateToolpath(contourOp);

    /*
     * post process
     */
    // copy-paste from basic milling sample

    return true;
}
#Assumes a model is loaded in Fusion, eg a couple of flat panels

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # use existing doc:
        doc = app.activeDocument

        # switch to manufacturing space
        camWS = ui.workspaces.itemById('CAMEnvironment')
        camWS.activate()

        # get the CAM product
        products = doc.products

        #################### Search a tool in our tool library ####################
        # get the tool libraries from the library manager
        camManager = adsk.cam.CAMManager.get()
        libraryManager = camManager.libraryManager
        toolLibraries = libraryManager.toolLibraries

        # we can use a library URl directly if we know its address (using Fusion metric sample lib)
        url = adsk.core.URL.create('systemlibraryroot://Samples/Milling Tools (Metric).json')

        # load tool library
        toolLibrary = toolLibraries.toolLibraryAtURL(url)

        MyTool = None
        # search an end mill for the contour operation
        for tool in toolLibrary:
            # read the tool type
            toolType = tool.parameters.itemByName('tool_type').value.value

            # compare toolType and filter on 'flat end mill'
            if toolType == 'flat end mill' and not MyTool:
                # search for tool diameter larger or equal to 10mm but less than 12mm
                diameter = tool.parameters.itemByName('tool_diameter').value.value
                if diameter >= 1.0 and diameter < 1.2:
                    MyTool = tool
                    break

        #################### create setup ####################
        cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
        setups = cam.setups
        setupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)
        # create a list for the models to add to the setup Input
        models = []

        # loop across all bRep bodies and add them all to our model list
        countParts = cam.designRootOccurrence.bRepBodies.count
        i = 0
        while i < countParts:
            part = cam.designRootOccurrence.bRepBodies.item(i)
            models.append(part)
            i = i + 1

        # pass the model list to the setup input
        setupInput.models = models
        # create the setup
        setup = setups.add(setupInput)

        # change some properties of the setup & stock
        setup.name = 'CAM Woodworking Script Sample'
        setup.stockMode = adsk.cam.SetupStockModes.FixedBoxStock
        # set setup origin in the corner
        setup.parameters.itemByName('wcs_origin_boxPoint').value.value = 'top 1'
        # set stock size XYZ
        setup.parameters.itemByName('job_stockFixedX').expression = '2440 mm'
        setup.parameters.itemByName('job_stockFixedY').expression = '1220 mm'
        setup.parameters.itemByName('job_stockFixedZ').expression = '18 mm'

        #################### 2D contour operation ####################
        # set operation properties
        input = setup.operations.createInput('contour2d')
        input.tool = MyTool
        input.displayName = '2D Contour'
        input.parameters.itemByName('tolerance').expression = '0.1 mm'

        # add tabs
        # activate tabs group to enable tabs and be able to modify its parameters
        input.parameters.itemByName('group_tabs').expression = 'true'
        input.parameters.itemByName('tabWidth').expression = '18 mm'
        input.parameters.itemByName('tabHeight').expression = '18 mm'
        input.parameters.itemByName('tabDistance').expression = '100 mm'

        # add the operation to the setup
        contourOp = setup.operations.add(input)

        # add silhouette to contour selection for 2D contour operation
        # requires the operation to exist
        cadcontours2dParam: adsk.cam.CadContours2dParameterValue = contourOp.parameters.itemByName('contours').value
        chains = cadcontours2dParam.getCurveSelections()
        # calculate and add a new silhouette curve to the geometry selection list
        chains.createNewSilhouetteSelection()
        cadcontours2dParam.applyCurveSelections(chains)

        # calculate operation
        cam.generateToolpath(contourOp)

        #################### post process ####################
        # copy-paste from basic milling sample

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Welcome to Fusion's Programming Interface

Welcome to the Fusion 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 functionalities exposed by an application that allows it to be controlled by a program. For example, you can use Fusion's API to write a program that will perform the same types of operations you can perform when using Fusion interactively.

Fusion, 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 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.

API Help Content

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 specific object or function. This is the heart of the API documentation and is something you will use continually as you write programs for Fusion.
  • 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. Most of the small samples that demonstrate a specific function are not in the sample list but are accessed from the specific topic it is demonstrating.

Searching the API Documentation

The Fusion help system has built-in support for searching. There is a search field near the top of the page, as shown below. Using this help supports filters to restrict the results but still often ends up with a large list of results that can be difficult to refine and pick the most appropriate topic. Better search results can usually be achieved by using a Google search. The entire help system is indexed by Google.

Offline Access to the API Documentation

The same API help content is also available as a CHM file that can be used offline. Support to view a CHM file is built-in to windows and there are apps available for Mac.

Additional Resources

Fusion Object Model - As discussed in the Basics Concepts of Fusion's API topic here's a link to the pdf of the Fusion 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 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. 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 API
    Run Video Introduction to the Fusion Object Model
    Run Video Commands and User Interface
    Run Video Document Structure
    Run Video Geometry in Fusion
    Run Video More About Commands
    Run Video Odd and Ends

  • Resources on GitHub - The Fusion GitHub site provides access to additional sample programs. To use the samples, you will 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 2025 Autodesk, Inc. Comment on this page.


Working with the Arrange Feature Using the API

The API for the Arrange feature is currently released as a preview. We would appreciate any feedback about bugs and usability. We've discovered some problems where it was too late in the release cycle to fix them for this release. To help avoid multiple reports of know issues. Here's the current list. We expect these to be addressed soon.

Known Issues

  1. When specifying a length or angle, it is using the document units. The API always uses internal units, so length should always be centimeters and angles should always be radians.
  2. It’s not returning the correct occurrences when getting the ArrangeOccurrences from an envelope.
  3. EnvelopeDefinition.isPartialArrangeAllowed fails if the return is False.
  4. Setting the ArrangeComponent.quantity to -1 to indicate it should use the global value fails.
  5. Setting the ArrangeComponent.isFiller doesn’t have the expected result.

Overview of the Arrange Feature

The Arrange command is a complex command with many options to control the arrangement. The resulting geometry is also interesting, and as a result, the API is complex. To better understand the API, it’s best to start with a brief overview of the command as you see it in the user interface.

Below is the command dialog with its “Objects” tab displayed. You define what will be arranged using this tab. It starts by defining the type of arrangement: 2D True Shape, 2D Rectangular, or 3D, which changes the available settings.

One thing that is not obvious is what geometry is being arranged. The dialog refers to selecting and arranging “Components”, which is true, but there’s more to it than that. A component is arranged, but the geometry used to calculate the arrangement is not always obvious. When choosing a component to arrange, you can select a body, face, profile, or a component. To select a component, you need to select it in the browser. If you select a body, that body's geometry will be used for the arrangement. If you select a face, the body that owns the face will be used. Selecting a face is a way to define the body's orientation in the arrangement and define the “up” face. You can also select a sketch in the browser, resulting in a profile from the sketch used for the arrangement. The shape of the selected geometry is used for the arrangement computation, but the entire component is positioned so you’ll see any other geometry that exists in the component, even though it wasn’t considered in the computation.

The ”Envelopes” tab of the dialog is shown below. Using this tab, you define where the arrangement will take place. Settings that control how the arrangement is calculated are on both tabs. The Envelope tab has two options for defining the area where the result will be created: a defined rectangular area or previously created sketches or faces. The picture below shows where the “Plane” option has been selected. The dialog now provides the fields to define the rectangle's size, and the selection of a construction plane where the rectangle will be created.

Arrange Overview 2

The picture below shows the “Envelope” tab with the “Sketch/Face” option selected. In this mode, the dialog allows you to select profiles or planar faces that will define the shape of the envelope where the arrangement will be created. Both options support additional settings that control how the components are arranged.

Arrange Object Model

As you can see, the command is quite complex, with many settings and options. Before attempting to use the API, it’s highly recommended that you experiment with the command interactively using the user interface to understand better how it works and what the various settings do. It’s best first to create the result interactively to ensure it’s possible and then use the API to create the same result.

Below is the API Object Model for the Arrange feature. Like all other features, it’s accessed through the Features collection object and follows the same pattern as the other feature collections, where it supports creating an input object that you then use to create a new feature. Through the collection object, you also access existing features to query or edit them.

Arrange Object Model

Creating an Arrange Feature

Here’s an example of using the API to create an Arrange feature using the design shown below. The design consists of three components. The first is a rectangular solid with a large cutout, the second is a small rectangular solid, and the third is a component that only contains a sketch of a circle. The Python code that creates this design is at the bottom of this article.

Here’s the expected result where there are 3 of the large block, 4 of the smaller block and the circle fills the remaining area. It uses a rectangular plane envelope where multiple envelopes are allowed.

Before looking at the code, a few basic concepts need to be understood. Creating an Arrange feature uses the same basic process as other features: you create an input object, define all the settings, and then call the add method and provide the input object. The portion of the object model that’s used to create an Arrange feature is shown below. Three main objects are associated with the input object: ArrangeComponent, ArrangeDefinitionInput, and ArrangeEnvelopeInput. The ArrangeComponent defines the model geometry you want to arrange and provides access to the various arrange settings associated with each component. The ArrangeDefinitionInput object provides access to the other settings on the “Objects” tab of the Arrange dialog. There are two types of ArrangeDefinitionInput objects: Arrange2DDefinitionInput and Arrange3DDefinitionInput. When you create the input object, you define the type of arrangement you want to create, and it will have either a 2D or 3D ArrangeDefinitionInput associated with it. The rest of the object model provides the functionality to define the envelope for the arrangement. There are several objects for envelopes to support the various types of envelopes that the feature supports.

Arrange Object Model for Creation

Below, is the code that creates the arrange feature above, along with a description of the important lines.

Lines 15-16 create the ArrangeFeatureInput object for a 2D True Shape arrangement.

Line 19 gets the definition associated with the input. Because the input was created for 2D True Shape arrangement, this will return an ArrangeDefinition2DInput object. This object is also returned if a 2D Rectangular solver type is specified. However, an ArrangeDefinition3DInput object will be returned if the input was created for a 3D arrangement. The ArrangeDefinitionInput object is the logical equivalent to the “Object” tab of the Arrange command dialog.

Lines 22-24 modify some of the settings associated with the definition.

Line 27 gets the ArrangeComponents collection object associated with the ArrangeDefinition2DInput object. You use this collection to specify which components to arrange.

Lines 30-32 get the Occurrence objects that contain the geometry to be nested.

Line 35 creates an ArrangeComponent using the first occurrence. When a Component object is provided, the Arrange functionality uses logic to determine what geometry to use within the component. If there are any bodies, it will choose the first body, which is what is happening in this case.

Line 36 creates an ArrangeComponent by providing a body. This allows you to be explicit about which body to use. A BRepFace can also be used to define the “up” face of the body. Otherwise, it determines the orientation automatically.

Line 37 creates an ArrangeComponent by providing the profile in the component to use for the arrangement.

Lines 40-44 change some settings associated with each ArrangeComponent object.

Line 47 defines a 2D plane envelope that is 50x30 cm in size.

Lines 52-56 change some settings associated with the envelope.

Line 59 creates the arrange feature.

import traceback
import adsk.core
import adsk.fusion

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
     try:
         des: adsk.fusion.Design = app.activeProduct
         comp = des.rootComponent
         arrangeFeats = comp.features.arrangeFeatures

         # Create the input.
         arrangeInput: adsk.fusion.ArrangeFeatureInput = arrangeFeats.createInput(
                         adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType)

         # Get the definition object from the input.
         arrangeDefInput: adsk.fusion.ArrangeDefinition2DInput = arrangeInput.definition

         # Modify some of the arrange settings.
         arrangeDefInput.globalRotation = adsk.fusion.ArrangeRotationTypes.AllRotationsArrangeRotationType
         arrangeDefInput.isGlobalDirectionFaceUp = True
         arrangeDefInput.isPartInPartAllowed = True

         # Get the ArrangeComponents collection from the input objects.
         arrComponents = arrangeInput.arrangeComponents

         # Get the occurrences to arrange.
         occ1 = comp.allOccurrences.itemByName('Block with Opening:1')
         occ2 = comp.allOccurrences.itemByName('Solid Block:1')
         occ3 = comp.allOccurrences.itemByName('Sketch Circle:1')

         # Add each occurence as an arrange component.
         arrComp1 = arrComponents.add(occ1)
         arrComp2 = arrComponents.add(occ2.bRepBodies[0])
         arrComp3 = arrComponents.add(occ3.component.sketches[0].profiles[0])

         # Set some properties of each arrange component.
         arrComp1.quantity = 3
         arrComp1.priority = adsk.fusion.ArrangePriorities.VeryHighArrangePriority
         arrComp2.quantity = 4
         arrComp3.isFiller = True
         arrComp3.quantity = 99

         # Define a plane envelope.
         planeEnv = arrangeInput.setPlaneEnvelope(comp.xYConstructionPlane,
                                                 adsk.core.ValueInput.createByString('50 cm'),
                                                 adsk.core.ValueInput.createByString('30 cm'))

         # Modify some additional properties of the envelope.
         planeEnv.originXOffset = adsk.core.ValueInput.createByString('40 cm')
         planeEnv.originYOffset = adsk.core.ValueInput.createByString('0 cm')
         planeEnv.quantity = adsk.core.ValueInput.createByReal(4)
         planeEnv.objectSpacing = adsk.core.ValueInput.createByString('1 cm')
         planeEnv.envelopeSpacing = adsk.core.ValueInput.createByString('0.5 cm')

         # Create the arrange feature.
         arrange = arrangeFeats.add(arrangeInput)
     except:
         ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

The above may seem like quite a bit of code, but it’s going through the same process that you go through if you interactively create an Arrange feature using the Arrange command.

Querying and Editing an Arrange Feature

Querying and editing an Arrange feature use the same portion of the API. The difference is that when you query, you read the values of various settings, and when you edit, you change the settings' values. The diagram below shows the portion of the object model you use for this. When creating an Arrange feature, you use the ArrangeFeatureInput object and all of the functionality it provides. When querying and editing, you use the ArrangeFeature object. A big difference in the settings between the two is that for an ArrangeFeature, the setting often returns a Parameter object, which was created when the Arrange feature was created and is what controls that setting. The API returns the parameter, which you can use to query the current value and set the parameter's value, which will cause the Arrange feature to recompute.

Arrange Object Model for Query and Edit

Because the computation of an Arrange feature can be relatively expensive, if you need to modify multiple settings, it’s best to reposition the timeline marker immediately before the feature, make the desired changes, and then move it back to where it was. This will result in a single compute for all of the changes instead of a compute for each change. The code below demonstrates how this can be done.

# Get the current position of the timeline marker.
currentPstn = design.timeline.markerPosition

# Reposition the timeline marker to just before the Arrange feature.
arrangeFeature.timelineObject.rollTo(True)

# Make the desired changes to the Arrange feature.
arrangeFeature.definition.grainDirection.value = math.radians(10)
arrangeFeature.envelopeDefinition.frameWidth.value = 0.5
arrangeFeature.envelopeDefinition.isPartialArrangeAllowed = True

# Reposition the timeline marker to its original position.
design.timeline.markerPosition = currentPstn

Below is a script that queries everything about an Arrange feature and writes out the results to the TEXT COMMAND window.

import traceback
import adsk.core
import adsk.fusion

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        savePstn = des.timeline.markerPosition
        app.log('========== Arrange Features ============')
        for arrange in des.rootComponent.features.arrangeFeatures:
            arrange.timelineObject.rollTo(True)

            app.log(f'   Arrange Feature: {arrange.name}')
            arrangeDef = arrange.definition

            if arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType:
                app.log('      Solver Type: 2D True Shape')
            elif arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DRectangularSolverType:
                app.log('      Solver Type: 2D Rectangular')
            if arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange3DSolverType:
                app.log('      Solver Type: 3D')

            app.log(f'      Create Copies: {arrangeDef.isCreateCopies}')
            app.log(f'      Global Direction is Face Up: {arrangeDef.isGlobalDirectionFaceUp}')
            app.log(f'      Global Quantity: {arrangeDef.globalQuantity.value}')
            app.log(f'      Grain Direction: {arrangeDef.grainDirection.value}')

            if arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType:
                app.log(f'      Parts in Parts Allowed: {arrangeDef.isPartInPartAllowed}')

            if (arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType or
                arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DRectangularSolverType):
                app.log(f'      Global Rotation Type: {GetEnumName(adsk.fusion.ArrangeRotationTypes, arrangeDef.globalRotation)}')

            comps = arrange.arrangeComponents
            app.log(f'      Components ({comps.count})')
            for comp in comps:
                app.log(f'         Occurrence ({comp.occurrence.name})')

                if comp.occurrenceOrFace.objectType == adsk.fusion.Occurrence.classType():
                    app.log('            SelectionType: Occurrence')
                elif comp.occurrenceOrFace.objectType == adsk.fusion.BRepFace.classType():
                    app.log('            SelectionType: Face')

                if (arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType or
                    arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DRectangularSolverType):
                    app.log(f'            Quantity: {comp.quantity}')
                    app.log(f'            Is Direction Flipped: {comp.isDirectionFlipped}')
                    app.log(f'            Rotation Type: {GetEnumName(adsk.fusion.ArrangeRotationTypes, comp.rotationType)}')
                    app.log(f'            Zero Direction: {comp.zeroDirection.x}, {comp.zeroDirection.y}, {comp.zeroDirection.z}')
                    app.log(f'            Up Direction: {comp.upDirection.x}, {comp.upDirection.y}, {comp.upDirection.z}')
                    app.log(f'            Priority: {GetEnumName(adsk.fusion.ArrangePriorities, comp.priority)}')

                if arrangeDef.solverType == adsk.fusion.ArrangeSolverTypes.Arrange2DTrueShapeSolverType:
                    app.log(f'            Rotation: {comp.rotation}')
                    app.log(f'            Is Filler: {comp.isFiller}')

            app.log('      Envelope Definition')
            envDef = arrange.envelopeDefinition
            app.log(f'         Envelope Type: {envDef.objectType}')
            app.log(f'         Frame Width: {envDef.frameWidth.value}')
            app.log(f'         Frame Width: {envDef.objectSpacing.value}')
            app.log(f'         Frame Width: {envDef.placementClearance.value}')
            # app.log(f'         Is Partial Arrange Allowed: {envDef.isPartialArrangeAllowed}') # This fails if it if False.

            if envDef.objectType == adsk.fusion.ArrangeProfileOrFaceEnvelopeDefinition.classType():
                app.log(f'         == Profile or Face Envelope Definition ==')
                cnt = 0
                for profileOrFace in envDef.profilesAndFaces:
                    cnt += 1
                    app.log(f'            {cnt}. {profileOrFace.objectType}')
                # app.log(f'            Grain Direction: {envDef.grainDirection.value}')
            elif envDef.objectType == adsk.fusion.ArrangePlaneEnvelopeDefinition.classType():
                app.log(f'         == Plane Envelope Definition ==')
                app.log(f'            Construction Plane: {envDef.plane.name}')
                app.log(f'            Length: {envDef.length.value}')
                app.log(f'            Width: {envDef.width.value}')
                app.log(f'            Origin X Offset: {envDef.originXOffset.value}')
                app.log(f'            Origin Y Offset: {envDef.originYOffset.value}')
                app.log(f'            Envelope Spacing: {envDef.envelopeSpacing.value}')
                app.log(f'            Quantity: {envDef.quantity.value}')
            elif arrange.envelopeDefinition.objectType == adsk.fusion.Arrange3DEnvelopeDefinition.classType():
                app.log(f'         == 3D Envelope Definition ==')
                app.log(f'            Construction Plane: {envDef.plane.name}')
                app.log(f'            Length: {envDef.length.value}')
                app.log(f'            Width: {envDef.width.value}')
                app.log(f'            Height: {envDef.height.value}')
                app.log(f'            Origin X Offset: {envDef.originXOffset.value}')
                app.log(f'            Origin Y Offset: {envDef.originYOffset.value}')
                app.log(f'            Ceiling Clearance: {envDef.value}')

            app.log(f'      Result Envelopes ({arrange.resultEnvelopes.count})')
            for resultEnvelope in arrange.resultEnvelopes:
                app.log(f'         Name: {resultEnvelope.name}')
                app.log(f'         Envelope Type: {resultEnvelope.objectType}')

                app.log(f'         Occurrences ({resultEnvelope.occurrences.count})')
                resultOcc: adsk.fusion.ArrangeOccurrenceResult = None
                for resultOcc in resultEnvelope.occurrences:
                    trans: adsk.core.Vector3D = resultOcc.occurrence.transform2.translation
                    app.log(f'            Occurrence: {resultOcc.occurrence.name} ({trans.x}, {trans.y}, {trans.z})')

                if resultEnvelope.objectType == adsk.fusion.ArrangePlaneResultEnvelope.classType():
                    resPlaneEnv: adsk.fusion.ArrangePlaneResultEnvelope = resultEnvelope
                    app.log(f'         Min Bound Point: ({resPlaneEnv.boundingBox.minPoint.x}, {resPlaneEnv.boundingBox.minPoint.y})')
                    app.log(f'         Max Bound Point: ({resPlaneEnv.boundingBox.maxPoint.x}, {resPlaneEnv.boundingBox.maxPoint.y})')
                elif resultEnvelope.objectType == adsk.fusion.Arrange3DResultEnvelope.classType():
                    res3DEnv: adsk.fusion.Arrange3DResultEnvelope = resultEnvelope
                    app.log(f'         Min Bound Point: ({res3DEnv.boundingBox.minPoint.x}, {res3DEnv.boundingBox.minPoint.y}, {res3DEnv.boundingBox.minPoint.z})')
                    app.log(f'         Max Bound Point: ({res3DEnv.boundingBox.maxPoint.x}, {res3DEnv.boundingBox.maxPoint.y}, {res3DEnv.boundingBox.maxPoint.z})')
                elif resultEnvelope.objectType == adsk.fusion.ArrangeProfileOrFaceResultEnvelope.classType():
                    resProfEnv: adsk.fusion.ArrangeProfileOrFaceResultEnvelope = resultEnvelope
                    app.log(f'         Entity Type: {resProfEnv.profileOrFace.objectType}')

                    if resProfEnv.profileOrFace.objectType == adsk.fusion.Profile.classType():
                        prof: adsk.fusion.Profile = resProfEnv.profileOrFace
                        area = prof.areaProperties().area
                    if resultEnvelope.profileOrFace.objectType == adsk.fusion.BRepFace.classType():
                        face: adsk.fusion.BRepFace = resProfEnv.profileOrFace
                        area = face.area

                    app.log(f'         Envelope Area: ({area} cm^2)')

        #des.timeline.markerPosition = savePstn
    except:
        ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Here's the code that was mentioned earlier that creates the design the code above expects when creating a new Arrange feature.

import traceback
import adsk.core
import adsk.fusion

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        # Create a new document and get the Design object.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        des: adsk.fusion.Design = doc.products.itemByProductType('DesignProductType')
        root = des.rootComponent

        ## Part 1, A rectangle with a large interior opening.

        # Create a new component.
        trans = adsk.core.Matrix3D.create()
        occ1 = root.occurrences.addNewComponent(trans)
        comp = occ1.component
        comp.name = "Block with Opening"

        sk = comp.sketches.add(comp.xYConstructionPlane)
        sk.sketchCurves.sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0),
                                                        adsk.core.Point3D.create(20, 15, 0))

        sk.sketchCurves.sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(2, 2, 0),
                                                        adsk.core.Point3D.create(18, 13, 0))

        # Find the profile that has two loops.
        goodProf = None
        for prof in sk.profiles:
            if prof.profileLoops.count == 2:
                goodProf = prof
                break

        if goodProf:
            ext = comp.features.extrudeFeatures.addSimple(goodProf, adsk.core.ValueInput.createByReal(1), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        ## Part 2, A solid rectangular block.

        # Create a new component.
        trans = adsk.core.Matrix3D.create()
        trans.translation = adsk.core.Vector3D.create(22, 0, 0)
        occ2 = root.occurrences.addNewComponent(trans)
        comp = occ2.component
        comp.name = "Solid Block"

        sk = comp.sketches.add(comp.xYConstructionPlane)
        sk.sketchCurves.sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0),
                                                        adsk.core.Point3D.create(6, 4, 0))

        ext = comp.features.extrudeFeatures.addSimple(sk.profiles[0], adsk.core.ValueInput.createByReal(1), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        ## Part 3, A round sketch.

        # Create a new component.
        trans = adsk.core.Matrix3D.create()
        trans.translation = adsk.core.Vector3D.create(30, 0, 0)
        occ3 = root.occurrences.addNewComponent(trans)
        comp = occ3.component
        comp.name = "Sketch Circle"

        sk = comp.sketches.add(comp.xYConstructionPlane)
        sk.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(3, 3, 0), 3)

        return (occ1, occ2, occ3)
    except:
        ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Attributes

Fusion Attributes

Attributes are something that are 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 entity. The named value is saved by Fusion and can be retrieved later, 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 is 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 us 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 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 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 is 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 does not 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 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 specific 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 are interested in. However, that is 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 do not 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 is 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 is 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 us 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 is 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 is 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 your 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's API

Basic API Concepts

There are some basic concepts that are used throughout the Fusion API and understanding these concepts will make the API much easier to understand and use.

Objects

The Fusion 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 user. For example, an extrusion in a Fusion 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 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 user interface.

Object Model

One of the basic differences between using the Fusion 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 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 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. 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 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’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 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 Models (B-Rep and Geometry)

Fusion Solids and Surfaces

Solid models in Fusion 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 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 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 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 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 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 currently supports returning a 'triangular mesh representation' of a model, as shown in the image below. Fusion 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 CAM Manufacturing Models

More to come...

The Fusion CAM API has been designed and developed to provide a high level of automation within the manufacture space. The CAM API functionality is provided through CAM-specific libraries. If you’ve used the API to automate the Design portion of Fusion, you’ve used the asdk.core and asdk.fusion libraries. The CAM functionality is defined in the adsk.cam library and is referenced into your program using the techniques shown below.

Include CAM files

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# From the Products collection on the active document, get the CAM Product.
cam: adsk.cam.CAM = doc.products.itemByProductType('CAMProductType')

# Check if anything was returned.
if cam == None:
     ui.messageBox('There is no CAM data in the active document')
     return


 Introduction to the CAM API
Introduction to the CAM API
CAM Object Model Basics
Understanding Setups
Understanding Operations

Introduction to the CAM API

The Fusion CAM API has been designed and developed to provide a high level of automation within the manufacture space. The CAM API functionality is provided through CAM-specific libraries. If you’ve used the API to automate the Design portion of Fusion, you’ve used the asdk.core and asdk.fusion libraries. The CAM functionality is defined in the adsk.cam library and is referenced into your program using the techniques shown below.

Python

Import adsk.cam into your script or add-in. If you use the “Create” command in the “Scripts and Addins” dialog to create a new Python script or add-in, you’ll see the line below where adsk.cam is already imported.
import adsk.core, adsk.fusion, adsk.cam, traceback

C++

If you use the “Create” command from the Scripts and Addins Manager in Fusion to create a new C++ script or add-in, the resulting cpp file contains the #include and using statements referencing the cam namespace and header file.

Include CAM files

Using CAMAll.h references all the header files in the CAM library and makes programming easier because everything is available to Intellisense; however, it’s not as efficient as specifying only the header files you need. For example, a program that accesses an operation and makes some edits to its parameters would include only the headers shown below.

Include CAM files

Accessing the CAM Product within a Fusion Document

A Fusion document acts as a container of different types of data. The top-level containers are referred to as products. There are different types of products depending on the type of data they contain. For example, a Design product contains all the design-related data. All documents always contain a Design product and may include other types of products depending on what has been created in the document. For example, when you enter the CAM workspace in the user interface, a CAM product is added to the document, and all CAM-related data is contained within it. When you need to access data using the API, you first need to access the product that contains that data.

The example below demonstrates getting the CAM product, if it exists, from the active document.

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# From the Products collection on the active document, get the CAM Product.
cam: adsk.cam.CAM = doc.products.itemByProductType('CAMProductType')

# Check if anything was returned.
if cam == None:
     ui.messageBox('There is no CAM data in the active document')
     return

If the Manufacturing workspace is active, the CAM product will be the “active” product and can be obtained using the Application.activeProduct property, as shown below. The sample also shows how you can use this to determine if the Manfufacturing workspace is active.

# Get the application and userInterface
app = adsk.core.Application.get()
ui = app.userInterface

# Get the active product.
cam = adsk.cam.CAM.cast(app.activeProduct)

# Check if anything was returned.
if (cam is None):
    ui.messageBox('The Manufacturing workspace must be active')
    return

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 the Manufacture workspace has never been activated, the document will not have a CAM product.

CAM Object Model Basics

Once you have a reference to the CAM object, you can traverse the object model to access the specific object you need. The diagram below illustrates a simplified view of the object model for the CAM object. This diagram illustrates the relationships between objects and how you traverse the object model to get a particular type of object.

CAM Object Model

Using the object model in the API is not very different from what you do when using Fusion interactively. Once you have a reference to the CAM object in a document, getting at the Setups and Operations it contains is straightforward. You get the existing setups of a document by using the setups property of the CAM object, which returns a Setups collection object. 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.

Using the API, you navigate a similar structure to what you see in the browser to access a specific CAM object. Below is a Python code snippet that shows how to access the first setup, and the first operation and folder in the setup, assuming a document like that shown above is being used.

# Get the Setups collection object from the CAM object.
setups = cam.setups

# Get the first Setup object in the CAM product.
setup = setups.item(0)

# Get the Operations collection object that contains all the operations in the setup.
operations = setup.operations

# Get the first operation in the collection.
operation = operations.item(0)

# Get the Folders collection object that contains all the folders in the setup.
folders = setup.folders

# Get the first folder in the collection.
folder = folders.item(0)

# Get the Operations collection object from the folder.
folderOperations = folder.operations

# Get the first operation from the folder.
operation = folderOperations.item(0)

The code above uses the item method to get a setup, operation, and folder and specifies an index of 0 to get the first item in each collection. However, it can be very useful to use the itemByName method instead to get a specific setup, operation, or folder 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 "2D Adaptive1" within the folder.
horizOperation = folder.operations.itemByName('2D Adaptive1')

Understanding Setups

Setups define a coordinate system and various other settings that all of the operations owned by the setup use. As seen in the previous object model, you can access a Setups collection object directly from the CAM object. The Setups collection provides access to all of the existing setups in a document. The code above illustrates this by getting the Setups from the CAM object and then using the itemByName method of the Setups object to get the setup named "Setup1".

Creating a setup uses the same principle as the Design API to create a feature. You first call the createInput method on the Setups object to create a SetupInput object. An input object is analogous to the command dialog. It provides access to all the settings needed to define a particular type of object. When working with CAM, most of these settings are available as a collection of CAM Parameters. For a more detailed explanation of CAM Parameters, see the Introduction to CAM Parameters topic.

Below is some sample code that creates a new setup.

# Get the Setups collection.
setups = cam.setups

# Create a SetupsInput object to define a milling setup.
setupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)

# Specify the first body in the model as the model geometry.
camOcc = cam.designRootOccurrence
setupInput.models = [camOcc.bRepBodies[0]]

# Set the origin to be at the top center of the model box.
originParam = setupInput.parameters.itemByName('wcs_origin_mode')
choiceVal: adsk.cam.ChoiceParameterValue = originParam.value
choiceVal.value = 'modelPoint'

originPoint = setupInput.parameters.itemByName('wcs_origin_boxPoint')
choiceVal: adsk.cam.ChoiceParameterValue = originPoint.value
choiceVal.value = 'top center'

# Set the comment for the program.
commentParam = setupInput.parameters.itemByName('job_programComment')
commentParam.value.value = 'This is the comment.'

# Create the setup.
setup = setups.add(setupInput)

Understanding Operations

A setup owns operations, and those operations compute using the setup's settings. An Operations collection object is obtained from a Setup. This collection provides access to the operations owned by the setup and supports creating new operations. A new operation is created in the same way as a setup; create an input object, define the settings, and pass it to the add method to create the setup.

The OperationInput provides access to the CAM parameters defining all its settings. The creation of the OperationInput has one argument to specify the type of operation, which is referred to as the "strategy", to create. The strategy is specified using a string. The strategy types available can vary depending on your license and available extensions. To get a list of the available strategies, you use the Operations.compatibleStrategies property, which returns a list of strategies supported for your configuration. A quick way to do this is to use the TEXT COMMANDS window with the "Py" setting, as shown below.

Strategy List Code

This results in the output shown below.

Here are the three lines to enter in the TEXT COMMANDS window.
app = adsk.core.Application.get()

strategies = app.activeProduct.setups[0].operations.compatibleStrategies

[s.title for s in strategies]

The code below demonstrates the workflow of creating a new scallop operation. It expects the tool to already be in the document and it finds all spherical faces to use for the scallop.

# Create a new scallop operation.
opInput = setup.operations.createInput('scallop')

# Set some parameters.
stepoverParam = opInput.parameters.itemByName('stepover')
stepoverParam.expression = '0.1 in'

overrideParam = opInput.parameters.itemByName('overrideModel')
overrideParam.expression = 'true'

setupModelParam = opInput.parameters.itemByName('includeSetupModel')
setupModelParam.expression = 'false'

# Set the tool using the first tool in the document.
opInput.tool = cam.documentToolLibrary.item(0)

# Find the spherical faces in the model.
body = cam.designRootOccurrence.bRepBodies.item(0)
sphereFaces = []
face: adsk.fusion.BRepFace = None
for face in body.faces:
    if face.geometry.objectType == adsk.core.Sphere.classType():
        sphereFaces.append(face)

# Add the geometry to the operation.
modelParam = opInput.parameters.itemByName('model')
geomSelect: adsk.cam.GeometrySelection = modelParam.value
geomSelect.value = sphereFaces

# Create the operation.
op = setup.operations.add(opInput)

# Generate the operation.
cam.generateToolpath(op)

The picture below shows the result of running the code above to create a new setup and operation. The ball nose tool was the only tool in the document library and the model was created to have several spherical faces on the top of the model.

Create Operation Example

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.

Post Processor Properties

Recent additions to the CAM API allow for the setting of post processor properties for use with a post process input. The properties are set using named value pairs, the first value must be a string containing the property name as it is defined in the post processor. The second value is what you would like the property to be set to when post processing, this must be set using a value input to define the properties type and value. An example of setting the ‘showSequenceNumbers’ post property can be seen below:

# Create the input options needed for post processing.
postInput = adsk.cam.PostProcessInput.create(programName, postProcessor, outputFolder, units)

# Create an object collection for post properties.
postProperties = adsk.core.NamedValues.create()

# Change the show sequence number property.
disableSequenceNumbers = adsk.core.ValueInput.createByBoolean(False)

# When adding the named value, the name needs to be identical to the property defined in the post processor.
postProperties.add("showSequenceNumbers", disableSequenceNumbers)

# Set the post properties to be the named values that have been created.
postInput.postProperties = postProperties

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.


Introduction to CAM Libraries

Manufacturing and the CAM API use libraries of various type extensively. The include tool, machine, template, post, and print setting libraries. They all share the same basic concepts. There's a big difference between the API objects in a library and other API objects. Most API objects represent a reference to something that exists in Fusion. For example, an Operation object is a live reference to an existing operation in a document and modifying that API object changes the operation. Items in a library don't have a distinct identity and as a result the API object isn't a reference but is instead a temporary copy of the data that defines that library object.

For example, a tool library can be a text file, and there can be any number of tools defined within the library. For the API Tool object there's nothing distinct to reference. A single tool is a section of data within the text file. When you use the API to get a specific tool, the API Tool object holds a copy of all the data that defines the tool. All operations require the tool they use to exist in the document tool library. When a tool is assigned to an operation, that tool is copied to the document by creating a new tool and populating it with the tool data. Fusion is smart about this because if you assign the same tool to another operation, Fusion checks to see if an existing tool has the same values and instead of creating a new one, will use the existing tool from the document library.

Another big difference between the library objects and the other CAM objects is they exist outside of Fusion documents. The CAM object is associated with a specific document and provides access to the CAM data that exists in that document. To provide access to library information outside the context of a document, the CAM API provides the CAMManager object which can be accessed directly at any time by using the static adsk.cam.CAMManager.get() method. The object model for the CAMManager object and the objects it provides access to are shown in the picture below.

CAMManager Object Model

Finding Items in a Library

There are several locations where Fusion looks for libraries; Fusion Library, Vendor Libraries, Personal Libraries (both local and in the cloud), and the document library that exists within each document. Folders, and libraries are specified using a URL object. The URL is essentially a path to a folder or file that can exist locally or on the cloud. Let's look at a simple example to see what's available and what it does. Below shows the local location for tool libraries. It contains one library called "StandardTools" and a folder called "CustomTools" which contains two libraries; "CustomMilling" and "CustomTurning".

Below is some example code that accesses the library using the knowledge about where it's located and then gets a specific tool from the library.

# Get a reference to the CAMManager object.
camMgr = adsk.cam.CAMManager.get()

# Get the ToolLibraries object.
toolLibs = camMgr.libraryManager.toolLibraries

# Get the URL for the local libraries.
localLibLocationURL = toolLibs.urlByLocation(adsk.cam.LibraryLocations.LocalLibraryLocation)

# Get the URL of the folder, which will be for the "CustomTools" folder.
f360FolderURLs = toolLibs.childFolderURLs(localLibLocationURL)
customToolsFolderURL = f360FolderURLs[0]

# Get the "CustomMilling" library.
f360LibraryURLs = toolLibs.childAssetURLs(customToolsFolderURL)
toolLib = None
for libURL in f360LibraryURLs:
    if 'CustomMilling' in libURL.leafName:
        toolLib = toolLibs.toolLibraryAtURL(libURL)

# Find a specific tool.
for tool in toolLib:
    if tool.parameters.itemByName('tool_description').value.value == '1/16" Ball Endmill':
        return tool

Another way to find an item in a library is to use the query object supported by each of the different type of library. For example, for tools there is a ToolQuery object. You can query at different levels to have a larger or smaller scope of the query. For example, you can create a query object from the ToolLibraries object, which will search all tool libraries. You can also query within a specific tool library. The code below gets the same tool as before by querying the local library.

# Get a reference to the CAMManager object.
camMgr = adsk.cam.CAMManager.get()

# Get the ToolLibraries object.
toolLibs = camMgr.libraryManager.toolLibraries

# Create a query object to query the local library.
query = toolLibs.createQuery(adsk.cam.LibraryLocations.LocalLibraryLocation)

# Add a query criteria to search for a specific description.
query.criteria.add('tool_description', adsk.core.ValueInput.createByString('1/16" Ball Endmill'))

# Do the query.
queryResults = query.query()

# Get the tool from the results. There can be multiple tools returned. This used the first one.
tool = None
if len(queryResults) > 0:
    tool = queryResults[0].tool

return tool

When doing a query, you can add multiple criteria to the query. The example above only has one, where it's searching for a specific description. However, you can search on any parameter that a tool has. You can also add ".min" or ".max" to set maximum and minimum values to use when checking the value of the parameter. In the example below, it is finding all tools that have 0.25 inch diameter and a corner radius greater than 0.05 inch and less than 0.125 inch.

# Get a reference to the CAMManager object.
camMgr = adsk.cam.CAMManager.get()

# Get the ToolLibraries object.
toolLibs = camMgr.libraryManager.toolLibraries

# Create a query object to query the local library.
query = toolLibs.createQuery(adsk.cam.LibraryLocations.Fusion360LibraryLocation)

# Add the search criteria.
query.criteria.add('tool_diameter', adsk.core.ValueInput.createByReal(0.25 * 2.54))
query.criteria.add('tool_cornerRadius.min', adsk.core.ValueInput.createByReal(0.05 * 2.54))
query.criteria.add('tool_cornerRadius.max', adsk.core.ValueInput.createByReal(0.125 * 2.54))

# Do the query.
queryResults = query.query()

# Get the tool from the results. There can be multiple tools returned. This used the first one.
tool = None
if len(queryResults) > 0:
    tool = queryResults[0].tool

return tool


Machine/Avoid Functionality

Currently, there are two types of groups in the table that the CAM API supports: direct selection groups, which is equivalent to what the user would do from the UI, as shown below, and default selection groups which are created automatically by the API to match the parameter driven groups in the operation. These default selection groups can be accessed from the API in order to change their properties, but their geometry cannot be directly modified.

The machining mode that is currently set will determine which value the radial and axial offset functions refer to. When set to Machine, the radial and axial offset functions will read/set the stock to leave parameter for the current group. When set to Avoid, the radial and axial offset methods will read/set the clearance value, and the Fixture mode will map to the fixture clearance value. This is supported in the API through the MachineAvoidDefaultSelection, MachineAvoidDirectSelection, and MachineAvoidGroups objects.

The sync function is used to synchronize the selections and properties of the default groups from the current operation. This is needed when there are changes made to parameters that drive the default groups (e.g. Setup model or fixture selection changes to be reflected in the MachineAvoidGroups object on the API side). This function must not be called before applyMachineAvoidGroups, because temporary group settings and selections will not have been stored in the operation object and will be overwritten.

Below, is a script that demonstrates the new way of setting up the machine/avoid groups and their properties. The script assumes that the user has a document opened that has at least two different bodies.

import random
import adsk.core, adsk.fusion, adsk.cam, traceback

tool_json = '{ "BMC": "hss", "GRADE": "Mill Generic", "description": "10mm END MILL_ALLY", "geometry": { "CSP": false, "DC": 10,
"HAND": true, "LB": 50, "LCF": 35, "NOF": 3, "OAL": 53, "SFDM": 10, "shoulder-length": 35 }, "guid": "d26c8a29-7782-4a5a-9c6d-3f21d9a66e9e",
"holder": { "description": "Maritool CAT40-ER32-2.35", "guid": "", "product-id": "CAT40-ER32-2.35", "product-link": "",
"segments": [ { "height": 3.7592, "lower-diameter": 38.1, "upper-diameter": 50.038 }, { "height": 21.2344, "lower-diameter": 50.038,
"upper-diameter": 50.038 }, { "height": 4.470400000000001, "lower-diameter": 39.878, "upper-diameter": 39.878 }, { "height": 2.286,
"lower-diameter": 39.878, "upper-diameter": 44.45 }, { "height": 10.795000000000003, "lower-diameter": 44.45, "upper-diameter": 44.45 },
{ "height": 1.27, "lower-diameter": 44.45, "upper-diameter": 46.99 }, { "height": 0.762, "lower-diameter": 62.0268, "upper-diameter": 63.5508 },
{ "height": 3.683, "lower-diameter": 63.5508, "upper-diameter": 63.5508 }, { "height": 2.0066, "lower-diameter": 63.5508, "upper-diameter": 56.261 },
{ "height": 2.9972, "lower-diameter": 56.261, "upper-diameter": 56.261 }, { "height": 2.0066, "lower-diameter": 56.261, "upper-diameter": 63.5508 },
{ "height": 3.6322, "lower-diameter": 63.5508, "upper-diameter": 63.5508 }, { "height": 0.762, "lower-diameter": 63.5508, "upper-diameter": 62.0268 },
 { "height": 3.175, "lower-diameter": 44.45, "upper-diameter": 44.45 } ], "type": "holder", "unit": "millimeters", "vendor": "Maritool" },
 "post-process": { "break-control": false, "comment": "", "diameter-offset": 2, "length-offset": 2, "live": true, "manual-tool-change": false,
 "number": 2, "turret": 0 }, "product-id": "", "product-link": "", "start-values": { "presets": [ { "description": "", "f_n": 0.016666666666667,
 "f_z": 0.1, "guid": "10f47137-ad2c-4aa2-9da0-2781c27e84ab", "n": 12000, "n_ramp": 12000, "name": "Preset 1", "tool-coolant": "flood",
 "use-stepdown": false, "use-stepover": false, "v_c": 376.9911184307752, "v_f": 3600, "v_f_leadIn": 1000, "v_f_leadOut": 1000,
 "v_f_plunge": 200, "v_f_ramp": 300 }, { "description": "", "f_n": 0.022222222222222, "f_z": 0.088888888888889, "guid": "add69606-20d4-4144-976c-878e648fd80a",
 "n": 9000, "n_ramp": 9000, "name": "SecondPreset", "tool-coolant": "flood", "use-stepdown": false, "use-stepover": false, "v_c": 282.7433388230814,
 "v_f": 2400, "v_f_leadIn": 1000, "v_f_leadOut": 1000, "v_f_plunge": 200, "v_f_ramp": 300 } ] }, "type": "flat end mill", "unit": "millimeters", "vendor": "" }'

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()

        doc = app.activeDocument

        ui  = app.userInterface

        # Make
        camWS = app.userInterface.workspaces.itemById('CAMEnvironment')
        camWS.activate()
        cam = adsk.cam.CAM.cast(doc.products.itemByProductType("CAMProductType"))

        models = [cam.manufacturingModels.item(0).occurrence.childOccurrences.item(0).childOccurrences.item(0)]

        if cam == None:
            ui.messageBox('There is no CAM data in the active document')

        setups = cam.setups

        # Create setup and set parameters.
        setupInput = setups.createInput(adsk.cam.OperationTypes.MillingOperation)

        # Set the first body in the model to be the setup model.
        setupInput.models = models

        setup = setups.add(setupInput)

        # create new face operation in the newly created setup.
        operationInput = setup.operations.createInput('parallel')
        tool = adsk.cam.Tool.createFromJson(tool_json)
        operationInput.tool = tool
        operationInput.toolPreset = tool.presets.item(1)
        parallelMilling = setup.operations.add(operationInput)

        # Get all the faces in the model and randomly select 4
        body = models[0]

        # Get the "checkSurfaceSelectionSets" parameter from the operation, which
        # is a CadFaceGroups cad object.
        surfaceGroupsParam: adsk.cam.CadMachineAvoidGroupsParameterValue = parallelMilling.parameters.itemByName('checkSurfaceSelectionSets').value

        # Get the MachineAvoidGroups object from the CadFaceGroups cad object. This
        # object manages the list of mutually exclusive groups.
        machineAvoidGroups = surfaceGroupsParam.getMachineAvoidGroups()

        # -----------------------------------------------------------
        # Create a new user group - Machine.
        machineAvoidGroup: adsk.cam.MachineAvoidDirectSelection = machineAvoidGroups.createNewMachineAvoidDirectSelectionGroup()

        # Set properties on the newly created exclusiveGroup
        machineAvoidGroup.machineMode = adsk.cam.MachiningMode.Machine_MachiningMode
        machineAvoidGroup.radialOffset = 0.1
        machineAvoidGroup.axialOffset = 0.2

        # Add the face/body/component to the exclusiveGroup selection.
        machineAvoidGroup.inputGeometry = [cam.manufacturingModels.item(0).occurrence.childOccurrences.item(0).childOccurrences.item(0).bRepBodies.item(0).faces.item(0)]

        # Change properties of the model group.
        modelGroup = machineAvoidGroups.defaultGroup(adsk.cam.DefaultGroupType.Model_GroupType)
        modelGroup.machineMode = adsk.cam.MachiningMode.Machine_MachiningMode

        # These set the radial and axial stock to leave.
        modelGroup.radialOffset = 0.7
        modelGroup.axialOffset = 0.7
        modelGroup.machineMode = adsk.cam.MachiningMode.Avoid_MachiningMode

        # These set the radial and axial clearances.
        modelGroup.radialOffset = 0.2
        modelGroup.axialOffset = 0.3
        surfaceGroupsParam.applyMachineAvoidGroups(machineAvoidGroups)

        # Gen the op.
        cam.generateToolpath(parallelMilling)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


 Introduction to CAM Parameters
BooleanParameterValue
IntegerParameterValue
StringParameterValue
FloatParameterValue
ChoiceParameterValue
CadContours2dParameterValue
ChainSelection
FaceContourSelection
PocketSelection
PocketRecognitionSelection
SilhouetteSelection
CadObjectParameterValue

Introduction to CAM Parameters

When working with the CAM API, it is critical to understand the concept of CAM parameters. Like the Design API, the CAM API is a thin layer over the internal implementation. Because of that there are some significant conceptual differences in how they work and the most significant difference is CAM parameters. Instead of having an object with defined methods and properties, many of the CAM objects have relatively few methods and properties. For example, an Operation object has about 25 methods and properties, but as you can see from the picture below, there are far more settings available for an operation. All of the settings you see in the Setup and Operation dialogs are provided as CAM Parameters. Instead of specifically defined methods and properties, the Operation object returns a collection of parameters. You query and edit the operation by accessing the associated parameters.

CAM Parameters in the UI

As you can see in the dialog above, there are several parameter types; numeric values, Booleans, lists of choices, strings, and geometric selections. Below is the object model for CAM parameters. A CAMParameters collection object is returned by the Setup, Operation, CAMFolder, and CAMPattern objects. The CAMParameters collection provides access to all the parameters associated with the object you got the collection from.

CAM Parameter Object Model

You can access a specific parameter in the collection by using its name. To find the name of a parameter, manually edit the operation you want to modify. With the dialog displayed, hold down the SHIFT key and hover the mouse over the input area of the setting in the dialog. With the Shift key pressed, it will display programming-related information about the parameter instead of showing a general description. An example is shown below, with the parameter name “stepover”, highlighted.

CAM Parameter Object Model

Knowing the name of a parameter, you can get the CAMParameter object using the itemByName method, as shown 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 Design product.
product = products.itemByProductType('DesignProductType')
design = adsk.fusion.Design.cast(product)
# Get the Parameters collection object from an operation.
params = operation.parameters

# Get the CAMParameter named "finishingStepover".
stockParam = params.itemByName('finishingStepover')

Besides holding the shift and hovering over a parameter, you can dump out the complete list of parameters associated with a Setup, Operation, or tool by using the CAM_API_Utilities sample add-in that is delivered with Fusion. To use this, you first need to load the add-in, which you do by using the Scripts and Add-Ins, as shown below. Select the "CAM_API_Utilities" add-in from the bottom of the list in the "Add-Ins" tab and click "Run". If you click the "Run on Startup" checkbox, the add-in will automatically be loaded whenever Fusion is started and the associated commands will always be available. When the add-in is running it adds the Export Parameters and List Operation Types commands to the INSPECT panel within the Manufacturing workspace. The best way to use this command is to manually create the setup, operation, or tool you want to create or edit using the API and then run the Export Parameters and choose the setup, operation, or tool in the dialog. It will dump a list of the parameters and their current values into the specified text file, and optionally display it in the default text editor. This file can help you understand what's available and how to set it.

CAM API Utilities

When you run the command, you can choose to only write out editable parameters. Many parameters are not editable because of one of two reasons. First, a check box to enable a group of related parameters is not checked. A checked group is illustrated below. When the "Feed Optimization" check box is unchecked, the CAM Parameters below it are not shown, but they still exist. The other reason is that some parameters are created for every operation and setup to allow you to create expressions that use those parameters. For example, many tool-related parameters are returned from an operation. "tool_diameter" is an example of one of these parameters. It's not editable because it's not owned by the operation but is referenced from the tool assigned to it. The "tool_diameter" parameter is used in many operation parameters. For example, the default Finishing Stepover parameter has the expression "tool_diameter * 0.1", and the "tool_diameter" parameter must exist within the operation to use it in an expression.

Editable CAM Parameter

Once you have a CAMParameter, there are two ways to set its value; using the “expression” property of the CAMParameter object or using the associated ParameterValue object. Choosing which one to use is discussed below.

When using the API, the ParameterValue associated with the parameter is typically better to use. Using the ParameterValue, you set the value directly using a specific data type. For example, often, you will calculate a value, like an offset, and you can use the calculated floating-point value to set the parameter. Also, values use consistent units independent of the user’s chosen units for the document. This makes it easier to program because your program doesn’t need to worry about the user units and convert back and forth. If the user has chosen to work in inches, they will see the value as inches in the dialog, but you don’t need to do any conversions and can always work in centimeters. You should also be aware that setting the value will replace the expression with a simple value.

You should use the expression whenever you want to use anything more complicated than a simple value. An Expression is always a string and is defined using the same string as if you entered the expression in the user interface. Expressions are evaluated by the CAM system and result in setting the value. Expressions are also evaluated using the units specified by the user in the active CAM document. For example, if you input “2” as the expression and the CAM length unit is mm it will be evaluated as 2 mm.

Expressions provide more advanced capabilities like “tool_dia / 2”, logic like “tool_diameter > 5 ? 2mm : 1mm”, or call functions like “Math.abs(tool_dia – tool_stepover)”. Expressions are not unique to the API, but are a general capability of Fusion Manufacturing, which you can read more about in the help.

Below is the diagram of the object model for CAM parameters. The “expression” property is directly on the CAMParameter object. To work with values, you call the “value” property of the CAMParameter object, which returns a ParameterValue object. Although, what’s really returned is one of the more specific types, depending on what the CAMParameter provides access to. The bold “[PP]” indicates that the ParameterValue object is a base class, and the italic “(PP)” indicates the objects that are derived from ParameterValue.

For example, the value property for the finishing stepover parameter returns a FloatParameterValue and the value property of the parameter named “tool_coolant” returns a ChoiceParameterValue to let you choose from a predefined list of valid values. Each of the supported types is discussed in detail below.

CAM Parameter Object Model

Below is an example of working with each one of the different parameter types.

BooleanParameterValue

The BooleanParameterValue type of parameter value is returned for parameters represented by a check box on the command dialog, as shown below. The example below also illustrates the two cases where check boxes are used. The “Both Ways” parameter specifies if an option is enabled, and the “Stock to Leave” indicates whether a related set of options should be enabled. In both cases, these are represented in the API by the BooleanParameterValue object. The value property of the BooleanParameterValue gets and is set using a Boolean type value.

CAM Parameter Boolean Example

The code below shows an example of getting the “Both Ways” parameter and enabling the option by using the expression property of the CAMParameter object. It also demonstrates setting the value using the associated BooleanParmaeterValue object. The result is the same as using the expression, but as discussed above, if you’ve calculated a Boolean value, it’s easier to use it directly rather than convert it into a string.

# Get the parameter for the “Both Ways” setting.
bothWaysParam = op.parameters.itemByName('bothWays')

# Set the expression of the parameter. The expression is always a String.
bothWaysParam.expression = 'true'

# Get the associated ParameterValue object, which is a BooleanParameterValue.
boolValue: adsk.cam.BooleanParameterValue = bothWaysParam.value
boolValue.value = True

IntegerParameterValue

The IntegerParameterValue type of parameter value is returned for parameters represented by an input that allows specifying a whole number on the command dialog, as shown below. The value property of the BooleanParameterValue object is an Integer type.

CAM Parameter Integer Example

StringParameterValue

The StringParameterValue type of parameter value is returned for parameters that support entering any textual information, as shown below. The expression of the CAMParameter for a StringParameterValue is a quoted string where a single quote is used. The value property of the StringParameterValue object is a string type.

CAM Parameter String Example

The expression of the CAMParameter for a StringParameterValue is a quoted string using single quotes. This is the same as when you define the expression using the user interface, as shown below. The value property of the StringParameterValue object is a string without quotes.

CAM Parameter String Example

The code below demonstrates setting the program name using both the expression of the CAMParameter and the value of the associated StringParameterValue.

# Get the coolant parameter.
progNameParam = setup.parameters.itemByName('job_programName')

# Set the value using the expression. This requires it to be
# quoted using single quotes.
progNameParam.expression = f'\'{newName}\''

# Set the value using the value property of the StringParameterValue object.
# This uses a simple string.
stringVal: adsk.cam.StringParameterValue = progNameParam.value
stringVal.value = newName

FloatParameterValue

The FloatParameterValue type of parameter value is returned for parameters that support entering floating point numbers, as shown below. This parameter type is the most common, as you can see in the example below, where they are all float values except for the “Preset” drop-down list. The FloatParameterValue represents all floating-point inputs of any unit type. You can see below that there are rotational speeds, linear speeds, and distances. Angles are another common unit type. In C++, the value property of the FloatParameterValue is type double.

The FloatParameterValue type of parameter value is returned for parameters that support entering floating point numbers, as shown below. This parameter type is the most common, as you can see in the example below, where they are all float values except for the “Preset” drop-down list. The FloatParameterValue represents all floating-point inputs of any unit type. You can see below that there are rotational speeds, linear speeds, and distances. Angles are another common unit type. In C++, the value property of the FloatParameterValue is type double.

CAM Parameter Float Example

The units used by the API for CAM are shown below, and some are different from those used by the API for Design.

  • Length - centimeters (cm)
  • Angle - degrees (deg)
  • Linear velocity – millimeters per minute (mm/min)
  • Rotational velocity - revolutions per minute (rpm)
  • Time - seconds (s)
  • Weight - kilograms (kg)
  • Power - Watts (W)
  • Flow rate - liters/minute (l/min)
  • Area - square centimeters (cm²)
  • Volume - cubic centimeters (cm³)
  • Temperature - degrees Celsius (C)

ChoiceParameterValue

The ChoiceParameterValue type of parameter value is returned for parameters that provide a predefined list of options for the user to choose from. The picture below on the left shows the “Coolant” parameter and the drop-down with the available choices. The picture on the right shows the information provided when you hold the Shift key and hover over the input. It displays all of the options, showing the same name as you see in the dialog, but beside each name is the internal name you use to set that option using the API.

CAM Parameter Choice Example

Below is some example code that sets the coolant to use “Flood and mist”. When using the expression property of the CAMParameter, this has the same requirement as the StringParameterValue in that it returns and is set using a string that is quoted using single quotes. The value property of the ChoiceParameterValue returns and is set using a simple string.

# Get the coolant parameter.
coolantParam = op.parameters.itemByName('tool_coolant')

# Set the value using the expression. This must be a quoted string.
coolantParam.expression = '\'flood mist\''

# Set the value using the value property of the ChoiceParameterValue object.
choiceVal: adsk.cam.ChoiceParameterValue = coolantParam.value
choiceVal.value = 'flood mist'

CadContours2dParameterValue

The CadContours2dParameterValue type of parameter value is returned for parameters that support the selection of 2D contours. An example of this parameter type is shown below. An operation can have multiple contour selections, which can be different contour types, as shown below, where the operation has a Chain and a Pockets contour defined.

CAM Parameter Contour Dialog

The value of a CadContours2dParameterValue isn’t a simple value like the parameters discussed so far. The value property returns a CurveSelections object, which is a collection of objects that represent different types of selections. Below is the full object model for the CadContours2dParameterValue. You can compare the list in the command above to the diagram below and see that the API currently supports all options except for “Pocket Recognition” and “Sketch Profiles”.

Curve Selections Object Model

Below is a description and sample code for each of the types.

ChainSelection

When creating a chain selection in the user interface, you select a set of chained curves and can define the options shown below in the CHAIN dialog. These same options are available in the API on the ChainSelection object.

Curve Selections Object Model

When interactively defining the chain, as you select edges or sketch entities, Fusion will automatically find and select chained entities. This automatic selection does not happen when using the API. Instead, you must provide each of the curves you want to be part of the chain, and the curves must be in their connected order. Providing curves in the correct order typically involves using some of the Design API to interrogate the model to find the geometry of interest. For example, the Component.createOpenProfile can be used to find chained curves in a sketch, and the BRepEdge.tangentiallyConnectedEdges can be used to fomd tangentially connected edges. The topology inherent in the B-Rep also provides many tools for interrogating and finding specific geometry.

The first curve in the list of curves you provide defines the side that will be cut. All curves in a sketch and B-Rep edges have a natural direction, which can be determined by checking the parameterization of the sketch curve or edge. The direction of the increasing parameter value is the natural direction of the sketch curve or edge. The chain direction will be in that direction, and for many operation types, like contour operations, it defines which side of the curve the tool will be on. If you could stand on the curve and look along it toward increasing parameters, the tool will be on your right. Reversing the chain will flip the direction, so you’re now looking at the curve in the direction of decreasing parameters. The cut side is still to your right, but it’s now on the other side of the curve.

Below is a picture to illustrate this concept. The API has been used to determine the increasing parameter direction of the highlighted edge, and an arrow has been drawn to illustrate that direction. If we’re standing on the arrow, looking in the direction it points, the tool will cut on the right side, which is not the side we want. The isReverse property of the chain can be set to reverse the direction, effectively flipping the arrow, so now the right side is the inside of the cutout.

Cut Direction Example

Below is a function that prompts for the selection of a face and then uses the outer edges of the face to define a chain, which it then adds to a 2D Contour operation, which it finds by its name.

def addChain():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Have a face selected whose edges will be used for the chain.
        sel = ui.selectEntity('Select the bottom face of the part.', 'PlanarFaces')
        bottomFace: adsk.fusion.BRepFace = sel.entity

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('2D Contour1')

        # Get the "contours" parameter from the 2D Contour operation, which is a CAD Contour 2D.
        # The name of the parameter will vary depending on the type of operation.
        contourParam: adsk.cam.CadContours2dParameterValue = op.parameters.itemByName('contours').value

        # Get the CurveSelections object from the CAD contour. This
        # object manages the list of contour selections.
        curveSelections = contourParam.getCurveSelections()

        # Find the outer loop of the selected face.
        outerLoop = None
        for bottomLoop in bottomFace.loops:
            if bottomLoop.isOuter:
                outerLoop = bottomLoop
                break

        # Get the edges from the loop and add them to a list.
        outerEdges = [e for e in outerLoop.edges]

        # Create a new chain selection.
        chainSel: adsk.cam.ChainSelection = curveSelections.createNewChainSelection()

        # Set some properties of the chain.
        chainSel.isOpen = False
        chainSel.isReverted = False

        # Add the geometry to the chain.
        chainSel.inputGeometry = outerEdges

        # Apply the curve selection back to the parameter.
        contourParam.applyCurveSelections(curveSelections)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

FaceContourSelection

When creating a face contour selection in the user interface, you select one or more faces and can define the options shown below in the FACE CONTOURS dialog. These same options are available in the API on the FaceContourSelection object.

Curve Selections Object Model

Face contours are simpler than the chain because they are always closed and have a well-defined outside and inside. Below is some sample code that gets a selection of a face and adds a Face Contour selection to an existing Face operation. The picture on the left shows that initial state of the operation where it’s only machining the circular face on the top of the boss. The picture to the right shown the state after running the script below where it prompts for the selection of a face and the face shown in blue on the left was selected. Because the “Select same plane faces” option is specified using the API, the smaller face was automatically used.

def addFaceContour():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Have a face selected.
        sel = ui.selectEntity('Select the face to contour.', 'Faces')
        face: adsk.fusion.BRepFace = sel.entity

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('Face1')

        # Get the "stockContours" parameter from the Face operation, which is a CAD Contour 2D.
        # The name of the parameter will vary depending on the type of operation.
        contourParam: adsk.cam.CadContours2dParameterValue = op.parameters.itemByName('stockContours').value

        # Get the CurveSelections object from the CAD contour. This
        # object manages the list of contour selections.
        curveSelections = contourParam.getCurveSelections()

        # Create a new face contour selection.
        faceContourSel: adsk.cam.FaceContourSelection = curveSelections.createNewFaceContourSelection()

        # Set some properties of the face contour.
        faceContourSel.isSelectingSamePlaneFaces = True
        faceContourSel.loopType = adsk.cam.LoopTypes.AllLoops
        faceContourSel.sideType = adsk.cam.SideTypes.StartOutsideSideType

        # Add the face to the face contour.
        faceContourSel.inputGeometry = [face]

        # Apply the curve selection back to the parameter.
        contourParam.applyCurveSelections(curveSelections)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

PocketSelection

When creating a pocket selection in the user interface, you select one or more faces that represent the bottom of a pocket, and you can also specify the options shown below in the POCKETS dialog. These same options are available in the API on the PocketSelection object.

Pocket Selection Dialog

The code below has the user select a face and then adds that face as a pocket selection to an existing pocket operation.

def addPocketContour():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Have the pocket face selected.
        sel = ui.selectEntity('Select the planar face to pocket.', 'PlanarFaces')
        face: adsk.fusion.BRepFace = sel.entity

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('2D Pocket2')

        # Get the "pockets" parameter from the operation, which is a CAD Contour 2D.
        # The name of the parameter will vary depending on the type of operation.
        contourParam: adsk.cam.CadContours2dParameterValue = op.parameters.itemByName('pockets').value

        # Get the CurveSelections object from the CAD contour. This
        # object manages the list of contour selections.
        curveSelections = contourParam.getCurveSelections()

        # Create a new pocket selection.
        pocketSel: adsk.cam.PocketSelection = curveSelections.createNewPocketSelection()

        # Set some properties of pocket contour.
        pocketSel.isSelectingSamePlaneFaces = False

        # Add the selected face to the face contour.
        pocketSel.inputGeometry = [face]

        # Apply the curve selection back to the parameter.
        contourParam.applyCurveSelections(curveSelections)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

PocketRecognitionSelection

When creating a pocket recognition selection in the user interface, you select one or more bodies or the setup model selection. You can define the options shown below in the POCKET RECOGNITION dialog. These same options are available in the API on the PocketRecognitionSelection object. Contrary to the other geometry selections, this selection's associativity is restricted to its parameters and the entire body, not the resulting BRepFace or BRepEdge objects. You cannot explicitly exclude a particular pocket; the resulting number of recognized pockets may also change if the body geometry changes.

Pocket Recognition Selection Dialog

The code below includes all setup bodies, sets the parameters above and then uses the recognized pockets in an existing pocket operation.

def addPocketRecognitionSelectionContour():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('2D Pocket2')

        # Get the "pockets" parameter from the operation, which is a CAD Contour 2D.
        # The name of the parameter will vary depending on the type of operation.
        contourParam: adsk.cam.CadContours2dParameterValue = op.parameters.itemByName('pockets').value

        # Get the CurveSelections object from the CAD contour. This
        # object manages the list of contour selections.
        curveSelections = contourParam.getCurveSelections()

        # Create a new pocket selection.
        pocketRecSel: adsk.cam.PocketRecognitionSelection = curveSelections.createNewPocketRecognitionSelection()

        # Set some properties of pocket contour.
        pocketRecSel.isSetupModelSelected = True

        # Include holes.
        pocketRecSel.areHolesIncluded = True

        # Set minimum hole diameter.
        pocketRecSel.minimumHoleDiameter= 0.1

        # Set minimum and maximum pocket radii.
        pocketRecSel.minimumCornerRadius = 0.2
        pocketRecSel.maximumCornerRadius = 1.0

        # Set minimum and maximum pocket depth.
        pocketRecSel.minimumPocketDepth = 0.0
        pocketRecSel.maximumPocketDepth = 2.0

        # Apply the curve selection back to the parameter.
        contourParam.applyCurveSelections(curveSelections)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

SilhouetteSelection

When creating a silhouette selection in the user interface, you select one or more bodies to use in calculating the silhouette curves and you can define the options shown below in the SILHOUETTE dialog. These same options are available in the API on the SilhouetteSelection object.

Silhouette Selection Dialog

The code below has the user select a body and then adds that body as a silhouette selection to an existing pocket operation.

def addSilhouetteContour():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Have a body selected to use for the silhouette.
        sel = ui.selectEntity('Select the body for the silhouette.', 'SolidBodies')
        body: adsk.fusion.BRepBody = sel.entity

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('2D Contour1')

        # Get the "contours" parameter from the operation, which is a CAD Contour 2D.
        # The name of the parameter will vary depending on the type of operation.
        contourParam: adsk.cam.CadContours2dParameterValue = op.parameters.itemByName('contours').value

        # Get the CurveSelections object from the CAD contour. This
        # object manages the list of contour selections.
        curveSelections = contourParam.getCurveSelections()

        # Create a new silhouette selection.
        silhouetteSel: adsk.cam.SilhouetteSelection = curveSelections.createNewSilhouetteSelection()

        # Set some properties of the face contour.
        silhouetteSel.isSetupModelSelected = False
        silhouetteSel.loopType = adsk.cam.LoopTypes.AllLoops

        # Add the body to the silhouette selection.
        silhouetteSel.inputGeometry = [body]

        # Apply the curve selection back to the parameter.
        contourParam.applyCurveSelections(curveSelections)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

CadObjectParameterValue

The CadObjectParameterValue type of parameter value is returned for parameters that support the selection of various design goemetry. This is different from contour selections in that it uses the geometry directly, whereas the contour selections use additional processing on the input geometry to calculate geomtery than can be used by an operation. An example of this parameter type is shown below.

CAM Parameter CAD Object Dialog

def AddCadObjectParameterValue():
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        cam: adsk.cam.CAM = app.activeProduct

        # Have a face selected to add to the scallop.
        sel = ui.selectEntity('Select the face to add to the scallop.', 'Faces')
        face: adsk.fusion.BRepFace = sel.entity

        # Get an operation that has a specific name from the first setup.
        setup = cam.setups[0]
        op = setup.operations.itemByName('Scallop2')

        # Get the "model" parameter from the operation, which is a CadObjectParameterValue.
        # The name of the parameter will vary depending on the type of operation.
        cadObjectParam: adsk.cam.CadObjectParameterValue = op.parameters.itemByName('model').value

        # Get the value of the parameter, which is a list of faces in this case.
        faces = cadObjectParam.value

        # Add the selected face to the faces already defined for the operation.
        faces.append(face)

        # Assign the faces back to the operation.
        cadObjectParam.value = faces
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Introduction to CAM Programs

More to come...

The Fusion CAM API has been designed and developed to provide a high level of automation within the manufacture space. The CAM API functionality is provided through CAM-specific libraries. If you’ve used the API to automate the Design portion of Fusion, you’ve used the asdk.core and asdk.fusion libraries. The CAM functionality is defined in the adsk.cam library and is referenced into your program using the techniques shown below.

Include CAM files

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# From the Products collection on the active document, get the CAM Product.
cam: adsk.cam.CAM = doc.products.itemByProductType('CAMProductType')

# Check if anything was returned.
if cam == None:
     ui.messageBox('There is no CAM data in the active document')
     return


Introduction to CAM Templates

More to come...

The Fusion CAM API has been designed and developed to provide a high level of automation within the manufacture space. The CAM API functionality is provided through CAM-specific libraries. If you’ve used the API to automate the Design portion of Fusion, you’ve used the asdk.core and asdk.fusion libraries. The CAM functionality is defined in the adsk.cam library and is referenced into your program using the techniques shown below.

Include CAM files

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# From the Products collection on the active document, get the CAM Product.
cam: adsk.cam.CAM = doc.products.itemByProductType('CAMProductType')

# Check if anything was returned.
if cam == None:
     ui.messageBox('There is no CAM data in the active document')
     return


Understanding Canvases in Fusion

The API fully supports the canvas functionality in Fusion, but there are some basic concepts you need to understand to take advantage of these capabilities.

Images and Resolution

The first thing you need to understand is what an image is. When we talk about an image, we're referring to pixel-based images, not a vector format like SVG. For pixel-based images, the primary two concepts that impact their use in a canvas are size and resolution. The size of an image is defined as the number of pixels along the width and height of the image. Resolution is a more complex idea to fully understand because most images don't have an inherent resolution and aren't based on real-world measurement.

For example, you might have an image that is 1000x500 pixels. An image of this size has a total of 500,000 pixels or half a Megapixel, where a Megapixel measures the total number of pixels in an image, and one Megapixel is one million pixels. If you used a camera to capture this image, it won't have a defined resolution. However, if you insert this image into a Word document to print it, you're implicitly defining the resolution by how big you make the image on the page. For example, if you size it to be 4 inches wide and 2 inches tall on the page, it will print with a resolution of 250 pixels per inch.

An image can have a resolution specified within the image file, and that resolution can be used later by the page layout application to keep the image the correct size. For example, if the image above has a defined resolution of 200 pixels per inch, it will be 5 inches wide and 2 1/2 inches tall when you insert it into Word. Of course, you can still resize it once it has been inserted, which will change the resolution it's printed at, so the resolution defined in the image can be considered the default resolution. Images created using a scanner typically have the resolution specified in the image file, but not all formats support a resolution. For example, GIF does not, but PNG files do, even though it's generally not used. TIFF files support having a resolution and are the format most commonly used for printing. We'll see an example later where we can use the resolution to create an accurately sized Canvas.

Interactively Adding a Canvas

When you use the Canvas command to add a canvas to a design, even if the image file has a resolution defined, it is ignored, and instead, the image is scaled to fit on the selected plane. This results in an arbitrary resolution, depending on the selected face's physical size. You can see the result of inserting the same 500x500 pixel image on various shaped faces below. Notice how the canvases, which are of various shapes and sizes, fit within each face.

.

The same is true when adding a canvas to a construction plane. The display size of the construction plane is used to determine the size of the canvas. The exception is when a canvas is placed on one of the three base construction planes, which is common when creating a canvas. The base construction planes don't have a physical size. You can see this as you zoom in and out of the view, and the planes stay the same size relative to the view. In this case, Fusion will always create the canvas so it is 1.75 cm on its longest side. The canvas is also centered on the model origin, as shown below.

Canvas on Construction Plane

If you right-click on an existing canvas, there is a "Calibrate" command in the context menu. When you run this command, you pick two points on the canvas and enter a distance. Fusion scales the canvas so those two points are the specified distance apart, effectively setting the resolution of the canvas. You can also use the Edit Canvas command dialog to resize, move, rotate, and flip the canvas.

Using the API to Add a Canvas

When using the API to add a canvas, you have the same control as when you use the command but can use your logic to have more control over the placement. For example, you can create a canvas using a specific resolution so it's precise, and the user doesn't need to use the "Calibrate" command. The code below creates a canvas on the base X-Y construction plane, taking all the default settings. This results in the same canvas as if you created the canvas using the Canvas command and didn't change any settings in the dialog. However, just like when using the command, you can also move, resize, rotate, and flip the canvas, as discussed below.

import adsk.core, adsk.fusion, traceback

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Create a canvas on the base X-Y construction plane using the defaults.
        imageFilename = 'C:/Temp/500x500.png'
        canvasInput = root.canvases.createInput(imageFilename, root.xYConstructionPlane)
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

How a Matrix Controls a Canvas

When creating or modifying a canvas using the API, you work with Fusion at a much lower level than when using the command. You use a transformation matrix to control a canvas's size, position, angle, and flipping. Here's an introduction to a matrix and how it fully defines a canvas.

Before we look at the details of a matrix, it's best to look at what it represents. Like that shown below, you can think of a matrix as representing a 2D coordinate system positioned within another 2D coordinate system. Green arrows represent the coordinate system defined by the plane the canvas is placed on. The red arrows represent the canvas's coordinate system, which is positioned and oriented relative to the plane's coordinate system.

Canvas on Construction Plane

Position and Orientation

Let's look at the details of a matrix and how it defines a coordinate system. The plane's coordinate system is 2-dimensional, so a 2D matrix defines the placement of a canvas. As shown below, a 2D matrix is defined by nine numbers arranged in rows and columns to create a 3x3 matrix. Even though a 2D matrix comprises nine numbers, we only need six to define the coordinate system. The bottom row is not used.

The matrix shown below is a unique matrix called an identity matrix because it defines a coordinate system that is identical to the base coordinate system. If we read the numbers in each column from the top down, the first column is (1, 0), the second is (0, 1), and the third is (0, 0). The first column defines a vector that specifies the coordinate system's X-axis direction, and the second column defines the Y-axis. The third column is (0, 0) and defines the location of the coordinate system's origin.

Canvas on Construction Plane

The code below is similar to the example above, except that instead of using the default transformation, it replaces it with an identity matrix, resulting in the image above.

import adsk.core, adsk.fusion, traceback

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Create a canvas on the base X-Y construction plane using the defaults.
        imageFilename = 'C:/Temp/500x500.png'
        canvasInput = root.canvases.createInput(imageFilename, root.xYConstructionPlane)
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

A vector defines a direction and magnitude in space. In this case, the X vector is (1, 0), which specifies going one unit in the X direction and zero units in the Y direction. The second column defines a vector going zero units in the X direction and one unit in the Y direction. The third column defines the position of the coordinate system. In this case, it is zero units in the X and zero units in the Y, so the coordinate system is at the origin of the base coordinate system. A coordinate system sitting at the origin whose X-axis is in the X direction and its Y-axis is in the Y direction is the same as the base coordinate system, making this an identity matrix. That's why only the red arrows are shown because they lie directly on the green arrows.

Below is an example using other values for the matrix and the resulting coordinate system. In this example, the third column has been modified to change the position of the coordinate system. It specifies that the origin of the coordinate system should now be at (3,2).

Canvas on Construction Plane

Here's a more complicated matrix that defines a rotated coordinate system. The position is still the same as above at (3, 2), but it's rotated 45 deg. The X direction vector is (0.707, 0.707), and the Y direction vector is (-0.707, 0.707). The valid values are calculated using cos(45) and sin(45). The length of both the X and Y vectors is 1.0, but we'll look at this in more detail below when we discuss scaling.

Canvas on Construction Plane

Notice that the X and Y axes vectors have always been at right angles (perpendicular) to each other. When calculating these vectors, you should ensure they are perpendicular; otherwise, the image can become skewed. Below is an example of a matrix and the resulting skewed coordinate system where the original image used is also shown. Remember, this is all on a single 2D plane.

Canvas on Construction Plane

The code below was used to create the skewed canvas. This code also demonstrates some other capabilities of the API when working with points, vectors, and matrices. It creates a point and two vectors that define the desired origin and directions of the X and Y axes. It then used the point and vectors to modify the matrix, defining a coordinate system with the desired position and orientation. Notice that the X direction is defined as (1, 0), but the Y direction is defined as (0.707, 0.707). The X vector is one unit long in the X direction, and the Y vector is one unit long, going 45 deg in the positive X and Y directions. You can see this in the image above, where the X arrow is in the X direction, and the Y direction is angled up and to the right.

import adsk.core, adsk.fusion, traceback

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        # Have face or construction plane selected.
        planeSel = ui.selectEntity('Select a planar face or construction plane',
                                   'PlanarFaces,ConstructionPlanes')

        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Define the origin and X and Y direction vectors and
        # use Matrix2D.setWithCoordinateSystem to set the matrix.
        origin = adsk.core.Point2D.create(5, 3)
        xDir = adsk.core.Vector2D.create(1, 0)
        yDir = adsk.core.Vector2D.create(0.707, 0.707)
        matrix = adsk.core.Matrix2D.create()
        matrix.setWithCoordinateSystem(origin, xDir, yDir)

        # Create the canvas
        canvasInput = root.canvases.createInput('C:/Temp/SquareCoords.png', planeSel.entity)
        canvasInput.transform = matrix
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Flipping

When placing a Canvas interactively, the dialog supports an option to flip the image vertically or horizontally. The API also supports flipping using the flipHorizontal and flipVertical methods on the CanvasInput and Canvas objects. However, these methods exist for convenience and are optional. They flip the direction of the matrix's X (Horizontal) or Y (Vertical) axis. The code below illustrates modifying the matrix to flip horizontally. Remember that the first column of the matrix defines the X-axis.

canvasInput = root.canvases.createInput('C:/Temp/Sample.png', planeSel.entity)
# Get the matrix from the CanvasInput
matrix = canvasInput.transform

# Negate the components of the X vector.
matrix.setCell(0, 0, -matrix.getCell(0, 0))
matrix.setCell(1, 0, -matrix.getCell(1, 0))

# Assign the modified matrix back to the CanvasInput.
canvasInput.transform = matrix

Scaling

Below is an example of three canvases placed on the same size faces using the API and an identity matrix. Notice how they're all square, even though the only square image is the 500x500 image. They're also all 1 cm in size.

Canvas Scale with Identity Matrix

Below is the result of creating canvases using the same images as above, but this time, the transformation matrix of the CanvasInput object is not changed. It is left to the default value, which maintains the original image's aspect ratio. The canvas size is dependent on the size of the planar entity it was placed on.

Canvas Default Scale

Why are the first set of images all square and 1 cm square? It's because that's what the matrix we're using defines. It uses an identity matrix that specifies that the X axis of the coordinate system is in the X direction and has a length of 1 unit, and the Y axis is in the Y direction and has a length of 1 unit. The length of the vectors defines the size of the created canvas. Unless the image is square, the lengths of the X and Y axes should be different to account for the difference in the width and height of the image. This difference is referred to as the aspect ratio. It is commonly expressed using two numbers separated by a colon, such as 16:9, and can be expressed as a single number by dividing the height by the width, so 16:9 will be 1.7777.

You need to know the aspect ratio if you want to provide the matrix to specify the size and positioning of the canvas and maintain the correct width-to-height ratio. The image size can be read from the file either interactively by looking at the properties of the image, or programming components can be used in a program to read this information. However, there is a more straightforward way to take advantage of Fusion to get the aspect ratio. In the second example above illustrating scaling, the canvases maintain the correct aspect ratio. When you create a CanvasInput, the default matrix considers the aspect ratio, and you can use this to get the aspect ratio. The code below creates a canvas with an arbitrary image that is 20 cm wide, and the height is whatever is needed to maintain the correct aspect ratio.

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        # Have face or construction plane selected.
        planeSel = ui.selectEntity('Select a planar face or construction plane', 'PlanarFaces,ConstructionPlanes')

        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Create the canvas input.
        canvasInput = root.canvases.createInput('C:/temp/SpurGear.png', planeSel.entity)

        # Get the coordinate system defined by the default matrix of the CanvasInput.
        defMatrix = canvasInput.transform
        (origin, xDir, yDir) = defMatrix.getAsCoordinateSystem()
        aspectRatio = xDir.length / yDir.length

        # Define the width as 20 cm..
        canvasWidth = 20

        # Define a matrix to create a canvas using the specified
        # size and maintain the images aspect ratio.
        xDir = adsk.core.Vector2D.create(canvasWidth, 0)
        yDir = adsk.core.Vector2D.create(0,canvasWidth / aspectRatio)
        matrix = adsk.core.Matrix2D.create()
        matrix.setWithCoordinateSystem(origin, xDir, yDir)

        # Set the matrix of the CanvasInput and create the canvas.
        canvasInput.transform = matrix
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Resolution

The concept of image resolution was discussed earlier, but now we can look at how to use the resolution information to create a canvas that is the correct size in Fusion. If you've used a scanner to scan a full scale drawing you want to sketch over, you can use the resolution to create a full-scale canvas. You typically specify the desired resolution when using the scanner, for example, 300 dpi. Depending on the scanning software, that information is usually written into the created image file, and you can view it by looking at the properties of the image file, as shown below, where we see both the size in pixels and the resolution.

The code below uses this information to create a correctly scaled canvas.

import adsk.core, adsk.fusion, traceback

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Define the image information.
        pixelWidth = 3276
        pixelHeight = 2526
        resolution = 300
        imageFilename = 'C:/Temp/CradleSide.tif'

        # Compute the width and height in centimeters.
        width = (pixelWidth / resolution) * 2.54
        height = (pixelHeight / resolution) * 2.54

        # Define the components of the coordinate system and create a matrix.
        xVec = adsk.core.Vector2D.create(width, 0)
        #xVec.scaleBy(-1)
        yVec = adsk.core.Vector2D.create(0, height)
        origin = adsk.core.Point2D.create(0, 0)
        matrix = adsk.core.Matrix2D.create()
        matrix.setWithCoordinateSystem(origin, xVec, yVec)

        # Create the canvas.
        canvasInput = root.canvases.createInput(imageFilename, root.xYConstructionPlane)
        canvasInput.transform = matrix
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

We saw earlier how we could compute the aspect ratio using information from the CanvasInput object. However, the width, height, and resolution are not available. The sample above uses the data retrieved from the properties dialog and hard-codes it into the program. That's not practical for a general-purpose program; you need a programming component to read this information from the image file. For Python, there is a component called Pillow, which is a wrapper over PIL (Python Image Library). The example below illustrates using it to get the width, height, and resolution from a selected image file and then uses that to create a canvas of the correct size.

import adsk.core, adsk.fusion, adsk.cam, traceback
from .library.PIL import Image

app = adsk.core.Application.get()
ui  = app.userInterface

def run(context):
    try:
        des: adsk.fusion.Design = app.activeProduct
        root = des.rootComponent

        # Have an image file selected.
        fileDlg = ui.createFileDialog()
        fileDlg.title = 'Choose Image File'
        fileDlg.filter = '*.png;*.tiff;*.tif;*.jpg;*.jpeg;*.bmp'
        dlgResult = fileDlg.showOpen()
        if dlgResult != adsk.core.DialogResults.DialogOK:
            return
        imgFilename = fileDlg.filename

        # Use Pillow to read the width, height, and resolution.
        img: Image.Image
        with Image.open(imgFilename, mode='r') as img:
            widthPixels = img.width
            heightPixels = img.height
            imgInfo: dict = img.info

        # Get the resolution from the info information.
        if 'dpi' in imgInfo:
            resolution = round(img.info['dpi'][0])
        else:
            # The resolution isn't defined, so ask the user.
            (val, isOk) = ui.inputBox('Specify the image resolution', 'Resolution Not Defined', 100)
            if not isOk:
                return
            else:
                resolution = int(val)

        # Compute the width and height in centimeters.
        widthCm = (widthPixels / resolution) * 2.54
        heightCm = (heightPixels / resolution) * 2.54

        # Define the components of the coordinate system and create a matrix.
        xVec = adsk.core.Vector2D.create(widthCm, 0)
        yVec = adsk.core.Vector2D.create(0, heightCm)
        origin = adsk.core.Point2D.create(0, 0)
        matrix = adsk.core.Matrix2D.create()
        matrix.setWithCoordinateSystem(origin, xVec, yVec)

        # Create the canvas.
        canvasInput = root.canvases.createInput(imgFilename, root.xYConstructionPlane)
        canvasInput.transform = matrix
        canvas = root.canvases.add(canvasInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Pillow is an independent Python component that can be installed into your script or add-in folder and used from there. Installing it in the system folder is unnecessary, as it can cause conflicts with other installed components. Here are the steps to use it.

  1. Install a standalone version of Python on your computer. Fusion has its own copy of Python but doesn't include all the utilities that come with a standard installation, including PIP, which we need. It's best to install the same version that Fusion uses to ensure compatibility with Fusion. You can determine this by entering the following in the TEXT COMMAND window with the "Py" option enabled on the right-hand side of the window.

    sys.version

    Python can be installed from the Python Downloads page.

  2. Using a Command or Terminal window, change your active directory to your script or add-in folder.

  3. In the command or terminal window, run the following command line. This installs Pillow into the "library" folder of the current working directory.

    pip install --target=.\library Pillow

  4. You can now reference and use the Pillow library, as shown in the sample above.

Understanding the Plane's Coordinate System

Canvases are always placed on a plane, either a construction plane or a planar face. The plane defines the base coordinate system the canvas will be positioned relative to. To position a canvas precisely, you need to know about the coordinate system you're placing it relative to. Getting information about the plane's coordinate system is possible using the API. There are two different cases you need to be able to handle to get the correct coordinate system: construction planes and planar faces.

The coordinate system of a construction plane can be determined by using its geometry property to get a Plane object. The returned Plane object has a parametric space, and the origin is at (0, 0), the X (or U) direction is always (1, 0), and the Y (or V) direction is always (0, 1) relative to the 2D space of the Plane. Depending on how the construction plane is created, sometimes the origin is at the lower-left corner and sometimes at the center of the graphics drawn to represent the construction plane. The returned Plane object provides the correct information regardless of what's displayed.

For a BRepFace, how the plane's coordinate system is determined is more complex. Like a construction plane, a face also has a 2D parametric space. When a canvas is placed, the center of the face's parametric space is used as the origin, the U direction as X, and the V direction as Y. The Python function below illustrates how the coordinate systems are calculated. The function takes either a planar BRepFace or a ConstructionPlane object as input and returns the plane's coordinate system origin and X and Y directions.

# Given either a planar face or a construction plane, this returns the coordinate
# system used when creating a canvas. The values returned are 2D coordinates within
# the 2D coordinate system of the parametric space of the face or construction plane.
# The matrix that defines the placement of the canvas is also based on the same 2D space.
def GetPlaneCoordinateSystem(planarEnt) -> tuple[adsk.core.Point2D, adsk.core.Vector2D, adsk.core.Vector2D]:
    if isinstance(planarEnt, adsk.fusion.BRepFace):
        # Process the face.
        face: adsk.fusion.BRepFace = planarEnt
        eval = face.evaluator

        # Get the center of the parametric bounds.
        bounds = eval.parametricRange()
        uvCenter = adsk.core.Point2D.create((bounds.minPoint.x + bounds.maxPoint.x)/2, (bounds.minPoint.y + bounds.maxPoint.y)/2)

        # Create points in the X and Y directions and use them to create vectors to return.
        # It may need to be flipped if the face's plane has reversed parameterization.
        uvX = uvCenter.copy()
        if face.isParamReversed:
            uvX.x -= 1
        else:
            uvX.x += 1
        xDir = uvCenter.vectorTo(uvX)

        uvY = uvCenter.copy()
        uvY.y += 1
        yDir = uvCenter.vectorTo(uvY)
        return((uvCenter, xDir, yDir))
    elif isinstance(planarEnt, adsk.fusion.ConstructionPlane):
        # Process the construction plane.
        constPlane: adsk.fusion.ConstructionPlane = planarEnt

        # This hard-codes the origin and X and Y directions because
        # they're always the same, which is at the origin and in the
        # U and V directions of the plane.
        uvCenter = adsk.core.Point2D.create(0, 0)
        xDir = adsk.core.Vector2D.create(1, 0)
        yDir = adsk.core.Vector2D.create(0, 1)
        return((uvCenter, xDir, yDir))
    else:
        return None


Command Inputs

  • AngleValueCommandInput
  • BoolValueCommandInput
  • BrowserCommandInput
  • ButtonRowCommandInput
  • DirectionCommandInput
  • DistanceValueCommandInput
  • DropDownCommandInput
  • FloatSliderCommandInput and FloatSliderListCommandInput
  • FloatSpinnerCommandInput
  • GroupCommandInput
  • ImageCommandInput
  • IntegerSliderCommandInput and IntegerSliderListCommandInput
  • IntegerSpinnerCommandInput
  • RadioButtonGroupCommandInput
  • SelectionCommandInput
  • StringValueCommandInput
  • TabCommandInput
  • TableCommandInput
  • TextBoxCommandInput
  • TriadCommandInput
  • 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, you can gather the input in other ways. For example, a message box can get a yes/no answer to a question, but most commands need to get several user inputs before performing whatever actions they do. An important part of Fusion's command machinery is support for getting various types of input from the user. Examples of this can be seen in almost all of Fusion'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 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 supports many different types of command inputs, and the API currently supports a subset 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 displays as a widget in the graphics window that the user can drag to set the value. Fusion's commands commonly use this specific command input. For example, it is used to specify the taper angle of an extrusion or the sweep angle of a revolve feature.

Command inputs that also have associated graphical widgets are usually first set to be invisible or disabled. Then once enough information has been gathered to define their position and orientation in space, their isVisible or isEnabled properties are toggled to make them visible. Making them invisible or disabled also hides the associated graphical widget.

BoolValueCommandInput

A BoolValueCommandInput is used to get a True or False response from the user. You can create four different visual styles depending on the arguments specified when the command input is created. The four styles are shown below; a check box, a button with an icon that changes states between pressed and unpressed, a button with an icon that doesn't change states but can be clicked, and a button with text that doesn't change states but can be clicked. The fifth example below is the same as the fourth except the isFullWidth property has been set to True, which turns off the text to the left and only leaves the button, centered on the dialog.

Here are the values of the arguments in the addBoolValueInput method to achieve the different results shown above.

Type | isCheckBox | resourceFolder
Checkbox | True | Empty String
Button with icon and states | True | folder containing the icon images
Click button with icon | False | folder containing the icon images
Click button with text | False | Empty String

BrowserCommandInput

A BrowsersCommandInput is used to render HTML as one of the inputs in a dialog. You can think of this like any other command input, but instead of a pre-defined widget, it is a placeholder for a browser that displays the contents of a specified HTML file. Because the content is defined using HTML, you're open to displaying anything you want.

The picture below is a simple example where two BrowserCommandInputs have been added to the command dialog. BrowserCommandInputs behave like other command inputs in that they are displayed in the same sequence they were created, and they have a name displayed on the left with the browser on the right. The first BrowserCommandInput looks very similar to a textbox command input but adds a button beside the text field.

The second BrowserCommandInput demonstrates creating a table that is difficult with standard command inputs. It is possible to use a TableCommandInput to display tabular data, but the TabCommandInput is used to arrange other command inputs, not to display data. With a BrowserCommandInput, a table is easily defined in HTML. Notice that in this case, it doesn't have a name to the left. All command input types can expand to the entire width of the dialog by setting their isFullWidth property to True.

Displaying HTML is useful, but it's more helpful if your add-in and the HTML can interact. For example, it is possible for your add-in to send data to the HTML and for the HTML to send data to your add-in. For more details about the BrowserCommandInput see the user manual topic on Palletes and Browser Inputs.

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'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 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 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 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</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</a></div>.'

TriadCommandInput

A TriadCommandInput is a triad in the graphics window that the user can manipulate to define its position and orientation. Using the triad, the user can define the position, rotation, scaling, and flipping along the various axes. In addition to the graphical triad, values are also shown in the command dialog for precise definition. The picture below shows an example of a triad created with the default settings, resulting in the available translation and rotation options—the creation of the single triad command input results in many associated controls being added to the dialog.

Because multiple controls are created in the dialog, a common practice is first to create a group command input and then create the triad input as a group member. Creating a group for the triad command input helps categorize the set of inputs associated with the triad and allows you or the user to collapse the group to simplify the dialog.

As mentioned earlier, the triad allows the user to specify moves, rotations and scaling along the different axes of the triad. Because different commands have different needs, you can fully customize which manipulators and associated controls are displayed in the dialog. For example, if you're doing something limited to 2D, you would turn off all Z-axis-related functionality. Below is an example where the translations in X, Y, and Z are available, along with scaling in each axis. Everything else has been turned off. In addition, the triad command input supports methods and properties that let you turn on and off the display of the various manipulators. Each type of manipulation has a property to turn them on and off individually. But, there are also some methods to turn them on and off as a group to simplify the task.

The triad's current position, orientation, and scaling are defined using a 3D matrix. The TriadCommandInput supports the transform property, which lets you get and set the current matrix associated with the triad. It also supports the positionTransform property, which is read-only and returns a simpler matrix that doesn't include any scaling. Finally, the lastTransform property returns the triad's matrix just before that last change. Comparing this matrix with the matrix returned by the transform property tells you what changed. Also, when the user manipulates the triad, either graphically or by editing the values in the dialog, the command's inputChanged event is fired. The lastChangeMade property of TriadCommandInput returns an enum value indicating the type of change made. For example, it will tell you that a translation in the X direction just occurred, and you can compare the two matrices to get the value of the change.

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 Commands

Creating Custom Fusion 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 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 is started and as part of the loading process they can add buttons for their commands into the Fusion 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 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 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 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 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 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 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 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 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 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 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 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 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 %lt; 0.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'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 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 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 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 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 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 data panel. An item gets added to the data panel each time a new Fusion 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 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.cast(app.activeProduct)
if not design:
    ui.messageBox('No active Fusion design', 'No Design')
    return

Components

A Fusion design can contain one or more components. Components contain the various types of Fusion geometry (i.e. solids, sketches, construction geometry, sculpt forms, etc.). Every Fusion 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 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.
rootComp = design.rootComponent

# Create a new sketch on the xy plane.
sketches = rootComp.sketches
sketch = sketches.add(rootComp.xYConstructionPlane)

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 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 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 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, any object that can be selected, can also act as a proxy. In the Fusion 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 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 which face to use.


Understanding Canvases in Fusion

Configurations

  • Overview
  • Creating/Editing a Configured Design
  • Configuration Theme Tables
  • Feature Aspects
  • Activating Rows in the Configured Design
  • Inserting a Configuration into an Assembly

Overview

This topic discusses the API functionality for the configuration capabilities in Fusion. Before using the API, you should use the configuration functionality through Fusion's user interface and become familiar with its various capabilities. This discussion will illustrate functionality in the user interface, describe the equivalent functionality in the API, and illustrate its use with some example code.

Below is a picture of a simple configuration table that controls two parameters, the suppression of a feature, the visibility of an occurrence, and the insertion of another configuration into this design. A configuration table is like any other table and consists of rows and columns. Each column defines a specific item that the configuration will control. In this case, the parameter values, the feature suppression, the occurrence visibility, and which row to use for the inserted configured part. Each row represents a specific configuration and defines its values.

Below is a portion of the Fusion API object model that provides access to this configuration table. This main configuration table is known as the “Top” table. It is represented in the API by the ConfigurationTopTable object, obtained using the configurationTopTable property of the Design object. You can use the Design.isConfiguredDesign property to determine if the current Design is a configuration.

Configuration Object Model

You can access the columns and rows from the top table. The object model shows several types of columns: parameter, suppression, visibility, property, insert, and theme columns. Each of these is described in more detail below.

A ConfigurationParameterColumn object defines which parameter is being controlled by the column, and it provides access to the cells that define the parameter value for each row. Like with standard Fusion parameters, the parameter's value can be obtained or set using either a string representing an expression or a Double value, the evaluated value in database units.

For example, for a parameter that is controlling a distance value, some valid expressions are “3”, “3 in”, “5 in / 2”, and “Length * 0.75”. The first one that just has a value uses the default design units, so if they’ve specified “mm” as the current design unit, it will be 3 mm, and if they’ve chosen inches, it will be 3 inches. The next one specifies units as part of the expression, so it will always be 3 inches regardless of the design units. The other two examples show that an expression can be an equation and include references to other parameters.

When getting the value, it is the evaluated result of the expression in database units. For example, for the expression “5 in / 2”, the value property will return 6.35. The internal length unit is centimeters, which is 2.5 inches converted to centimeters. Setting the parameter using the value property will automatically create an expression resulting in the specified value.

A ConfigurationSuppressColumn object defines which feature the column controls the suppression state for and provides access to the cells that define whether the feature should be suppressed for that row. The term “feature” is used loosely here and refers to anything that can be suppressed in the timeline, including features, sketches, construction geometry, joints, etc. The value of suppression cells is a Boolean, indicating if that feature should be suppressed when that row is active.

A ConfigurationVisibilityColumn object defines which entity the column controls the visibility for and provides access to the cells that define whether the entity should be visible for that row. The value of visibility cells is a Boolean, indicating if the entity should be visible when that row is active.

A ConfigurationInsertColumn object defines which row is used for a configuration inserted into the current Design and provides access to the cells that define which row to use. Each cell in the column specifies a specific row from the top table of the referenced configuration.

A ConfigurationPropertyColumn defines which property’s value is being controlled by the column, and it provides access to the cells that define the value to assign to the property when that row is active. Each cell contains the text that will be assigned to the property when that row is active.

A difference between the table shown in the user interface and the top table provided by the API is that properties are accessed from the top along with everything else. For the user interface, it was chosen to show the property columns in a separate tab. Having properties in a separate tab is an artificial separation, which the API doesn’t do. When iterating over the columns of the top table, the property columns will be the first columns returned. The remaining columns will be returned in the same order as in the CONFIGURATION TABLE dialog.

Below is a script that dumps out the contents of an existing table for the parameter, suppress, visibility, and property columns. It lists each column, showing its name and what it controls. It then lists the values for each row of the column. It writes this information to the TEXT COMMANDS window.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get the top configuration table from the design.
        des: adsk.fusion.Design = app.activeProduct
        topTable = des.configurationTopTable

        # Iterate through the columns, writing out info for each one.
        column: adsk.fusion.ConfigurationColumn = None
        columnCount = 0
        for column in topTable.columns:
            columnCount += 1
            if isinstance(column, adsk.fusion.ConfigurationParameterColumn):
                paramColumn: adsk.fusion.ConfigurationParameterColumn = column
                app.log(f'Column {columnCount} ({paramColumn.title}) is a Parameter column controlling "{paramColumn.parameter.name}"')

                for i in range(topTable.rows.count):
                    paramCell = paramColumn.getCell(i)
                    app.log(f'   Expression from row {i+1} is "{paramCell.expression}"')
            elif isinstance(column, adsk.fusion.ConfigurationPropertyColumn):
                propColumn: adsk.fusion.ConfigurationPropertyColumn = column
                app.log(f'Column {columnCount} ({propColumn.title}) is a Property column controlling "{propColumn.parentProperty.name}"')

                for i in range(topTable.rows.count):
                    propCell = propColumn.getCell(i)
                    app.log(f'   Value from row {i+1} is "{propCell.value}"')
            elif isinstance(column, adsk.fusion.ConfigurationSuppressColumn):
                suppressColumn: adsk.fusion.ConfigurationSuppressColumn = column
                app.log(f'Column {columnCount} ({suppressColumn.title}) is a Suppress column controlling "{suppressColumn.feature.name}"')

                for i in range(topTable.rows.count):
                    supressCell = suppressColumn.getCell(i)
                    app.log(f'   Value from row {i+1} is {supressCell.isSuppressed}')
            elif isinstance(column, adsk.fusion.ConfigurationVisibilityColumn):
                visibilityColumn: adsk.fusion.ConfigurationVisibilityColumn = column
                app.log(f'Column {columnCount} ({visibilityColumn.title}) is a Visibility column controlling "{visibilityColumn.entity.name}"')

                for i in range(topTable.rows.count):
                    visibleCell = visibilityColumn.getCell(i)
                    app.log(f'   Value from row {i+1} is {visibleCell.isVisible}')
            elif isinstance(column, adsk.fusion.ConfigurationInsertColumn):
                insertColumn: adsk.fusion.ConfigurationInsertColumn = column
                app.log(f'Column {columnCount} ({insertColumn.title}) is an Insert column controlling "{insertColumn.occurrence.name}"')

                for i in range(topTable.rows.count):
                    insertCell = insertColumn.getCell(i)
                    app.log(f'   Value from row {i+1} is "{insertCell.row.name}"')
            else:
                app.log( f'Other type of column found: {column.objectType}')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

For the configuration table shown above, the following results are displayed in the TEXT COMMANDS window.

Column 1 (Part Number) is a Property column controlling "Part Number"
    Value from row 1 is "5x10S"
    Value from row 2 is "4x8"
    Value from row 3 is "5x5S"
    Value from row 4 is "5x5"
 Column 2 (Description) is a Property column controlling "Description"
    Value from row 1 is "5 x 10 Box with Slot"
    Value from row 2 is "4 x 8 Box"
    Value from row 3 is "5 x 5 Box with Slot"
    Value from row 4 is "5 x 5 Box"
 Column 3 (Width) is a Parameter column controlling "Width"
    Expression from row 1 is "5 in"
    Expression from row 2 is "4 in"
    Expression from row 3 is "5 in"
    Expression from row 4 is "5 in"
 Column 4 (Length) is a Parameter column controlling "Length"
    Expression from row 1 is "10 in"
    Expression from row 2 is "8 in"
    Expression from row 3 is "5 in"
    Expression from row 4 is "5 in"
 Column 5 (Slot) is a Suppress column controlling "Slot"
    Value from row 1 is False
    Value from row 2 is True
    Value from row 3 is False
    Value from row 4 is True
 Column 6 (Base v1:1) is a Visibility column controlling "Base v1:1"
    Value from row 1 is True
    Value from row 2 is False
    Value from row 3 is True
    Value from row 4 is False
 Column 7 (Cube:1 (Configured Component Insert)) is an Insert column controlling "X Small v1:1"
    Value from row 1 is "X Small"
    Value from row 2 is "Medium"
    Value from row 3 is "Large"
    Value from row 4 is "XX Large"

Creating/Editing a Configured Design

Using the API, you can convert a design into a configured design. This requires creating the initial configuration table, adding columns for the items you want to control, adding rows for the number of configurations required, and setting the values of the cells to get the expected results.

Changing a design into a configured design is done using the createConfiguredDesign method of the Design object. This returns the ConfigurationTopTable object that was created. When you first create a configured design, columns are automatically created for the “Component Name”, “Part Number”, and “Description” properties, and one row is created with a default name. You can add columns and rows and edit the cells to have the desired values.

The sample code below converts the current design and adds a new parameter, suppression, visibility, and insert columns. When adding a parameter column, specify which parameter the column will control. The code below gets the parameter named “Length” and uses that when creating the column. The suppression column needs to know which “feature” will be suppressed. In this case, it gets the feature named “Fillet1” and uses it to create the column. The visibility column needs to know what entity to control the visibility for. This gets the sketch named “Sketch1” and uses it to create the column. The insert column needs to know the occurrence of an inserted configuration. This example uses the first occurrence in the Occurrences collection to create the column

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get the active design.
        des: adsk.fusion.Design = app.activeProduct

        # Convert this design into a configured design.
        # The first row is created automatically, and the columns for
        # properties are also automatically created.
        topTable = des.createConfiguredDesign()

        # Add a new parameter column for the parameter "Length".
        param = des.allParameters.itemByName('Length')
        lengthColumn = topTable.columns.addParameterColumn(param)

        # Add a new suppress column to suppress a feature.
        feature = des.rootComponent.features.itemByName('Fillet1')
        suppressColumn = topTable.columns.addSuppressColumn(feature)

        # Add a new visibility column to show/hide a sketch.
        entity = des.rootComponent.sketches.itemByName('Sketch1')
        visibleColumn = topTable.columns.addVisibilityColumn(entity)

        # Add a new insert component column.
        configOcc = des.rootComponent.occurrences[0]
        insertColumn = topTable.columns.addInsertColumn(configOcc)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Here is the table that results after running the code above. Remember that the first row is automatically created when the table is created. As you add columns, the columns' cells are also automatically created with default values, which are the current values of whatever the column controls. In this case, the Length parameter has an expression of “3 in”, the Fillet1 feature is not suppressed, the sketch Sketch1 is not visible, and the inserted configuration uses the " Medium " configuration.

Create Configuration Table

The example code below edits the name of the first row because it was assigned a default name when the row was automatically created when the table was created. It adds two rows and specifies their names as part of their creation. Like before, all the cells are automatically created and populated with default values.

        # Rename the first row.
        row1 = topTable.rows.item(0)
        row1.name = ‘My Row 1’

        # Add two more rows.
        row2 = topTable.rows.add(‘My Row 2’)
        row3 = topTable.rows.add(‘My Row 3’)

Here is the top table after changing the name of the first row and adding two other rows.

Create Configuration Table Edit

Now, we need to change the cell values to the desired values. Once you’ve created the tables and rows, it becomes a series of edit operations to modify the cells to the desired values. The code below does that for the cells in the parameter, suppressed, and visibility columns.

        # Set the values in the three rows for the parameter column.
        lengthColumn.getCellByRowName('My Row 1').expression = '4 in'
        lengthColumn.getCellByRowName('My Row 2').expression = '6 in'
        lengthColumn.getCellByRowName('My Row 3').expression = '8 in'

        # Set the values in the three rows for the suppress column.
        suppressColumn.getCellByRowName('My Row 1').isSuppressed = False
        suppressColumn.getCellByRowName('My Row 2').isSuppressed = True
        suppressColumn.getCellByRowName('My Row 3').isSuppressed = False

        # Set the values in the three rows for the suppress column.
        visibleColumn.getCellByRowName('My Row 1').isVisible = True
        visibleColumn.getCellByRowName('My Row 2').isVisible = False
        visibleColumn.getCellByRowName('My Row 3').isVisible = True

There are several ways to get a specific cell. This example does it by getting the cell within the column in the row with the specified name. This produces the most readable code, but you can also use the getCell method, which takes the row index, or getCellByRowId, which uses the unique ID of the row. This gets the cells from the column, but you can also access cells from a row. For example, the code below gets the cell in the first row for the parameter column.

       row1.getCellByColumnIndex(lengthColumn.index).expression = '4 in'

It doesn’t matter how you get the cell; the different methods are provided to make it convenient depending on what information you already have. Below is the result after running the code above. Where you can see the values of the parameter, suppress, and visibility columns have been modified.

After Configuration Table Edit

Setting the cell values for the insert columns is more complicated because when setting the value of an insert cell, you need to provide a row from the table of the configured design that’s been inserted. Let’s look at this in more detail to see what’s going on. Below is the table of a configured design that has size rows that define different sizes for the parameter called “CubeSize”. In our example, an instance of this configured design has been inserted into the other design we’re now configuring by defining the table.

After Configuration Table Edit 2

Here’s the table of the design we’re now configuring. The last column controls the inserted configuration. Each row currently has a default value of “Medium”, which means the rows are using the row from the other configuration called “Medium”. We want to modify those cells to use different rows. To do that we need to get the ConfigurationRow object for the row we want to use, but that row exists in a different design.

After Configuration Table Edit 2

The code below gets the ConfigurationTopTable from the configured design that’s been inserted into the current design. The first thing it does is get the occurrence in the current design that is being controlled by the insert column. It then calls the configuredDataFile property on the Occurrence object. This returns the DataFile that represents the other configured design. A DataFile is an API object that represents a file in the cloud. The “Data” portion of the API lets you traverse your projects and folders to find specific files on the cloud. With this DataFile, you can call its configurationTable property to get the ConfigurationTopTable of that design.

        configOcc = insertColumn.occurrence
        configDesignDataFile = configOcc.configuredDataFile
        refTopTable: adsk.fusion.ConfigurationTopTable = configDesignDataFile.configurationTable

Because the DataFile represents a design that’s on the cloud and not open in Fusion, the table that’s returned operates in a limited way. For example, you can’t modify it in any way, but it does support query capabilities which is all we need to find a specific row. The code below uses the itemByName property of the ConfigurationRows object to get a specific row. It then assigns that row to the cell that will control which configuration should be used for that row.

        smallRow = refTopTable.rows.itemByName('Small')
        insertColumn.getCellByRowName('My Row 1').row = smallRow

        xLargeRow = refTopTable.rows.itemByName('X Large')
        insertColumn.getCellByRowName('My Row 2').row = xLargeRow

        mediumRow = refTopTable.rows.itemByName('Medium')
        insertColumn.getCellByRowName('My Row 3').row = mediumRow

After running this code, we now have the table shown below. You can see the different cell values in the last column now.

Insert Column Edit

Configuration Theme Tables

The example configuration table above is simple but demonstrates commonly used functionality: parameters, suppression, visibility, properties, and component insertion. However, Fusion configurations also support some more complex capabilities, which are also supported by the API. These capabilities result in additional tables being created that are referenced from the top table. These are referred to as “theme” tables.

There are five types of theme tables: ConfigurationCustomThemeTable, ConfigurationAppearanceTable, ConfigurationMaterialTable, ConfigurationSheetMetalRuleTable, and ConfigurationPlasticRuleTable. When any of these types of tables are created, a new ConfigurationThemeColumn is added to the top table. This column references the new theme table, and each row in the column specifies which row in the theme table to use when that row is active.

A custom theme table allows you to have a set of columns within a sub table and then reference rows of the sub table within the top table. The picture below shows the user interface where a parameter, suppression, visibility, and insert column have been moved to a custom theme table. As a result, a new ConfigurationThemeColumn has been created in the top table.

Configuration Theme Table

The object model diagram below is expanded to show the objects that support the custom theme table capabilities. The top table provides access to the ConfigurationThemeColumn objects in the top table. In the example above, the theme table column provides access to the referenced ConfigurationCustomThemeTable and the cells in the top table that define which row in the theme table to use for each configuration. Any number of custom theme tables can be created.

Configuration Theme Object Model

The code below demonstrates the creation of the custom theme table shown in the picture above. This is done by adding a new custom theme table and specifying the columns you want to move into the new table.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get the active design.
        des: adsk.fusion.Design = app.activeProduct

        # Get the top table.
        topTable = des.configurationTopTable

        # Get the columns that will be moved into a custom theme table.
        columns = []
        for column in topTable.columns:
            if 'Length' in column.title:
                columns.append(column)
            elif 'Fillet1' in column.title:
                columns.append(column)
            elif 'Sketch1' in column.title:
                columns.append(column)
            elif 'Cube:1' in column.title:
                columns.append(column)

        # Create the new custom table.
        customTable = topTable.customThemeTables.add(columns)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Here is the resulting configuration table.

Configuration Theme Table

A custom theme table is similar in functionality to a top table. You can use the same code, as previously discussed, to add new columns and rows and edit the values of cells. The main limitation of custom theme tables is that they never contain references to other theme tables. It’s only the top table that references theme tables.

The other four types of theme tables are like each other in that they only contain information specific to that type of table and there is only one table of that type for a design. For example, a material theme table only contains material columns and there is only one material table for a design. Below, is an example of a configuration that contains a material table. When you create a material or appearance table, a column to control the material or appearance of the root component is automatically added and the column you add will always be the second column.

Below is an example of a material column to control the material assigned to a body. Like a top table, the first row in all theme tables is automatically created with the current values in the design as the cell values. A second row has been added with a different material assigned to it.

       # Add a material column to the material table. If this is the
        # first material defined in the configuration, this will cause
        # the material table to be visible in the CONFIGURATION TABLE
        # dialog.
        body = des.rootComponent.bRepBodies.itemByName('Body1')
        materialColumn1 = topTable.materialTable.columns.add(body)

        # Edit the name of the first row in the material table.
        materialTable = topTable.materialTable
        materialTable.rows[0].name = 'Default'

        # Add a second row.
        materialRow = materialTable.rows.add('Gold')

        # Change the values of the cells on the second row to use the "Gold" material.
        goldMaterial = app.materialLibraries.itemByName('Fusion Material Library').materials.itemByName('Gold')

        matCell: adsk.fusion.ConfigurationMaterialCell = materialRow.getCellByColumnIndex(0)
        matCell.material = goldMaterial
        matCell = materialRow.getCellByColumnIndex(1)
        matCell.material = goldMaterial

        # Get the material column in the top table and edit cell values.
        materialThemeColumn = materialTable.parentTableColumn
        themeCell = materialThemeColumn.getCell(0)
        themeCell.referencedTableRow = materialTable.rows[1]

        themeCell = materialThemeColumn.getCell(1)
        themeCell.referencedTableRow = materialTable.rows[0]

        themeCell = materialThemeColumn.getCell(2)
        themeCell.referencedTableRow = materialTable.rows[1]

Here is the resulting configuration table.

Configuration Theme Table

As mentioned earlier, besides custom theme tables, there are four other types of theme tables that a ConfigurationThemeColumn in the top table can reference. These are ConfigurationAppearanceTable, ConfigurationMaterialTable, ConfigurationSheetMetalRuleTable, and ConfigurationPlasticRuleTable. There are two critical differences between a custom theme table and the other types of theme tables. A custom theme table can contain several different types of columns, and there can be any number of custom theme tables. The other four tables only contain one type of column, and only one table of each type can exist. For example, there is only one ConfigurationAppearanceTable, which only contains appearance information. You can use it to control the appearance assigned to components and bodies.

Feature Aspects

Feature aspects are another thing that you can control through a configuration. They let you control specific aspects of certain types of features. For example, you can define the thread information for features with a thread and control the snap locations and alignment settings associated with a joint. Each aspect is added as a new column to the configuration table, where you can set their value for each row.

You can fully control a thread through a configuration. If you interactively create a thread using the Thread command, you'll see there are several things you need to specify: type, size, designation, and class. All the other aspects of a thread (size, designation, and class) must also be defined when defining the thread type. You can let the feature define the type so no column is created for it, but then the size, designation, and class must be defined. If you let the feature define the type and size, then the designation and class columns must be defined. Finally, if you let the feature define the type, size, and designation, then only the class needs to be defined. The addThreadTypeColumns method can be used to create the required columns.

The code below demonstrates feature aspects for threads. To use it, create a new design that contains a single thread feature approximately 1 inch in diameter. The code will convert the design into a configured design and then add columns to the table to control whether the thread is modeled and provide the full thread definition. It then creates a second row in the table and populates the cells of the first and second rows with valid data.

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        des: adsk.fusion.Design = app.activeProduct

        # Get the first thread feature in the design.
        threadFeat = des.rootComponent.features.threadFeatures[0]

        # Convert the design to a configured design.
        configTable = des.createConfiguredDesign()

        # Add a new column to control if the thread is modeled or not.
        modeledColumn = configTable.columns.addFeatureAspectColumn(threadFeat, adsk.fusion.ConfigurationFeatureAspectTypes.ThreadModeledFeatureAspectType)

        # Add a new column to control the thread.
        threadColumns = configTable.columns.addThreadTypeColumns(threadFeat, adsk.fusion.ConfigurationThreadColumns.ThreadType_Size_Designation_ClassColumns)

        # Create a second row.
        row2 = configTable.rows.add('')

        # Modify the cells of the two rows to define if the thread is modeled.
        modeledCell: adsk.fusion.ConfigurationFeatureAspectBooleanCell = modeledColumn.getCell(0)
        modeledCell.value = False
        modeledCell: adsk.fusion.ConfigurationFeatureAspectBooleanCell = modeledColumn.getCell(1)
        modeledCell.value = True

        # Modify the cells of the two rows to define the desired threads. This takes advantage of the fact
        # that the array returned by addThreadTypeColumns is in type, size, designation, and class order.
        rowIndex = 0
        typeCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[0].getCell(rowIndex)
        typeCell.value = 'ACME Screw Threads'
        sizeCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[1].getCell(rowIndex)
        sizeCell.value = '1 1/8'
        designationCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[2].getCell(rowIndex)
        designationCell.value = '1.1250'
        classCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[3].getCell(rowIndex)
        classCell.value = '3G'

        rowIndex = 1
        typeCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[0].getCell(rowIndex)
        typeCell.value = 'ISO Metric profile'
        sizeCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[1].getCell(rowIndex)
        sizeCell.value = '25.0'
        designationCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[2].getCell(rowIndex)
        designationCell.value = 'M25x2'
        classCell: adsk.fusion.ConfigurationFeatureAspectStringCell = threadColumns[3].getCell(rowIndex)
        classCell.value = '6g'
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Thread information is defined using strings and validated as the cell values are set. It can be difficult to know what the valid values are. The code below can be used to determine valid values for a specific thread. Manually create a thread feature with the thread you want to configure, and then run the script below. It will write the needed values to the TEXT COMMAND window for that specific thread.

run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Have a thread feature selected.
        feature = ui.selectEntity('Select a thread feature.', adsk.core.SelectionFilters.Features).entity
        if feature.objectType != adsk.fusion.ThreadFeature.classType():
            ui.messageBox('A thread feature must be selected.')
            return

        threadFeat: adsk.fusion.ThreadFeature = feature

        # Display the information that defines the selected thread.
        app.log(f'Thread Information for {threadFeat.name}')
        app.log(f'    Thread Type: "{threadFeat.threadInfo.threadType}"')
        app.log(f'    Thread Size: "{threadFeat.threadInfo.threadSize}"')
        app.log(f'    Thread Designation: "{threadFeat.threadInfo.threadDesignation}"')
        app.log(f'    Thread Class: "{threadFeat.threadInfo.threadClass}"')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Activating Rows in the Configured Design

The script above is only reading data from the table. However, reading information from an existing table is also helpful. Once a table exists, the most common need is to identify a specific row from the table to either activate that row in the design or place the configuration of that row into another design.

To activate a row in the top table, get the ConfigurationRow object and call the activate method. Knowing the name of the row you want to activate is common. Activating a known row is demonstrated in the code below, where it gets the row named “Size 3” and activates it.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        des: adsk.fusion.Design = app.activeProduct
        topTable = des.configurationTopTable

        row = topTable.rows.itemByName('Size 3')
        row.activate()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Activating a row is the same as choosing the active configuration in the browser.

Configuration Theme Object Model

Many items in the configuration object model have a name, and they also have an ID. Names are typically more straightforward to use and make your code more readable. However, the user can modify the name, so it may not be reliable. An ID is a string that uniquely identifies the object and can be used to access it using the itemById method. They’re not as easy to use because they’re a string that doesn’t indicate what it is. For example, here’s the ID for a table row: 0cee2327-8ac6-44a5-aae0-e7d76b716d05. Fusion automatically assigns ID’s and they will never change, so they are a reliable way of finding a specific object. Both are available, and you can decide what will work best for you depending.

Inserting a Configuration into an Assembly

The other functionality that might be considered an edit or write operation supported in the current release is inserting a configuration into an assembly. To place a configuration, specify which top table row in the configured design you want to use. We’ve seen above how you can access the table of an open configured design and find a specific row. However, the configured design will not typically be open when inserting a configuration in an assembly.

The API provides access to your files on the cloud through the Data object. DataHub, DataProject, DataFolder, and DataFile objects let you traverse your files on the cloud. The DataFile has some new configuration-related functionality. The isConfiguredDesign property tells you if the file is a configured design or not. The isConfiguration property also tells you if this design is a configuration, which is the file Fusion creates that represents a specific row in the table. If the isConfiguredDesign property returns true, you can use the configurationTable property to get the ConfigurationTopTable object from the design. Because the configured design is not open in Fusion, there are some limitations to what you can do with the table, but most of the query functionality works to find a specific row. You need a ConfigurationRow object to add an occurrence representing that configuration into an assembly.

The script's results are below. It prompts you to select a configured design and places an instance of each configuration into an assembly, laying them out into a column-row structure.

Configuration Theme Object Model

Below is the code that creates the assembly above. Because it’s using the DataFile object, the configured design does not need to be open in Fusion.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Have the configured design selected.
        fileDialog = ui.createCloudFileDialog()
        fileDialog.isMultiSelectEnabled = False
        fileDialog.title = 'Select the Configured Design'

        # Show file open dialog
        dlgResult = fileDialog.showOpen()
        file: adsk.core.DataFile = None
        if dlgResult == adsk.core.DialogResults.DialogOK:
            file = fileDialog.dataFile
        else:
            return

        # Check that the selected design is a configured design.
        if not file.isConfiguredDesign:
            ui.messageBox('The selected design must be a Configured Design.')
            return

        # Get the top table.
        topTable: adsk.fusion.ConfigurationTopTable = file.configurationTable

        # Create a new design to add all of the configurations to.
        newDoc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        newDes: adsk.fusion.Design = newDoc.products.itemByProductType('DesignProductType')

        # Prompt for the filename to save the design. Saving a design before inserting an
        # occurrence is no longer a requirement in Fusion, but the API still requires it.
        # This is a temporary limitation.
        fileDialog = ui.createCloudFileDialog()
        fileDialog.title = 'Specify Assembly Filename'
        dlgResult = fileDialog.showSave()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            filename = fileDialog.filename
            folder = fileDialog.dataFolder

            newDoc.saveAs(filename, folder, 'Assembly of Configuratoins', '')
        else:
            return

        # Get the Occurrences collection of the root component.
        occs = newDes.rootComponent.occurrences

        # Specify some values that will control how the occurrences are laid out.
        offset = 5      # Defines the distance between occurrences.
        maxColumns = 3  # Defines the  number of items in a column before a new row is started.

        # Iterate through the configurations (rows in the table) and place each one.
        xOffset = 0
        yOffset = 0
        currentY = 0
        currentX = 0
        colCount = 0
        originTrans = adsk.core.Matrix3D.create()
        first = True
        newColumn = False
        row: adsk.fusion.ConfigurationRow
        for row in topTable.rows:
            # Place the occurence using the matrix. For the first occurrence this is an
            # identity matrix, which will place the occurrence at the origin.
            configOcc: adsk.fusion.Occurrence = occs.addFromConfiguration(row, originTrans)
            colCount += 1

            if first:
                first = False

                # Get the size of the first occurrence and use it to determine the offset
                # distance for both the columns and rows for the other occurrences.
                bounds = configOcc.preciseBoundingBox

                # This is the first placement, so leave the occurrence at the origin.
                xOffset = bounds.maxPoint.x - bounds.minPoint.x
                yOffset = bounds.maxPoint.y - bounds.minPoint.y

            # Calculate the position of the next occurrence.
            if colCount == maxColumns:
                currentX = 0
                currentY = currentY + yOffset + offset
                colCount = 0
            else:
                currentX = currentX + xOffset + offset

            originTrans.translation = adsk.core.Vector3D.create(currentX, currentY, 0)
        ui.messageBox('Finished.')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


C++ Specific Issues

Fusion 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 C++ script or add-in using the “Scripts and Add-Ins” command a single cpp is created and both Visual Studio (.vcxproj) and Xcode (.xcodeproj) projects are created that use the 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 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 defined type should always use the Fusion 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 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 Python. The Python 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.

// Python
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, 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 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 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 Python. Although the concept is the same for both 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 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 API is described by many .h files that are provided as part of the Fusion 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 specific, (UI, Materials, Geometry, etc.) and “Fusion” contains Fusion 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 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 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 object. Every C++ API function that returns an API object that references an entity in Fusion 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 to process all messages currently in its queue. There are cases when you’re driving Fusion using a program that Fusion won’t keep up graphically. Calling doEvents gives Fusion 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 have at least one 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 debug 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 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 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. 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 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” from the list, as shown below.

    Attach to Process

    At this point, your script or add-in is attached to Fusion but it’s not running.

  4. To begin running your script or add-in in Fusion 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. You can now edit the code, recompile and go back to step 3 to begin the debugging process again.


Fusion Custom Features

Custom Features

Preview The functionality described here is provided as a preview of intended future API capabilities. You are encouraged to try it and report any problems and offer suggestions using the "Custom Feature" pinned topic near the top of the Fusion API and Scripts forum.

Because this is a preview of future functionality, it will probably change before it is released. Changes will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities.

Throughout this topic, known issues are highlighted in yellow. There will likely be significant updates to this documentation and the sample programs as the API is improved as we consider your feedback.

The creation of custom features is considered an advanced use of the API, and you should have previous experience using the API and creating custom commands.

Existing Functionality Overview
Custom Feature Overview
Geometry
Timeline Grouping
Custom Parameters
Geometry Dependencies
Custom Named Values
Custom Compute
Custom Edit
Custom Feature Examples
Round Emboss Example (Grouping standard Fusion Features)
Custom Pocket (Temporary B-Rep and Custom Feature Compute)
Implementing a Custom Feature
Creating the Custom Feature Command
Defining a Custom Feature
Creating a Custom Feature
Computing a Custom Feature
Editing a Custom Feature
commandCreated Event
activate Event
execute Event
Q&A

Existing Functionality Overview

Through the API, you have been able to create and edit models ever since Fusion first introduced its API. You can automate the creation of the Fusion standard features, and the result is the same as if you created them interactively. Here is an example of an add-in that models a round emboss that you might see on a sheet metal part and fabricated using a punch and die operation.

The add-in creates a button in the user interface that the user executes to run the command, as illustrated below.

When the command runs, it displays a dialog to gather the input needed to define the emboss, as shown below.

To the user, creating this round emboss "feature" is the same as creating any other Fusion feature. They run the command, interact with a dialog to provide the required inputs, and then Fusion modifies the model in an expected way. The results of the command are grouped into a single undo operation, as shown below. The capabilities described so far are all part of the API's custom command capabilities, which have been available since the beginning of the Fusion API.

Creating custom commands and automating geometry creation is very powerful and provides this ability to make logical "features." However, after the "feature" has been created, and we start examining the results, we see the result is not a standard Fusion feature. The first difference is that after running the custom command to create the round emboss "feature," we see four new features in the timeline, as shown below, where a standard feature will have one. There is not anything in the user-interface that indicates a round emboss feature exists besides the part's geometry.

Editing the round emboss "feature" is also tricky because of the fact there are multiple features. It is not obvious which standard features in the timeline correspond to the round emboss "feature." And because the round emboss consists of numerous features, multiple parameters control those features. Even simple changes are difficult because it may not be obvious which parameters to edit to get the desired result. You can easily destroy the logical feature's desired behavior by editing the wrong parameters or modifying them outside of an expected range. You can see below all the parameters controlling the four features that make up the round emboss "feature."

Because the user-interface does not have a single item representing the round emboss "feature," even something as simple as deleting it is difficult because it is not apparent which features in the timeline you need to delete.

Because the round emboss "feature" was created using standard Fusion parametric features, when the model changes, the features will automatically compute, and in many cases, this is good enough. However, there can also be cases where the custom command calculates information during the initial creation of the feature. For example, a custom command that creates a "feature" relative to the center of gravity of a selected body can correctly calculate the feature. That logic is part of the command, and if the body changes, the standard features will compute using their built-in logic and not the special command logic used during the initial creation.

Custom Feature Overview

Geometry

A custom feature solves the issues described above. For geometry creation, custom features do not provide any additional functionality. You are still limited to whatever functionality Fusion currently provides; standard features and the API's temporary B-Rep functionality. As a result, the custom feature functionality does not offer any additional modeling capabilities beyond what is already available.

Timeline Grouping

The new functionality that the custom feature functionality does provide is the ability to group several features under a single node in the timeline. This is similar to the Create Group command in the timeline but has some big differences. A custom feature timeline node has its own icon, name, and behaves like all other feature nodes, which allow you to delete, suppress, reorder, rename, and edit the feature. Also, the user cannot expand the custom feature timeline node to access the features it is grouping.

The picture below shows an example of the round emboss as a custom feature. Instead of seeing the sketch and three features, you now see a single timeline node. It has its own icon and supports all of the standard feature functionality available in the context menu.

Custom Parameters

Another capability unique to custom features is the ability to have associated custom parameters. In the emboss feature, there are two values input by the user when the feature is created: Diameter and Height.

Without the custom feature capability, we see all eleven parameters associated with the sketch and features created for the round emboss "feature." With a custom feature, we see the "Round Emboss" feature in the parameters dialog and see the "Diameter" and "Height" parameters associated with it, as shown below. The user can edit these parameters just like any other model parameter, and if the custom feature is deleted, these custom parameters are automatically deleted with it.

Geometry Dependencies

Besides being dependent on the parameters, most custom features are also dependent on existing model geometry. When creating a custom feature, the user will be presented with a command dialog and typically pick geometry that defines how the custom feature will be computed. For example, with the Boss command, a point is selected to specify the boss's location. The geometry the custom feature is dependent on is referred to as its dependencies, and there is a formal way to capture these as part of the custom feature definition.

The dependencies are critical to the behavior of the custom feature. They are used both by Fusion and by the add-in to compute and edit an existing custom feature. Fusion uses this to determine when the custom feature needs to be computed, and Fusion will have the custom feature compute if any of the entities the feature depends on are modified, or any of the associated parameters are edited.

You also use the dependencies in the add-in to get the geometry. You need them to recompute and edit the custom feature based on the current state of the entities.

Custom Named Values

When creating a feature, there are three types of inputs; selected entities, values, and settings. Entities that are selected are saved as dependencies of the feature. Values are saved as custom parameters to allow the user to edit them easily. Finally, settings are various options or states the user specifies when creating the feature. These need to be remembered because they change how the feature is computed and edited.

An example of where custom named values would be used is for a command like the Revolve command. The profile and axis are geometric dependencies, the angle is a parameter, and the type, direction, and operation are settings within the feature. For a custom feature, these can be saved as custom named values of the feature. These are what the name indicates; values that are named and because they are named, you can quickly look them up later.

Revolve Named Values

Custom Compute

When you use the user interface to create a standard Fusion feature, you run the feature command, which collects the required input, and when you click "OK," the command calls an internal function (known as a "request") to create the actual feature. The input that was gathered is passed to the request, and all the logic to create or modify the B-Rep data is in the request. Fusion calls a similar request any time the feature needs to re-compute. A feature might need to compute any time a parameter value is modified or something created earlier in the timeline is modified. Each feature specifies the dependencies it has on other geometry and parameters, and Fusion figures out from that if the feature needs to compute. As part of the re-compute, the request can get the dependency geometry and any other inputs, re-create the geometry, and incorporate it into the model.

For example, let us look at the fillet feature. When you initially create the fillet, you select the edges you want to fillet, specify the radius, and other settings. The command then takes that input and calls the feature request, which creates new faces representing the fillet geometry and integrates the faces into the model. The fillet feature tells Fusion it is dependent on the edges that were selected and the radius parameter. If any of those change, Fusion will ask the fillet to re-compute itself. The request gets the current state of the edges it depends on, the radius from its parameter, and any other settings specific to that instance of the feature, re-creates the faces and re-integrates them into the model. All the logic about creating the fillet faces and integrating them back into the model is in the fillet feature request. Each time you edit an existing feature or edit a parameter, all the features impacted by those changes are re-computed to fully update the model.

Custom features also provide this capability. When you create a custom feature, you define existing geometry the feature is dependent on, and Fusion will fire an event notifying you when the feature needs to compute.

This re-compute functionality is currently limited to one specific case. This custom compute functionality should not be used for any other cases and will likely fail. The case where it is supported is where the custom feature consists of only base features, sketches, and combine features. Typically, a custom feature that supports custom compute will have a base feature with one or more B-Rep bodies and a combine feature that uses a Boolean operation to combine the base feature bodies into the parametric model.

Custom Edit

The other functionality provided by a regular feature is the ability to edit it. You can edit a feature by either choosing "Edit Feature" from the timeline node's context menu or double-clicking on the timeline node. Typically, the same dialog you used when you created the feature is displayed, allowing you to change any of the various inputs.

A custom feature can provide the same type of interaction. Fusion notifies your add-in when the user has chosen to edit your custom feature, enabling the add-in to do whatever it needs to do for an edit. For the round emboss custom feature, editing displays the dialog shown below, allowing you to change the input parameters. Implementing editing is described in more detail below.

When you edit a standard Fusion feature, notice all the nodes to the right of the edited feature are disabled. Fusion has effectively rolled the timeline to just before the edited feature to put the model in the state it was in when the feature was created. When making changes to a feature where you are changing geometric inputs, the API has always required you to roll the timeline to just before the feature being edited. For example, if you edit a fillet, you must roll the timeline to just before the fillet, so all the original edges are available again.

Because a custom feature combines several features into a single timeline node, it is impossible to move the timeline before one of those features. However, you can work around this limitation by temporarily remove all of the features from the custom feature, moving the timeline marker and editing the desired features and then putting them back into the custom feature.

Custom Feature Examples

Below are two examples that demonstrate two different approaches to using the custom feature capabilities. There are pros and cons to each approach.

Round Emboss Example (Grouping standard Fusion Features)

This example of the round emboss feature creates all its geometry using standard Fusion modeling entities (sketches and features in this case). It uses the custom feature functionality to group these into a single timeline node and provide a simpler user-interface when editing the feature by only showing the parameters it wants to expose in the Parameters dialog and supporting an edit command; both are shown below. The source code for the Round Emboss Feature add-in can be downloaded here.

This type of custom command does not take advantage of the custom compute capabilities supported by custom features because of the limitations described in the compute and custom edit sections. However, even without a custom compute, you can still create useful features. This custom feature combines standard Fusion features, but because the Fusion features are parametric, they automatically update when the model changes, so the compute comes for free.

Also, because of the limitations described in the "Custom Edit" sections above, you are very limited to the types of edits you can perform, essentially just editing the parameters of the features that are grouped within the custom feature. As you can see in the dialog above, when you create an emboss feature, it prompts for a point to be selected to define the location of the emboss. Because the edits required to switch to a different sketch point are not supported for a custom feature, you will not be able to choose a new point during an edit. For an edit, the dialog has no longer has the selection input but only supports changing the two values. Even with this limitation, providing this functionality as a custom feature is a considerable improvement.

Editing a custom feature is done by implementing a second command. There is one command for the creation and a second command for edit. You create the edit command and indicate which type of client feature it should be used for. When the user double-clicks the feature node in the timeline or chooses Edit Feature in the context menu, Fusion executes your edit command; the command dialog is displayed, and the user can make changes. In this example, the types of edits that are allowed are limited to editing the parameters. All the edit command does is display the dialog to let the user specify new values, and then the command updates the parameters with the new values to update the model.

Custom Pocket Example (Temporary B-Rep and Custom Feature Compute)

Here is an example that fits within the limitations so it can use all the capabilities of custom features. It creates a custom pocket. An add-in defines the Custom Pocket command during the add-in start-up and adds the command to the user-interface, as shown below. The source code for the Custom Pocket Feature add-in can be downloaded here.

When the user clicks the command button, the command is created and defines the dialog shown below to gather the needed input; a sketch point and four values. A preview is displayed in the graphics window as the user makes changes to the input values.

When the user clicks "OK" to execute the command, the add-in creates the pocket's shape as a B-Rep body. It does this by using the API's temporary B-Rep capabilities and creates two boxes and four cylinders and uses Boolean operations to combine them into a single temporary B-Rep body. It then makes a base feature and uses the temporary B-Rep body to create a new body in the base feature. A body in a base feature is a real body and can be seen in Fusion, but it is static and not parametric. Finally, it creates a Combine feature to subtract the pocket body from the part body.

At the end of the execute, the command creates a custom feature, grouping the Base Feature and the Combine feature into the custom feature. The command also creates four custom parameters for the length, width, depth, and radius. Once the creation has finished, there is a new pocket feature in the timeline and the Parameters dialog, where the four parameters can be seen and edited, as shown below.

During the creation of the custom feature, the command also specifies that the custom feature has a dependency on the selected sketch point. When Fusion loads the add-in, the add-in defines the custom feature and adds a handler for the compute event for this type of custom feature. Whenever the user edits any of the custom parameters associated with this custom feature, or any of the dependencies change (the sketch point in this example), Fusion will fire the compute event to allow the add-in to update the feature.

When the compute event is fired, Fusion is in the middle of computing everything in the model impacted by the change the user has made. When the compute is fired, the model is in the state it was when the custom feature was initially created. This means that geometry that may have been consumed by features later in the timeline will be available during the compute because the timeline has essentially been rolled to just before the custom feature. This is critical because you need access to all the geometry that existed at the time of creation.

For example, your custom feature might depend on a selected edge, and a fillet operation might have consumed that edge. When the feature computes, it needs that edge to be able to successfully re-compute. After the custom feature is finished computing, Fusion continues computing any other impacted features, including the fillet feature. After the compute finishes, the model will be as the user expects it.

As mentioned earlier, the custom feature editing is done through a separate command that the add-in implements. When you define a custom feature, you declare which command is the edit command for that feature. When the user edits the feature, Fusion executes the edit command. In the edit command, you can get which custom feature is being edited and display the command dialog to allow the user to make changes. This example pocket custom feature stays within the limitations of only having a Base Feature and a Combine feature so it can do more in the edit than the previous example. For example, during the edit, you can choose a new point to reposition the pocket anywhere on the model.

Implementing a Custom Feature

Let us now look at the details of how to create a custom feature along with the code. The Custom Pocket example above is used for the discussion because it demonstrates all the custom feature capabilities. You can compare the code for the Round Emboss custom feature to see the differences in the two uses of the custom feature functionality.

Creating the Custom Feature Command

The first step in supporting a custom feature is to define two new commands: one for the creation and one for the edit. These commands are no different than any other custom commands you might create using the API. You create a new CommandDefintion object and then add a new button to the user-interface. Because the edit command is never directly executed by the user, it does not need an icon and is not added to the user interface. Instead, Fusion executes the edit command when the user specifies they want to edit an existing custom feature.

Like any other command, you also connect a handler function to the command created event of each CommandDefinition.

Below is a portion of the code from the commandCreated event of the create command. It creates the command definition, adds a button to the user interface, and connects to the commandCreated event. If you have used the API to create commands before, there is nothing new here.

# Create the command definition for the creation command.
createCmdDef = _ui.commandDefinitions.addButtonDefinition('adskCustomPocketCreate',
                                                          'Custom Pocket',
                                                          'Adds a pocket at a point.',
                                                          'Resources/CustomPocket')

# Add the create button to the UI.
panel = _ui.allToolbarPanels.itemById('SolidCreatePanel')
panel.controls.addCommand(createCmdDef, 'EmbossCmd', False)

# Create the command definition for the edit command.
editCmdDef = _ui.commandDefinitions.addButtonDefinition('adskCustomPocketEdit',
                                                        'Edit Custom Pocket',
                                                        'Edit custom pocket.', '')

# Connect to the command created event for the create command.
createCommandCreated = CreatePocketCommandCreatedHandler()
createCmdDef.commandCreated.add(createCommandCreated)
_handlers.append(createCommandCreated)

# Connect to the command created event for the edit command.
editCommandCreated = EditPocketCommandCreatedHandler()
editCmdDef.commandCreated.add(editCommandCreated)
_handlers.append(editCommandCreated)

Defining a Custom Feature

When using custom features, there is a new step you need to do in the run function of your add-in, which is to create a new CustomFeatureDefinition object. The CustomFeatureDefinition object is similar in concept to a CommandDefinition. It is not a custom feature but defines information about a specific type of custom feature and is used whenever you create a custom feature of that type. The code to create a new CustomFeatureDefinition is shown below. It uses the static create method on the CustomFeatureDefinition class. The first argument is the ID of the custom feature definition, which should be unique with respect to ALL custom feature definitions. All custom features of the new type are tagged with this ID. Because of that, you need to make sure the ID is unique. We suggest including your company name as part of the ID to help with uniqueness. The second argument is the name the user will see in the timeline for all custom features of this type. If you want to use a localized name, you can use the userLanguage property of the GeneralPreferences object to determine the current language and use a name in that language. The last argument is the path to a folder that contains the icon to show in the timeline for this type of custom feature. You should provide 16x16.png and 32x32.png files. It is common to use the same images used for the feature create command so you can reference the same folder used for the command definition.

# Create the custom feature definition.
global _customFeatureDef
_customFeatureDef = adsk.fusion.CustomFeatureDefinition.create('adskCustomPocket',
                                                               'Custom Pocket',
                                                               'Resources/CustomPocket')

_customFeatureDef.editCommandId = 'adskCustomPocketEdit'

There is no support to query for existing CustomFeatureDefinition objects; however, if you attempt to create a CustomFeatureDefinition using an ID that already exists, the create method will return the existing CustomFeatureDefinition instead of creating a new one. The sample add-in creates and assigns the CustomFeatureDefinition in a global variable to use later when the custom feature is created.

After creating the CustomFeatureDefinition object, you should specify the ID of the CommandDefinition object to use when the custom feature is edited. That is demonstrated in the last line of the code snippet above.

The final work that needs to be done in the run function is to connect a handler to the customFeatureCompute event of the CustomFeatureDefinition object

# Connect to the compute event for the custom feature.
computeCustomFeature = ComputeCustomFeature()
_customFeatureDef.customFeatureCompute.add(computeCustomFeature)
_handlers.append(computeCustomFeature)

Creating a Custom Feature

When the command that creates the custom feature is executed by the user, all the work the command does before the user clicks the "OK" button is the same as any other custom command. The difference between a command that creates standard features and one that creates a custom feature is what happens in the execute event handler of the command. The code below is the Execute event handler for the sample custom feature. The first thing it does is pass the inputs the command collected to a function called CreatePocketBody. This function creates a temporary BRepBody object that represents the tool body needed to create the pocket. Next, it creates a new base feature and creates a regular body in the base feature.

A base feature has a place in the timeline like other features, but a base feature's contents are not parametric. When a base feature is active, and you create features, it is the same as working in a design that is set to not capture design history. Any bodies you create in a base feature are static and will not change in response to the model's changes.

# Event handler for the execute event of the create command.
class CreateExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandEventArgs.cast(args)

            # Create the body of the pocket.
            skPoint: adsk.fusion.SketchPoint = _pointSelectInput.selection(0).entity
            pocketBody = CreatePocketBody(skPoint.worldGeometry, _lengthInput.value,
                                          _widthInput.value, _depthInput.value,
                                          _radiusInput.value)

            # Subtract the pocket from the parametric body.
            face = GetFaceUnderPoint(skPoint.worldGeometry)
            paramBody = face.body
            comp = paramBody.parentComponent
            baseFeat = comp.features.baseFeatures.add()
            baseFeat.startEdit()
            comp.bRepBodies.add(pocketBody, baseFeat)
            baseFeat.finishEdit()

            # Create a combine feature to subtract the pocket body from the part.
            combineFeature = None
            toolBodies = adsk.core.ObjectCollection.create()
            toolBodies.add(baseFeat.bodies.item(0))
            combineInput = comp.features.combineFeatures.createInput(paramBody, toolBodies)
            combineInput.operation = adsk.fusion.FeatureOperations.CutFeatureOperation
            combineFeature = comp.features.combineFeatures.add(combineInput)

With the code below, we are finally seeing some custom feature specific functionality where the add-in is creating the custom feature. The process of creating a custom feature is the same as any other feature; you create an input object, define all the required input, and provide the input object as an argument to the add method. The createInput method used to create a CustomFeatureInput object has three arguments. The first is the CustomFeatureDefinition object for the type of custom feature being created. Remember, the CustomFeatureDefinition object was created in the run function when Fusion loaded the add-in. Next, the code defines four custom parameters. Custom parameters are defined using an ID, the visible name the user will see in the Parameters dialog, the value, the units, and if the parameter should be visible in the Parameters dialog. Currently, all parameters are visible, so the last argument is ignored.

Next, it adds the selected sketch point as a dependency. When creating a dependency, you assign an ID and provide the entity that the custom feature is dependent on. The ID's of the parameters and the dependencies only need to be unique with respect to the custom feature and are used to reaccess them later easily. You will see this used in the discussion about the compute and edit process.

Finally, it creates the custom feature by calling the add method and passing in the CustomFeatureInput object.

# Create the custom feature input.
des: adsk.fusion.Design = _app.activeProduct
defLengthUnits = des.unitsManager.defaultLengthUnits
custFeatInput = comp.features.customFeatures.createInput(_customFeatureDef)

lengthInput = adsk.core.ValueInput.createByString(_lengthInput.expression)
custFeatInput.addCustomParameter('length', 'Length', lengthInput,
                                 defLengthUnits, True)
widthInput = adsk.core.ValueInput.createByString(_widthInput.expression)
custFeatInput.addCustomParameter('width', 'Width', widthInput,
                                 defLengthUnits, True)
depthInput = adsk.core.ValueInput.createByString(_depthInput.expression)
custFeatInput.addCustomParameter('depth', 'Depth', depthInput,
                                 defLengthUnits, True)
radiusInput = adsk.core.ValueInput.createByString(_radiusInput.expression)
custFeatInput.addCustomParameter('radius', 'Radius', radiusInput,
                                 defLengthUnits, True)

custFeatInput.addDependency('point', skPoint)

custFeatInput.setStartAndEndFeatures(baseFeat, combineFeature)
comp.features.customFeatures.add(custFeatInput)

At this point, you will see the newly created custom feature as a single node in the timeline.

You will also see the feature and its custom parameters in the Parameters dialog.

Computing a Custom Feature

When a change is made to the design, Fusion looks at the dependencies and determines which features are impacted by the change, and begins computing each affected feature. When creating a custom feature, you can declare its dependencies so that Fusion will include the custom feature as part of the compute. The CustomFeatureDefinition object supports the customFeatureCompute event, and the handler is connected to the event in the run function of your add-in after you have created the CustomFeatureDefinition. Fusion fires the compute event anytime a custom feature of the type defined by the CustomFeatureDefinition needs to be computed.

When the customFeatureCompute event is fired, Fusion is in the middle of a large compute and pauses when it reaches your custom feature in the list of features to compute to allow it to compute. The event arguments passed by the event provide the specific custom feature being computed. Fusion is in a fragile state at this point, and you are limited in what you can do. It is currently limited to modifying the bodies in a base feature, editing the contents of a sketch, and editing parameter values owned by the custom feature or features within the custom feature. Any other changes will cause problems and most likely fail.

Below is the event handler for the customFeatureCompute for the custom pocket. It is like the code that initially created the feature, but instead of getting geometry and values from the user via command inputs, it gets them from the defined dependencies and the associated custom parameters. If there were other settings, it would get them from the custom named values. It uses these current geometries and values to create a new temporary B-Rep body. It then gets the base feature associated with the custom feature, gets the BRepBody it contains, and updates the existing body with the new geometry. Updating the body is accomplished using the BaseFeature.updateBody method. Once you finish whatever you need to do to update the feature and finish the compute handler's execution, control returns to Fusion, and it completes the full compute.

# Event handler to handle the compute of the custom feature.
class ComputeCustomFeature(adsk.fusion.CustomFeatureEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs: adsk.fusion.CustomFeatureEventArgs = args

            # Get the custom feature that is being computed.
            custFeature = eventArgs.customFeature

            # Get the original sketch point and the values from the custom feature.
            skPoint = custFeature.dependencies.itemById('point').entity
            length = custFeature.parameters.itemById('length').value
            width = custFeature.parameters.itemById('width').value
            depth = custFeature.parameters.itemById('depth').value
            radius = custFeature.parameters.itemById('radius').value

            # Create a new temporary body for the pocket.
            # This can return None when the point isn't on a face.
            pocketBody = CreatePocketBody(skPoint.worldGeometry, length, width, depth, radius)
            if pocketBody is None:
                # Add a failure status message because it failed to create the pocket.
                eventArgs.computeStatus.statusMessages.addError('DRPOINT_COMPUTE_FAILED', '')
                return

            # Get the existing base feature and update the body.
            baseFeature: adsk.fusion.BaseFeature = None
            for feature in customFeature.features:
                if feature.objectType == adsk.fusion.BaseFeature.classType():
                    baseFeature = feature
                    break

            # Update the body in the base feature.
            baseFeature.startEdit()
            body: adsk.fusion.BRepBody = baseFeature.bodies.item(0)
            baseFeature.updateBody(body, pocketBody)
            baseFeature.finishEdit()
        except:
            showMessage('CustomFeatureCompute: {}\n'.format(traceback.format_exc()))

An important point to understand here is that to maintain associativity; you need to update existing geometry rather than delete and re-create. That is the reason for replacing the geometry in the body rather than deleting and re-creating. A parametric system depends on things being able to find what they are dependent on to compute successfully. Making significant changes to a feature or sketch can cause downstream features to fail because the geometry they are dependent on no longer exists.

If the compute should fail for some reason, you can add a status message using the computeStatus property of the CustomFeatureEventsArgs object passed in as the event's argument. Adding a status message causes the feature icon in the timeline to be shown with a red background for an error or a yellow background for a warning. The context menu shows the "Review Warning" option, which will display the Error dialog, as shown below. You are currently limited to a small set of pre-defined messages. For example, in the custom pocket code above, if the CreatePocketBody function fails, it returns None. The code checks for this and adds an error to the status messages.

Let us look at a typical example of creating a new part by importing a STEP file. When you set the design to be parametric (Capture Design History), you will see that Fusion creates a Base Feature, and the body is owned by it. You can create parametric features on the non-parametric body outside the base feature. Typically, the body remains static, but you can make changes by activating the Base Feature and use direct modeling commands to modify the body's faces and even create non-parametric features. When you exit the base feature, the parametric features added to the body will compute if they can successfully find their dependent geometry.

When the body is first imported, each face, edge, and vertex is tagged with an ID. Downstream features use those IDs to find those faces, edges, and vertices when the feature computes. Changes made to the body through direct modeling maintain these IDs even if the face or edge is geometrically changed.

When you use the temporary B-Rep functionality to create a temporary body and then create a real body in a base feature using the temporary body, Fusion will automatically assign ID's to the faces, edges, and vertices of the new non-parametric body. If you create a new temporary body and replace the non-parametric body in a base feature, Fusion will assign new ID's to the faces, edges, and vertices of the body. However, you construct the temporary BRepBody in the same way, the ID's assignment should be consistent, so logical faces, edges, and vertices will end up having the same ID as before.

In the custom feature sample of the custom pocket, the pocket is built the same way each time the temporary B-Rep body is created; the size of the geometry changes but not how it is built. This results in the faces, edges, and vertices have the same ID after the body is replaced, and downstream features that are dependent on these faces, edges, or vertices can find successfully find them and compute.

If you use the BRepBodyDefinition functionality to create a new B-Rep body from scratch, you can assign the ID's to the faces, edges, and vertices using the associativeID property of each of those objects. If you are consistent in assigning this associative ID, the downstream features should successfully compute when you update the body.

Editing a Custom Feature

The final piece of fully implementing a custom feature is supporting edit. When the user chooses Edit Feature from the context menu or double-clicks the timeline node, Fusion will execute the command specified earlier as the edit command for this custom feature. This was done when the CustomFeatureDefinition was created in the run function of the add-in.

CommandCreated Event and Custom Feature Edit

When handling the commandCreated event, a command creates the needed command inputs and connects to the command related events. A command that is serving as the edit command of a custom feature performs these same actions and has one other thing it needs to do; it needs to get the custom feature the user is currently editing. Fusion will only execute the edit command when a custom feature of the type it is associated with is being edited. Still, you need to get the specific instance of that type the user has chosen to edit. For example, you can create many of the custom pocket features in a model, but the user indicates a specific instance to edit by choosing its node in the timeline. When the user right-clicks the node to access the context menu or double-clicks the node, the feature is selected. The code below is from the notify function in the event handler; it gets the selected entity and assigns it to a global variable to be used in other functions.

class EditPocketCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)
            cmd = eventArgs.command
            inputs = cmd.commandInputs
            des: adsk.fusion.Design = _app.activeProduct
            defLengthUnits = des.unitsManager.defaultLengthUnits

            # Get the currently selected custom feature.
            global _editedCustomFeature
            _editedCustomFeature = _ui.activeSelections.item(0).entity
            if _editedCustomFeature is None:
                return

The next section of code is creating the SelectionCommandInput. The creation of selection inputs is the same as the initial creation, but we will do something special for selections in the activate event, as we'll see later.

# Create the selection input to select the sketch point.
_pointSelectInput = inputs.addSelectionInput('selectPoint', 'Point',
                                             'Select point to define pocket position.')
_pointSelectInput.addSelectionFilter('SketchPoints')
_pointSelectInput.tooltip = 'Select point to define the center of the pocket.'
_pointSelectInput.setSelectionLimits(1, 1)

The code below creates the ValueCommandInputs for the four values that define the pocket's size and shape. There is a difference in how they are created for the edit command compared to the create command. The first line below is getting the CustomParametes collection associated with this feature. Each custom parameter's current value is obtained and used as the initial value for the corresponding ValueCommandInout. Notice it is using the expression of the parameter rather than the value. The expression of a parameter is what the user sees and edits in the Parameters dialog. It is a string and can define more than a simple value. For example, you can specify units as part of the expression and can use equations.

params = _editedCustomFeature.parameters

# Create the value input to get the length.
length = adsk.core.ValueInput.createByString(params.itemById('length').expression)
_lengthInput = inputs.addValueInput('length', 'Length', defLengthUnits, length)

# Create the value input to get the width.
width = adsk.core.ValueInput.createByString(params.itemById('width').expression)
_widthInput = inputs.addValueInput('width', 'Width', defLengthUnits, width)

# Create the value input to get the depth.
depth = adsk.core.ValueInput.createByString(params.itemById('depth').expression)
_depthInput = inputs.addValueInput('depth', 'Depth', defLengthUnits, depth)

# Create the value input to get the fillet radius.
radius = adsk.core.ValueInput.createByString(params.itemById('radius').expression)
_radiusInput = inputs.addValueInput('cornerRadius', 'Corner Radius', defLengthUnits, radius)

The last section of code connects the event handler functions to the command-related events you need for your command. Some of the event handler functions used are the same handlers used for the create command, and some are unique for the edit command. For example, the execute event handler for the edit command is different than the execute handler for the creation command. In contrast, the same preSelect handler is used for both the create and edit commands. It depends if the logic is the same in both the create and edit.

# Connect to the needed command related events.
onExecutePreview = ExecutePreviewHandler()
cmd.executePreview.add(onExecutePreview)
_handlers.append(onExecutePreview)

onExecute = EditExecuteHandler()
cmd.execute.add(onExecute)
_handlers.append(onExecute)

onPreSelect = PreSelectHandler()
cmd.preSelect.add(onPreSelect)
_handlers.append(onPreSelect)

onActivate = EditActivateHandler()
cmd.activate.add(onActivate)
_handlers.append(onActivate)

onValidate = ValidateInputsHandler()
cmd.validateInputs.add(onValidate)
_handlers.append(onValidate)

activate Event and Custom Feature Edit

When Fusion is starting a command, it calls the commandCreated event first so the dialog can be defined and then calls the Activate method as the command is starting. For a custom feature, there are several things you need to do in the Activate method.

Earlier, it was discussed how when a standard feature is edited, the model changes to the state it was in just before the edited feature was created. For the user to edit a custom feature, the same thing needs to happen. You do this by manipulating the timeline. The code below finds the timeline marker's current position and gets the TimelineObject to the left of the marker, and assigns this to a global variable to use later. The timeline marker can be at the very beginning of the timeline, so there is no marker to its left. But to edit anything in the timeline, the marker has to be to the right of the feature being edited, which means if the marker is at the beginning, there is nothing available to edit.

The next section of code rolls the timeline to just before the custom feature being edited. It also sets a global flag indicating that the timeline has been rolled back.

class EditActivateHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandEventArgs.cast(args)
            des: adsk.fusion.Design = _app.activeProduct

            # Save the position of the timeline by getting the object before the marker.
            timeline = des.timeline
            markerPosition = timeline.markerPosition
            global _restoreTimelineObject, _isRolledForEdit
            _restoreTimelineObject = timeline.item(markerPosition - 1)

            # Roll the timeline to just before the custom feature being edited.
            _editedCustomFeature.timelineObject.rollTo(True)
            _isRolledForEdit = True

To understand the next action, you need to understand the concept of transactions. If you have written a command, you have unknowingly used transactions. You see the result of your command's transaction as an item in the undo list. If you create a basic script without a command that creates a sketch, draws some geometry, adds constraints, creates an extrusion, and adds a fillet to some edges, you will see many items in the undo list. One undo item will be listed for every API call made that created or edited something because internally, each one of those actions is a transaction. However, if you write a command and do the same actions in the command's Execute event, those transactions are wrapped into a single transaction that you see as an undo item in the list.

The transaction functionality is also used with the ExecutePreview event of a command. Whatever you do in the ExecutePreview event handler is grouped into a transaction, but each time the ExecutePreview function is called, the transaction is aborted, which sets the state of Fusion back to the beginning of the command. We see this with the custom pocket command. When the user selects a point to define the pocket's position, a preview of the pocket is displayed in the graphics window. The preview is created by the same code that creates the actual pocket. Suppose you edit the Length value in the dialog. In that case, the ExecutePreview event is fired again, and Fusion aborts the current transaction, returning the model to the state it was in before the pocket was modeled. The code in the ExecutePreview is rerun, re-creating the pocket with the new values.

Rolling back the timeline is an action that modifies the model, so it has an associated transaction. We do not want the rolling back of the timeline to be part of the transaction aborted each time there is an edit. To avoid that, we can do something in the Activate to cause this not to be aborted. When the command is started, there is an overall transaction started for the command. When the ExecutePreview is called a "step", or marker is defined within that transaction. All actions performed now are after that step. When the ExecutePreview is executed again, Fusion aborts back to that step, losing any changes made since the step was defined. In the code below, the beginStep method of the Command is called, which sets a new step. Now, when the ExecutePreview event is fired, and Fusion aborts any changes that have been made in the previous ExecutePreview, the abort will only go back to the most recent step. Because of the new step after the timeline rollback, the rollback will not be aborted. When the user clicks OK and the Execute event handler finishes, the command transaction is completed, including the rollback and whatever work was done in the Execute event.

# Define a transaction marker so the the rollback is not aborted with each change.
eventArgs.command.beginStep()

When a command is created, and the CommandCreated event is fired, Fusion is not in a state that you can manipulate selections. There is a selection input for the custom pocket command to allow the user to select the center point of the pocket. When the edit command is started, the point initially selected at creation should be selected, but that cannot be done in the CommandCreated event handler. We can wait until the command has started and the Activate event is fired to work around that limitation. That is what is happening below in the final lines of the Activate event handler. The point it is adding to the selection input is gotten from the list of dependencies defined for the feature.

# Get the point and add it to the selection input.
skPoint = _editedCustomFeature.dependencies.itemById('point').entity
_pointSelectInput.addSelection(skPoint)

When a command is created, and the CommandCreated event is fired, Fusion is not in a state that you can manipulate selections. There is a selection input for the custom pocket command to allow the user to select the center point of the pocket. When the edit command is started, the point initially selected at creation should be selected, but that cannot be done in the CommandCreated event handler. We can wait until the command has started and the Activate event is fired to work around that limitation. That is what is happening below in the final lines of the Activate event handler. The point it is adding to the selection input is gotten from the list of dependencies defined for the feature.

execute Event and Custom Feature Edit

The final step of editing a custom feature is to handle the execute event for the edit command. It gets the point and the various values from the command inputs and updates the expressions of the custom parameters. It then updates the pocket geometry by calling the UpdatePocket function which calculates a new body based on the current point and sizes and then replaces the body in the base feature. It then resets the entity associated with the dependency for the point in case the user has chosen a new sketch point. Finally, it positions the timeline marker back to its position before the edit was started.

class EditExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            global _editedCustomFeature
            eventArgs = adsk.core.CommandEventArgs.cast(args)

            point = _pointSelectInput.selection(0).entity

            # Update the parameters.
            params = _editedCustomFeature.parameters
            lengthParam = params.itemById('length')
            lengthParam.expression = _lengthInput.expression
            widthParam = params.itemById('width')
            widthParam.expression = _widthInput.expression
            depthParam = params.itemById('depth')
            depthParam.expression = _depthInput.expression
            radiusParam = params.itemById('radius')
            radiusParam.expression = _radiusInput.expression

            # Update the feature.
            UpdatePocket(_editedCustomFeature)

            # Update the point dependency.
            dependency = _editedCustomFeature.dependencies.itemById('point')
            dependency.entity = point

            # Roll the timeline to its previous position.
            global _isRolledForEdit
            if _isRolledForEdit:
                _restoreTimelineObject.rollTo(False)
                _isRolledForEdit = False

            _editedCustomFeature = None
        except:
            showMessage('Execute: {}\n'.format(traceback.format_exc()))

Q&A

Q: What happens when the add-in that created the custom feature is not loaded?

A: The add-in defines the icon for the custom feature when it creates the CustomFeatureDefinition object when the add-in is started. If the add-in isn't present, the icon hasn't been defined. As a result, opening a design that contains a custom feature where the add-in is missing, Fusion uses a generic custom feature icon in the timeline. Hovering the mouse over the feature, you see it still has its original name because the name was saved with the feature. The Edit Feature command is still available in the context menu, or the user can double-click the feature. Still, the dialog shown below will appear, notifying the user the add-in that created the custom feature is not loaded in both cases.

A custom feature groups standard Fusion geometry (sketches, features, base features, etc.), and because it wraps standard features, Fusion will re-compute the geometry when the add-in is missing. In some cases, like the round emboss feature discussed earlier, the feature can correctly compute because the features it groups rely on standard Fusion logic to compute. However, even though the geometry might correctly compute, the timeline node has a yellow background, and there is a warning that the add-in is missing. You can see this in the picture below for the custom pocket feature.

For custom features that use a custom compute, like the custom pocket example, Fusion computes and rebuilds the feature when one of its dependencies change. However, the result will typically not be what you expect. Remember, the custom pocket add-in creates the pocket geometry using temporary B-Rep capabilities and its own logic and then subtracts this body from the model using a combine feature. Suppose the user edits the parameter controlling the radius of the pocket. In that case, the custom feature will re-compute, but the geometry won't change because the add-in isn't present to rebuild the pocket body and replace the existing body in the base feature.

It would be nice for Fusion to store more information about an add-in to use when the add-in is missing—for example, possibly saving a message provided by the add-in including a link where the user can go to get the add-in. This, and other enhancements are being considered for the future.

Q: When will custom features be released?

A: There is no planned date when Fusion will release the custom feature functionality. Custom features will move out of preview when it's believed the functionality is stable and the functionality delivered provides enough capabilities to be useful.


Fusion 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
Show Through Color Effect
Additional Graphics Behaviors
Orientation
Size
Combining Orientation and Size
Position

Custom Graphics Overview

A key part of the Fusion user interface is the graphics window where you see and interact with the model and other graphical information. When using Fusion 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. However, there are cases when you want to show something in the graphics window that is not a standard Fusion 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, 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 API supports the ability to draw custom graphics in the graphics window. These custom graphics display along with the other Fusion graphics but to Fusion 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 API.

When working with most of the Fusion 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 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 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 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 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 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.

import adsk.core, adsk.fusion, traceback
import math

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 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 displays a body, it is creating triangles and lines to display that body. If there is a sphere or any curved surface, Fusion 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 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, 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. 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.

import adsk.core, adsk.fusion, traceback

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 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.

import adsk.core, adsk.fusion, traceback
import math

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 which means 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 CustomGraphicsGroup object is also derived from CustomGraphicsEntity and supports setting its color. As seen previously, all graphics entities are created within a group. If a group is assigned a color, all of the entities within that group will display using that color, as long as the entity has not had a color assigned directly to it. So, the group color applies to everything in the group, but entity colors override the group color.

The color property is a read-write property that is set by passing in one of five objects that are used to define graphics colors. All of the five color types derive from CustomGraphicsColorEffect and they are CustomGraphicsSolidColorEffect, CustomGraphicsBasicMaterialColorEffect, CustomGraphicsAppearanceColorEffect, CustomGraphicsVertexColorEffect, and CustomGraphicsShowThroughColorEffect. 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. Colors can be removed by setting the color property to null in C++ or None in Python.

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.

import adsk.core, adsk.fusion, traceback

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 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 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

Show Through Color Effect

The show through color effect allows you to specify a single color for the custom graphics entity and define how it interacts with other graphics in the scene. The color is defined using a simple R,G,B definition, which also includes an alpha component that let's you control the transparency of the object itself. The primary difference with this color effect is that it also controls the transparency of objects in front of it, whether they're other custom graphics objects or Fusion objects. The picture below show's an example where the block is a custom graphics object with show through color effect applied with the opaque value of 0.2 and the other objects are standard Fusion bodies. Notice how the block itself is not translucent but the custom graphics block can be seen through the other objects.

# Create the show through color effect.
showThrough = adsk.fusion.CustomGraphicsShowThroughColorEffect.create(adsk.core.Color.create(255, 0, 0, 255), 0.2)
graphicsBody.color = showThrough

# Set the mesh to be colored using the show through color effect.
mesh.color = showThrough

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; 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.

import adsk.core, adsk.fusion, traceback

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 is intended as an aid for learning application development techniques for Fusion and as such is provided "as-is". The sample code is covered by the relevant sections of the Fusion 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 API

Events allow you to receive notifications when specific actions occur within Fusion. Events are a crucial component when creating custom Fusion commands. Through events, your program can know that the user clicked the button associated with your command and interact with the user while your command is running (preview, input validation, selection, execute, etc.).

To implement an event, you need to add a "handler" function to your code and connect that handler to the event. Fusion will call your handler function whenever the related action occurs in Fusion that causes the event to fire. Even though the concept of implementing an event is the same, the actual practice differs from one language to another. Therefore, specifics for setting up events are provided in the topics covering each supported language; Python and C++. In fact, for Python, there is a Fusion library provided to simplify using events. You can read more about it in the topic about the Fusion Python Add-In Template.

One thing to be aware of that can significantly simplify adding support for events is the "Syntax" portion of the help for every event shows example code for the event handler and connecting the handler to the event. You can copy and paste this code from the help, make minor edits to a couple of variable names, and you'll have the event implemented. There are two tabs for Python and one for C++. The reason for the two tabs with Python is that the tab labeled "Python Using fusion360utils" uses a library provided when you create a Python add-in. This library simplifies the implementation of events. The "Python" tab illustrates implementing an event handler without help from an external library.

Some basic concepts apply to all events, regardless of your programming language.

  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 activeSelectionChanged, 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 derived from Event supports the "add" method, which you call to connect the event to your handler. Event objects 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 event's sender.
  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. In addition, all handlers support a single method named "notify". The notify method is called by Fusion 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 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 specific to that type of event. For example, in the case of the notify method for the commandStarting event, an ApplicationCommandEventArgs object is returned and supports the commandDefinition, commandId, and isCanceled properties specific to application command events. These provide information about which command is starting and allow you to cancel it.


extrudeFeatures.add using setOneSideExtent

Description

Demonstrates the extrudeFeatures.add method using the setOneSideExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.

Code Samples

  • Python
def demo_extrudeFeaturesOneSideExtent_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have profile selected.
    profile = _ui.selectEntity('Select a profile', 'Profiles').entity

    # Define the required input.
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    extrudeFeatures = rootComp.features.extrudeFeatures
    input: adsk.fusion.ExtrudeFeatureInput = extrudeFeatures.createInput(profile, operation)

    distance = adsk.core.ValueInput.createByString('30 mm')
    distanceExtent = adsk.fusion.DistanceExtentDefinition.create(distance)
    direction = adsk.fusion.ExtentDirections.PositiveExtentDirection
    input.setOneSideExtent(distanceExtent, direction)

    # Create the feature.
    extrudeFeature = extrudeFeatures.add(input)


extrudeFeatures.add using setSymmetricExtent

Description

Demonstrates the extrudeFeatures.add method using the setSymmetricExtent method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the extrusion.

Code Samples

  • Python
def demo_extrudeFeaturesSymmetricExtent_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have a profile selected.
    profile = _ui.selectEntity('Select a profile', 'Profiles').entity

    # Define the required input.
    extrudeFeatures = rootComp.features.extrudeFeatures
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    input = extrudeFeatures.createInput(profile, operation)
    distance = adsk.core.ValueInput.createByString("100 mm")
    isFullLength = True
    input.setSymmetricExtent(distance, isFullLength)

    # Create the feature.
    extrudeFeature = extrudeFeatures.add(input)


extrudeFeatures.add using thin extrude

Description

Demonstrates the extrudeFeatures.add method using the setThinExtrude method. To use this sample have a design open that contains a sketch with a profile. When you run the script you will be prompted to select the profile that will be used to create the thin extrusion.

Code Samples

  • Python
def demo_extrudeFeaturesThin_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the profile selected.
    filter =  adsk.core.SelectionCommandInput.Profiles
    profile = _ui.selectEntity('Select a profile', filter).entity

    # Define the required input.
    extrudeFeatures = rootComp.features.extrudeFeatures
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    input = extrudeFeatures.createInput(profile, operation)
    wallLocation = adsk.fusion.ThinExtrudeWallLocation.Center
    wallThickness = adsk.core.ValueInput.createByString("2 mm")
    input.setThinExtrude(wallLocation, wallThickness)
    distance = adsk.core.ValueInput.createByString("100 mm")
    isFullLength = True
    input.setSymmetricExtent(distance, isFullLength)

    # Create the feature.
    extrudeFeature = extrudeFeatures.add(input)


extrudeFeatures.add using ThroughAllExtent

Description

Demonstrates the extrudeFeatures.add method using the ThroughAllExtent method.

Code Samples

  • Python
def demo_extrudeFeaturesThroughAllExtent_add(rootComp: adsk.fusion.Design.rootComponent):
    filter =  adsk.core.SelectionCommandInput.Profiles
    profile = _ui.selectEntity('Select a profile', filter).entity
    operation = adsk.fusion.FeatureOperations.CutFeatureOperation
    thruAllExtent = adsk.fusion.ThroughAllExtentDefinition.create()

    extrudeFeatures: adsk.fusion.ExtrudeFeatures = rootComp.features.extrudeFeatures
    input = extrudeFeatures.createInput(profile, operation)
    # You may need to change this to PositiveExtentDirection depending on your model.
    input.setOneSideExtent(thruAllExtent, adsk.fusion.ExtentDirections.NegativeExtentDirection)
    extrudeFeature = extrudeFeatures.add(input)


extrudeFeatures.add using setTwoSidesExtent

Description

Demonstrates the extrudeFeatures.add method using the setTwoSidesExtent method. To use this sample have a design open that contains a profile and a body that is positioned away from the profile but is a size where when the profile is extruded it will intersect the body. When you run the script you will be prompted to select the profile that will be used to create the extrusion and the body to extrude to. The extrusion will be created up to the body with an offset and will also be offset from the sketch plane.

Code Samples

  • Python
def demo_extrudeFeaturesTwoSidesExtent_add(rootComp: adsk.fusion.Design.rootComponent):
    # Have the profile and body selected.
    profile = _ui.selectEntity('Select a profile', 'Profiles').entity
    body = _ui.selectEntity('Select body to extrude to', 'Bodies').entity

    # Create a ToEntityExtentDefinition to define how the extrude will go up to the body.
    offset = adsk.core.ValueInput.createByString("2 mm")
    isChained = True
    sideOne = adsk.fusion.ToEntityExtentDefinition.create(body, isChained, offset)

    # Create a DistanceExtentDefinition ot define how the extrude will go a specific distance.
    distance = adsk.core.ValueInput.createByString("5 mm")
    sideTwo = adsk.fusion.DistanceExtentDefinition.create(distance)

    # Create the extrude input with extents to two sides.
    extrudeFeatures = rootComp.features.extrudeFeatures
    operation = adsk.fusion.FeatureOperations.NewBodyFeatureOperation
    input = extrudeFeatures.createInput(profile, operation)
    input.setTwoSidesExtent(sideOne, sideTwo)

    # Create the extrude feature.
    extrudeFeature = extrudeFeatures.add(input)


Feature Recognition in CAM

The CAM library supports feature recognition for holes and pockets. This topic describes the concepts needed to understand and use this capability.

Hole Recognition

The hole recognition option available via the UI lists all recognized holes and hole groups based on the diameter and segment types. You can then apply a given template to the recognized holes or hole groups.

Using the API, you can recognize holes and hole groups using the adsk.cam.RecognizedHole.recognizeHoles(bodies) and adsk.cam.RecognizedHole.recognizeHoleGroups(bodies) methods. They both accept an array of bodies for the input and will return all holes for the body regardless or their orientation. Below is an example of a hole containing all possible segment types. Each segment can be a cylinder, flat face, cone, or torus. A hole signature is the list of segments that define that hole. Two holes are considered the same when they have the same number of segments in the same direction, and each segment must match the geometry of the other segment and have the same dimensions. The segments are in order from the top of the hole to the bottom. The difference between using the recognizeHoles and recognizeHoleGroups is the recongizeHoles method returns a flat list of all the recognized holes. Whereas the recognizeHoleGroups looks at the signatures of the holes found and combines the holes with the same signature into the same RecognizedHoleGroup.

Below is some sample code that finds all the hole groups in the first body of the Design and writes out information to the TEXT COMMAND window about the hole groups and holes that were found. A complete sample illustrates using hole recognition to find holes and create operations using that information. One thing to notice about the sample below is that it doesn't activate the CAM workspace. The hole and pocket recognition capabilities can be used within the Design.

import adsk.core, adsk.fusion, adsk.cam, traceback

_app = adsk.core.Application.get()
_ui = _app.userInterface

def run(context):
    try:
        # Get the first body in the root component.
        des: adsk.fusion.Design = _app.activeDocument.Products.products.itemByProductType('DesignProductType')
        body = des.rootComponent.bRepBodies[0]

        # Recognize the holes in the body.
        holeGroups = adsk.cam.RecognizedHoleGroup.recognizeHoleGroups([body])
        _app.log(f"Hole Group count: {holeGroups.count}")

        # Print out information about the found holes in the TEXT COMMAND window in Fusion.
        holeGroup: adsk.cam.RecognizedHoleGroup
        for holeGroup in holeGroups:
            # Process each hole within this group.
            _app.log(f"   Holes in Group count: {holeGroup.count}")
            hole: adsk.cam.RecognizedHole
            for hole in holeGroup:
                _app.log(f"      Segments in hole: {hole.segmentCount}")
                for i in range(hole.segmentCount):
                    # Display information about each segment of the current hole.
                    segment: adsk.cam.RecognizedHoleSegment = hole.segment(i)

                    _app.log(f'         Segment {i}')
                    if segment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCone:
                        _app.log(f'            Segment Type: Cone')
                    elif segment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeFlat:
                        _app.log(f'            Segment Type: Flat')
                    elif segment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeCylinder:
                        _app.log(f'            Segment Type: Cylinder')
                    elif segment.holeSegmentType == adsk.cam.HoleSegmentType.HoleSegmentTypeTorus:
                        _app.log(f'            Segment Type: Torus')

    except:
        _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Pocket Recognition

The API for Fusion exposes the algorithm that makes up the "Pocket Recognition" option available in the Fusion UI as part of geometry selection for the 2D Pocket, 2D Contour, and 2D Chamfer strategies. The functionality is intended to streamline programming for parts that contain many pockets.

In the Fusion user interface, Pocket Recognition allows users to specify a minimum and maximum corner radius and a minimum and maximum depth. Together with the tool direction, this is used to find all the pockets that would be appropriate to machine with a particular tool of specific radius and cutting length, which is the context in which Pocket Recognition is used in the user interface. The API exposes this functionality via the createNewPocketRecognitionSelection method and requires the same inputs as the user interface.

However, the API also exposes much more of the underlying algorithm used in the user interface via the RecognizedPockets object. The API provides a more general and customizable interface that is useful for specific applications. The remainder of this page will only be concerned with this more general functionality. Note that the results from the user interface are deliberately restricted to cases that are relatively certain to generate a toolpath that will be safe (non-gouging). Safety is not considered with what's available through the API, and much more care is required when using this functionality. The returned RecognizedPockets object holds a collection of all the pockets in a given solid model that can be reached from a particular tool direction.

In general, RecognizedPockets can be of these types:

  • Pockets with vertical walls parallel to the specified (tool) direction.
  • Pockets with closed island boundaries (not necessarily at the same height as the outer boundary).
  • Through pockets (no bottom surface at all).
  • Pockets with a bottom surface and a variety of corner handling at the corner including fillets, chamfers, sharp corners, and mixtures of these.
  • Open contours: pockets with no continuous wall around the bottom of the pocket.
  • Pockets with top fillets or chamfers are recognized.
  • Nested pockets (with or without shared walls).
The API functions do not support recognizing the following:
  • Bosses
  • Pockets with draft/angled walls

All of the pockets shown in the image below are recognized:

Here are some comments on the pockets above:

  • A1, light green, basic pocket with bottom
  • A2, brown, basic through pocket
  • A3, blue, basic pocket with interior concave sharp point (would not be machinable, but is recognized)
  • A4, yellow, basic pocket with one much larger corner radius
  • A5, green, basic pocket with interior convex sharp point (machinable)
  • B1, yellow, bottom fillet
  • B2, pink, top fillet, recognized
  • B3, purple, bottom chamfer
  • B4, orange, top chamfer, recognized
  • B5, turquoise pocket with partial floor, is identified with a flat bottom
  • C1, red, pocket with island
  • C2, turquoise, pocket with higher island, reports the same as C1
  • C3, gray, pocket with lower island, will be reported as two pockets: a shallow one on top with no island and another below with an island
  • C4, blue, pocket with thru slot, will be reported as two pockets: a shallow one on top and another thru pocket below.
  • C5, light green, pocket with thru slot, same as C4, but the slot is not tangent to the pocket wall
  • D1, pink, nested pocket, will be reported as two pockets, breadth-first
  • D2-D4, purple, orange, and green, and all are the same as D1 with different shared walls
  • D5, dark blue, pocket with some higher boundaries, reported as one pocket
  • E1, E2, E3, dark blue, orange, and brown, all open pockets with different missing walls

Filtering Recognized Pockets

Once the pocket recognition has been run on a solid, the following properties of the RecognizedPocket object are available for additional filtering:

  • boundaries (multiple)
  • islands (multiple)
  • depth
  • isThrough
  • isClosed
  • bottomType: Flat, Through, Chamfer, Fillet, Other

No parameter records whether there is a fillet or chamfer at the top of the pocket.

A general approach for using this functionality is to write filtering functions that are applied to the collection of pockets returned for a specific tool direction. The simplest filtering functions could distinguish between several types of pockets, some of which are shown in the picture below:

  • simple pockets without islands
  • through pockets
  • pockets with islands
  • pockets with depth in a specific range

More complex filters that analyze the properties of the boundary curves could be used to recognize additional pocket types:

  • slots
  • pockets with no interior radius-of-curvature below a specific (tool) diameter
  • pockets larger than a certain minimum width or area

Same as with the PocketRecognitionSelection, the associativity is restricted to the entire body. Additionally, the output of RecognizedPockets is new geometry in the form of a Curve3DPath object and not native B-Rep entities since a pocket may be defined by a curve hanging in the middle of a BRepFace (i.e., the orange pocket in the middle row, fourth column). To use the results in operations, you can find the BRepFace or other entity based on a vertex on the Curve3DPath and use it in the PocketRecognitionSelection, which may not work for some pocket types, as seen above.

Multi-Level and Nested Pockets

In the example above showing the various types of pockets that can be recognized, note that the contours in the RecognizedPockets are always planar. For pockets with multiple levels (nested pockets and islands), you can think of horizontal slices through the part that divides the region into areas with a constant depth. The contour is in the plane at the bottom of each slice, and the reported depth is the thickness of the slice. The slices can be easily seen in the UI preview above (although, as already mentioned, the UI does not recognize all of the examples that can be captured in RecognizedPockets. Pockets C1 and C2 (with islands) will be reported as identical pockets, even though the island sticks up farther in C2. C3 is different because the island is lower and generates a second slice.

Associativity Considerations

Fusion Manufacturing typically creates geometry associatively, meaning the manufacturing strategies will update automatically if the underlying CAD model is changed. In the User Interface, this is accomplished by providing parameters (min and max depth, min and max corner radius) that define which pockets to find. If the underlying CAD model changes, the entire computation to find the pockets is done again. There is (for example) no ability for the user to say "Exclude this particular pocket" because there is no reliable mechanism that would allow the algorithm to determine where that pocket is when re-computing. This approach is associative for all practical purposes, but it does impose restrictions.

The RecognizedPockets object in the API also is not associative. The returned contours are new geometry (Curve3DPath) that do not have any relationship to any faces or edges in the model. It can be easily seen in the images above that, in many cases, there is no edge of the original model that corresponds to contour geometry. This is especially true for the complicated interactions in the island and nested pocket cases but it is also an issue for simple pockets that contain fillets or chamfers on the top or bottom edges.

Same as with the PocketRecognitionSelection, the associativity is restricted to the entire body. Additionally, the output of RecognizedPockets is new geometry in the form of transient geometry objects and not native B-Rep entities since a pocket may be defined by a curve hanging in the middle of a BRepFace (i.e., the orange pocket at C4). To use the results in operations, you can find the adjacent BRepFace or other entity based on a vertex using the findBRepUsingPoint method. This technique is demonstrated in the Hole and Pocket Recogition Sample

There are also cases where the model doesn't contain geometry that can be used to create the desired pocket operation. In this case, you can create a sketch based on the geometry returned in the Curve3DPath and use it with the SketchSelection. This approach is also demonstrated in the Hole and Pocket Recogition Sample.


holeFeatures.add with Counterbore

Description

Demonstrates the holeFeatures.add method using the createCounterboreInput method. The hole is positioned at the center of the selected edge.

Code Samples

  • Python
def demo_holeFeatures_add_counterbore(rootComp: adsk.fusion.Design.rootComponent):
    # Have the face and edges selected.
    face: adsk.fusion.BRepFace = _ui.selectEntity('Select a face', 'Faces').entity
    edge: adsk.fusion.BRepEdge = _ui.selectEntity('Select edge', 'Edges').entity

    # Define the needed inputs.
    holeDiam = adsk.core.ValueInput.createByString('10 mm')
    holeDepth = adsk.core.ValueInput.createByReal(5)
    counterboreDiam = adsk.core.ValueInput.createByString('20 mm')
    counterboreDepth = adsk.core.ValueInput.createByString('3 mm')
    offset1 = adsk.core.ValueInput.createByReal(4)
    offset2 = adsk.core.ValueInput.createByReal(6)

    holeFeatures: adsk.fusion.HoleFeatures = rootComp.features.holeFeatures
    input = holeFeatures.createCounterboreInput(holeDiam, counterboreDiam, counterboreDepth)
    input.setDistanceExtent(holeDepth)
    facePoint = face.pointOnFace
    input.setPositionOnEdge(face, edge, adsk.fusion.HoleEdgePositions.EdgeMidPointPosition)
    holeFeature = holeFeatures.add(input)


holeFeatures.add with Countersink

Description

Demonstrates the holeFeatures.add method using the createCountersinkInput method and postions the hole in the center of a selected circular edge.

Code Samples

  • Python
def demo_holeFeatures_add_countersink(rootComp: adsk.fusion.Design.rootComponent):
    # Have the face and edges selected.
    face: adsk.fusion.BRepFace = _ui.selectEntity('Select a face', 'Faces').entity
    circleEdge: adsk.fusion.BRepEdge = _ui.selectEntity('Select circular edge', 'CircularEdges').entity

    # Define the needed inputs.
    holeDiam = adsk.core.ValueInput.createByString('20 mm')
    holeDepth = adsk.core.ValueInput.createByReal(5)
    countersinkDiam = adsk.core.ValueInput.createByString('35 mm')
    countersinkAngle = adsk.core.ValueInput.createByString('120 deg')

    holeFeatures: adsk.fusion.HoleFeatures = rootComp.features.holeFeatures
    input = holeFeatures.createCountersinkInput(holeDiam, countersinkDiam, countersinkAngle)
    input.setDistanceExtent(holeDepth)
    input.setPositionAtCenter(face, circleEdge)
    holeFeature = holeFeatures.add(input)


JavaScript Specific Issues

Fusion 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 when the script is loaded. It then gets the Fusion 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 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 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.

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 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 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 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 dynamically adding the script at runtime along with some additional parameters to force the JavaScript to be loaded each time.


Using the MFGDM API with the Fusion desktop API

Overview
DataComponent Object
Knowing when the MDGDM Data is Available
Understanding modelId and componentId
Legacy PartNumber and PartDescription Desktop API
Samples

Overview

This topic introduces recent enhancements to the Fusion Desktop API that enable interoperability with the MFGDM GraphQL API, Autodesk’s cloud-based service for managing and querying design data. For more details, see the documentation specific to the MFGDM GraphQL API

Historically, most properties accessible through the Desktop API were held in memory and available locally. However, with the shift toward managing some of this data in the cloud via the MFGDM service, certain properties (PartNumber, PartDescription) reside in the cloud and require a different mechanism to access them efficiently and reliably.

To support this change, the Fusion Desktop API now exposes new properties (such as mfgdmModelId and timestamp) and events (such as MFGDMDataReadyEvent) that allow client applications to coordinate with the MFGDM GraphQL API. These additions make it possible to retrieve cloud-managed data in a robust and time-aware manner.

This topic will explain:

  • The motivation for this change.
  • How to use the new API properties and events in conjunction with the MFGDM GraphQL API.
  • A complete example workflow, including how to fetch cloud-backed metadata like part numbers.

By using the MFGDM GraphQL API, you gain improved performance and flexibility when working with cloud-managed data, as you can query precisely the information you need from multiple components in a single request.

DataComponent Object

The DataComponent object in the Fusion Desktop API has been enhanced to support interoperability with Autodesk’s MFGDM GraphQL API. This object provides a bridge between the local design representation and the underlying cloud MFG DM model. It exposes key metadata that enables clients to identify and synchronize with the correct model version in the cloud.

The DataComponent exposes properties such as mfgdmModelId (a timeless identifier) and timestamp (indicating the time at which the model data was fetched). These identifiers are essential when interacting with cloud APIs such as GraphQL.

How to Access the DataComponent

  • From the root of the design:
    Use design.rootDataComponent to access the DataComponent associated with the top-level model.
    design: adsk.fusion.Design = args.document.products.itemByProductType('DesignProductType')
data = design.rootDataComponent
app.log(f'root model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')
  • From individual occurrences:
    Each Occurrence object in the design may also expose its own dataComponent, allowing access to metadata for inserted subassemblies or components.
    for occ in design.rootComponent.allOccurrences:
    if data := occ.dataComponent:
    app.log(f'occurence: {occ.fullPathName}, model id: {data.mfgdmModelId}, timestamp: {data.timestamp}')

This structure ensures that clients can retrieve cloud model metadata not only for the full design but also for each part or subassembly in the hierarchy—supporting workflows like part tracking, versioning, and GraphQL queries at any level of the model tree.

Key Properties

mfgdmModelId
This property returns the unique model ID associated with the current design or the inserted component if obtained from an Occurrence. It serves as a reference for querying component properties via GraphQL APIs.

timestamp
The timestamp property indicates the time at which the model data was fetched. This datetime value is useful for tracking when the model snapshot was retrieved. In scenarios where the model is fetched “at-tip” (i.e., the latest state), this value may be empty string.

These properties ensure that client working with the Fusion Desktop API can track cloud-sourced models accurately, providing consistent integration across local and remote data environments.

Knowing when the MDGDM Data is Available

Accessing cloud-based model metadata—such as the mfgdmModelId and timestamp from the DataComponent—requires the model to be saved and successfully registered with the cloud (MFG DM). This process may take some time after saving, during which the data is not immediately available.

To ensure these values are accessed only when they are ready, the Fusion Desktop API provides a specialized event: MFGDMDataReady.

Why this Event is Needed

While the standard documentOpened event indicates that a document is available in the local environment, it does not guarantee that the cloud metadata (MFG DM IDs) has been populated. In scenarios involving newly saved designs or first-time cloud syncs, there can be a delay between document save and metadata availability.

This delay introduces uncertainty for clients that rely on cloud model IDs (mfgdmModelId) to call MFGDM GraphQL APIs or perform downstream cloud operations. As a result, you cannot assume that model IDs will be immediately available for unsaved designs or even for saved designs immediately after opening.

Moreover, this event is also required after saving a design that includes newly added local components. These components are only registered in the cloud after the save, and their corresponding occurrence DataComponent information (including model IDs) will become available only after the MFGDMDataReadyEvent fires again.

MFGDMDataReady Event

The MFGDMDataReady event is triggered once the MFG DM metadata—such as the model ID and timestamp—is fully initialized and ready to be accessed. This ensures a reliable point at which clients can safely retrieve the values and proceed with further processing.

This event is also essential in dynamic assembly workflows—for example, when inserting new assemblies or subassemblies into the design. In such cases, the newly inserted components also require a brief processing window for the cloud metadata to become available. The MFGDMDataReadyEvent ensures the application is notified only when those new components' model IDs are ready for use, avoiding premature access and potential errors.

By subscribing to this event, clients can reliably coordinate the timing of GraphQL API calls and other model-dependent operations in both document load and insertion scenarios.

Understanding modelId and componentId

When working with components and assemblies in Fusion’s cloud-backed environment (MFGDM), it’s important to understand the distinction between two key identifiers: modelId and componentId. These serve different purposes and are used in different contexts, especially when querying data via GraphQL.

modelId (also referred to as mfgdmModelId)

  • The modelId is a timeless, unique identifier for a component or assembly in the MFGDM cloud environment.
  • It is persistent and invariant — it does not change across different versions or states of the component.
  • Think of the modelId as the identity of the component in the cloud world. No matter how the component evolves (changes in geometry, parameters, or metadata), its modelId remains constant.
  • We intentionally use modelId in client applications to abstract away the internal cloud storage or versioning details, providing a clean and consistent way to reference a component.

componentId

  • The componentId is a time-specific identifier that represents the exact state (geometry, features, properties) of a component at a particular point in time.
  • It is derived from the combination of modelId and a specific timestamp.
  • This ID is useful when you need to track or compare how a component has evolved over time. For instance, a component might have a different part number in one version and another in different version — each of those versions will have the same modelId but a different componentId.

Legacy PartNumber and PartDescription Desktop API

Historically, legacy APIs for PartNumber (PN) and PartDescription (PD) on the desktop side did not require a save operation to function correctly.

With the support of direct GraphQL APIs, properties can be fetched in bulk together, improving performance compared to the legacy method which will now make individual GraphQL calls. However, there is a significant change to note: these properties now require the document to be saved before they can be accessed and edited, due to their nature as cloud properties. This is a crucial adjustment as unsaved documents will not support editing these properties through scripts.

Observation and Limitations

When the root document is not saved:

  • Root Component:
    Legacy PN/PD set property works as it goes through the cache route and reflects after save.
  • Add new internal component (unsaved):
    Legacy PN/PD set property works as it goes through the cache route and reflects after save.
  • Add new external component (unsaved):
    Legacy PN/PD set property works as it goes through the cache route and reflects after save.

When the root document is saved already:

  • Root Component:
    Legacy PN/PD set property works as it goes through the new GraphQL route.
  • Add new internal component (unsaved):
    ❌ Legacy PN/PD set property fails as it goes through the new GraphQL route and internal component doesn’t have a valid model ID.
  • Add new external component (unsaved):
    Legacy PN/PD set property works as it goes through the cache route and reflects after save.

This limitation highlights the necessity of saving the document to ensure proper functionality of cloud-integrated properties and the improvement graphql support is providing to avoid performance hits with individual fetching of properties.

It is essential for developers to understand this limitation and the transition from the legacy system to effectively leverage the new API enhancements and ensure smooth interoperability between desktop and cloud services.

Samples

There are three samples that demonstrate calling the MFGDM API using the GraphQL API to get and set properties.

  • Set part number using the MFGDM GraphQL API
  • Get the part number from components using the MFGDM GraphQL API
  • Gets all properties using the MFGDM GraphQL API


Script Error

The message you received results from an add-in loaded on your machine that has compiled Python code that will be incompatible with the next update of Fusion or is incompatible with the current version of Fusion. This message is displayed when Fusion upgrades to a newer version of Python, and add-ins compiled against the previous version will no longer work.

If the message says, "The script will not be supported in the next version.", this is a warning telling you Fusion will no longer be able to load this add-in with the next Fusion update. When you get the update and the add-in quits working, you'll need to get an updated version of the add-in from the Autodesk App Store or directly from the app developer. Unfortunately, you can't preemptively get a newer version because the new version of the add-in will not function with the current version of Fusion, you will need to wait until after the update.

If the message says, "The script is not supported in the current version.", this is an error indicating Fusion could not load the add-in. You need to get an updated version of the add-in from the Autodesk App Store or directly from the app developer. App developers are contacted to let them know they will need to update their apps to be compatible with the new Python version, and the updated apps should be available as soon as the Fusion update goes out. If an update is not available, you should contact the app developer.

App Developers

If you're a developer of an add-in for Fusion, use Python, and deliver any pre-compiled modules (.pyc files) with your add-in, this update will break your add-in. It will be broken because pre-compiled modules are tied to the version of Python used to compile them. Add-ins compiled with the current version of Python (3.7) will not be compatible with the updated Python (3.9) and will fail to load. This change DOES NOT affect any add-ins that do not deliver any pre-compiled modules and the.py source code is available. For detailed information about what you need to do to update your add-in and have it available for your customers at the time when the Fusion update goes out, see this forum post with the latest information.


Opening Files from a Web Page

It’s possible to initiate the opening of files in Fusion 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 is installed it registers a protocol handler, which when referenced by a link in a webpage will open a specified file in Fusion. 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 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 file.

<a href="fusion360://host/?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 protocol handler you define a URI that begins with “fusion360://”, as highlighted in the example below.

<a href="fusion360://host/?command=open&file=c%3A%2Ftemp%2FSampleGear.f3d">Open a local file</a>

The "host/?" section is optional but is recommended. It defines an authority for the URL and resolves a problem that was found where using the protocol handler fails on some browsers if it is not included. The commonly used browsers haven't demonstrated any problems but it is possible in the future they may become more strict and require it. All of the samples below include it.

<a href="fusion360://host/?host/?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://host/?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. 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 is running, a new design is created inside the running session. If Fusion 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://host/?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/ExtraFiles/SampleGear.f3d".

<a href="fusion360://host/?command=open&file=http%3A%2F%2Fhelp.autodesk.com%2Fcloudhelp%2FENU%2FFusion-360-API%2FExtraFiles%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 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 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://host/?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 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 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://host/?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 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://host/?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 what type of file is being inserted. By default, Fusion relies on the extension of the file and will automatically use the appropriate translator to import the data into the Fusion 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 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/ExtraFiles/SampleGearNoExtension”.

<a href="fusion360://host/?command=insert&file=http%3A%2F%2Fhelp.autodesk.com%2Fcloudhelp%2FENU%2FFusion-360-API%2FExtraFiles%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 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://host/?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 when a component is created with either "open" or "insert". Fusion 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 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 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 doing some work whenever a component is inserted. When a component is inserted, Fusion 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 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. 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 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. 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. 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 and Browser Command Inputs

Palette Introduction

Palettes provide a very different way of interaction than the typical script or command. However, you are already used to seeing and working with palettes because Fusion 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:

  1. A palette is not associated with a command and does not have the same lifetime rules that a command has.
  2. A palette remains displayed while the user runs commands and interacts with Fusion.
  3. A palette is not associated with a particular document and will remain displayed while the user remains in the currently active workspace.
  4. 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. Using HTML allows you to display anything in a palette in any way that you want, assuming you can define it using HTML. One way to think of a palette is as a floating browser within Fusion.

Your add-in and the HTML/JavaScript code loaded in the palette communicate with each other via events. Your add-in can call a method that results in an event 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 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 the edges of the Fusion window and other palettes. However, unlike a command dialog, you have complete control over this with a palette.

Creating Palettes

Palettes are created using the add method of the Palettes collection object, which you obtain from the UserInterface object using its palettes property. Like other collections, you can also get all the existing palettes through this collection, including the standard (built-in) Fusion palettes. For example, the code below creates a new custom palette.

palette = _ui.palettes.add('myPalette', 'My Palette', 'palette.html', False, True, True, 300, 200, True)

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. The second argument is the name as displayed at the top of the palette. The third argument references the HTML file to load into the palette. The HTML file can be defined using a full path to a file on disk or a relative path relative to the .py, .dll, .dylib file of the add-in. The example above assumes that "palette.html" is in the same location as the .py, .dll, or .dylib file. You can also reference an HTML file on the web using a URL, such as in the example below.

palette = _ui.palettes.add('myPalette', 'My Palette', 'http://www.autodesk.com', False, True, True, 300, 200, True)
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 the palette should be resizable. By first creating a palette invisibly, you can set some other properties before making it visible, which the example above takes advantage of to set the position. For example, a palette displaying the Autodesk website with a "Close" button is shown below.

The next two arguments define the initial width and height of the palette. The final argument specifies if the palette should use the older CEF (Chromium Embedded Framework) browser or use the new Qt Web Browser within the palette. Fusion is switching from CEF to the Qt Web Browser to support embedded browsers in the product. While this transition occurs, Fusion is supporting both web browsers. This argument is optional and defaults to False, which means existing add-ins that don't specify this argument will behave as before and use the CEF browser. Setting the argument to True will cause the palette to use the new QT Web Browser.

When Fusion completes the transition to the QT Web Browser, support for the CEF browser will be removed from Fusion, and you will always get a QT Web Browser regardless of how the argument is set. Because of this, it is highly recommended you set this argument to true to use the new browser because when support for the CEF browser is removed, you will automatically be forced to use the QT Web Browser. The only known difference between the two is when using the adsk.fusionSendData function described below.

BrowserCommandInput Introduction

BrowserCommandInputs are used as part of a command. They are created the same as all other types of command inputs. In the command created event associated with the command, you call the various add methods on the CommandInputs collection to create the desired command inputs. Once they are created they are similar to palettes with how you interact with them.

The picture below is a simple example where two BrowserCommandInputs have been added to the command dialog. BrowserCommandInputs behave like other command inputs in that they are displayed in the same sequence they were created, and they have a name displayed on the left with the browser on the right. The first BrowserCommandInput looks very similar to a textbox command input but adds a button beside the text field.

Browser Command Input

The second BrowserCommandInput demonstrates creating a table that is difficult with standard command inputs. It is possible to use a TableCommandInput to display tabular data, but the TabCommandInput is used to arrange other command inputs, not to display data. With a BrowserCommandInput, a table is easily defined in HTML. Notice that in this case, it doesn't have a name to the left. All command input types can expand to the entire width of the dialog by setting their isFullWidth property to True.

Communication Between the Add-In and the Palette or BrowserCommandInput

Being able to have a floating browser window or a browser in your command dialog is useful but not very powerful by itself, especially when you want to use it for interaction with the user and the model. The referenced HTML can be very sophisticated, where you can use CSS and JavaScript code to make the content of the palette or command input dynamic. But where it can become much more powerful is when your add-in and the JavaScript associated with the HTML communicate. This two-way communication allows 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 or BrowserCommandInput object that you created, as shown below. Two arguments let you pass two strings to the JavaScript code through the event. The first argument is 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 regular use of the arguments, but Fusion doesn't validate the data being passed and makes no assumptions about what they contain 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 a string and is passed back to your add-in as the return argument of the sendInfoToHTML method. Returning an empty string 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. There are two arguments, the same as in the sendInfoToHTML function: one for the action and one for the data. The data is passed to your add-in in Fusion, which it receives by handling the incomingFromHTML event of the Palette object. The values of the two arguments are accessed by your add-in through the HTMLEventArgs object passed into the event handler. Your add-in can also pass a return value back to your HTML by using the returnData property of the HTMLEventArgs object.

The behavior of the adsk.fusionSendData function is different depending on if you are using the old (CEF) or new (QT) web browser. The difference is in how you obtain the return value from Fusion. With the old browser, the fusionSendData call was synchronous, which meant that your JavaScript execution was halted while it waited for Fusion to handle the event and pass back the result. The return value of the function is the value that the add-in provided through the returnData property of the HTMLEventArgs object. With the new browser, the fusionSendData call is asynchronous, which means the JavaScript code does not wait for the return but continues execution. The return value in this case is a "Promise" which results in a JavaScript function being called when the function returns. The code below illustrates using the old browser and getting the return value direction from the fusionSendData call which it then uses to update some text in the HTML.

function sendInfoToFusion(){
    // Bundle the data into a JSON string.
    var args = {
        arg1 : 'Sample argument 1',
        arg2 : 'Sample argument 2'
    };

    // Call the Fusion function to pass the data and trigger the incomingFromHTML event in the add-in.
    var result = adsk.fusionSendData('send', JSON.stringify(args));
    document.getElementById('returnValue').innerHTML = result
}

The code below is a slightly modified version that can be used with the new browser where a Promise is returned and then the return value is gotten from the Promise and used to update the text.

function sendInfoToFusion(){
    // Bundle the data into a JSON string.
    var args = {
        arg1 : "Sample argument 1",
        arg2 : "Sample argument 2"
    };

    // Call the Fusion function to pass the data and trigger the incomingFromHTML
    // event in the add-in and get the return value by using the returned Promise.
    adsk.fusionSendData("messageFromPalette", JSON.stringify(args)).then((result) =>
        document.getElementById('returnValue').innerHTML = '${result}'
    );

Below is an example of the handler for a pallete 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 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()))

Handling the HTML event for BrowserCommandInput objects is very similar except the event is the incomingFromHTML event available on the Command object. A single event sink is used for all the BrowserCommandInput objects you've created for the command. You use the browserCommandInput property of the HTMLEventArgs object that is passed into the event to determine which BrowserCommandInput the event is coming from.

You can see all of this in action with the Palette sample program and the BrowserCommandInput sample.

Debugging

By default, the ability to use the browser developer tools is not available for the palette browser. However, there is a preference you can change so the browser developer tools are enabled, and you can debug your browser code. The preference is shown below.

Palette Lifetime

It's already been mentioned that palettes do not behave like commands and remain displayed, even while commands are running. It's up to you to show and either delete or hide them. However, Fusion deletes all palettes when the user switches workspaces. For example, when they switch from Design to Manufacturing. Suppose you've created a palette and did not delete it, and the user switches workspaces. In that case, the Palette object you're referencing is no longer valid, the isValid property will return False, and no other functionality on the object will work. You can re-create the palette as needed. You can also handle the UserInterface.workspacePreActivate event and delete it then.


Test of the Prism JS Library

Test of the Prism Javascript Library

This page is to get the integration of the Prism Javasript Library in the Fusion help system.

Below is some sample code that should have line numbers and support copying the code.

# Get the current position of the timeline marker.
currentPstn = design.timeline.markerPosition

# Reposition the timeline marker to just before the Arrange feature.
arrangeFeature.timelineObject.rollTo(True)

# Make the desired changes to the Arrange feature.
arrangeFeature.definition.grainDirection.value = math.radians(10)
arrangeFeature.envelopeDefinition.frameWidth.value = 0.5
arrangeFeature.envelopeDefinition.isPartialArrangeAllowed = True

# Reposition the timeline marker to its original position.
design.timeline.markerPosition = currentPstn

Uses the css below.

To allow this to work, the following was added to APIHelp.css to make the line numbers and the code the same size so they line up.
/* This is to allow line numbers with the prism library to display the
   same size as the code. */
pre[class*=language-]
{
    font-size: 13.5px!important;
}
And, the following is added below the element.
<body>
<link rel="stylesheet" href="../Style/APIHelp.css">
<link rel="stylesheet" href="../Style/prism.css">
<script src="../Scripts/prism.js"><!--filler--></script>
<style>
pre.line-numbers [aria-hidden=true]
{
    display: block!important;
}
</style>


Python Specific Issues

Fusion has a single API that can be used from either Python or C++. In most cases, the API is used in a very similar way regardless 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.

  • Creating Add-Ins with Python
  • Editing and Debugging
  • Reference Arguments
  • Working with Collections and Arrays
  • Object Types
  • Object Equality
  • Code Hints
  • Additional Python Modules
  • Miscellaneous

Creating Add-Ins with Python

To create a new Python add-in you use the "Create" button in the Scripts and Add-Ins dialog to display the "Create New Script or Add-In" dialog and choose "Python" as the programming language, as shown below.

Creating a new Python add-in will create a full add-in that you can immediately run. It provides a framework that you can edit to modify it to support the functionality your add-in requires. You can read more about the add-in template it creates and how to use it in the Python Add-In Template topic in the User Manual.

Editing and Debugging a Python Script or Add-In

When editing or debugging a Python script or add-in, the VS Code IDE (Integrated Development Environment) will be displayed. The VS Code IDE and the Python code created for a new script can be seen below.

An important feature of any development environment is the ability to debug your program. To debug Python code, VS Code requires the optional “ms-python.python” extension. This extension is automatically installed the first time Fusion opens VS Code.

You can edit your script or add-in from within VS Code by running the Scripts and Add-Ins command, selecting the script or add-in, and clicking the "Edit" button, as shown below.

This will open the script in VS Code. Click on the left edge of the code window to add break points where you want execution to stop while debugging, as shown below.

To start debugging, run the "Start Debugging" command by running it from the "Run" menu, as shown below, or using F5. Fusion will start executing your script but will stop execution at the first break point it hits.

The picture below shows VS Code after we've started debugging the script. Execution has stopped at a breakpoint at the messageBox line and some other windows are now displayed with some additional information that can be useful when debugging.

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 doesn't currently work with Fusion Scripts or Add-Ins.
  • Disconnect the debugging session. When you've finished debugging you'll need to click this button to stop debugging. You can then further edit your program and start debugging again.

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. Below is the result when I hover over the variable called ui that's referencing the UserInterface object. It shows all of the properties the UserInterface object supports and their current values.

When you've finished debugging click the "Disconnect" button to stop debugging. You can then further edit your program and start debugging again. When debugging a script you can stop and restart it over an over again from within VS Code. Debugging an add-in is slightly different.

When you run a script, Fusion loads the script, runs it, and unloads it. Add-ins are different in that they are typically automatically loaded and run by Fusion when Fusion starts. They continue to run in the background until Fusion is shutdown. Before debugging an add-in you need to make sure it isn't already running, and if it was you need to stop it. While initially writing your add-in it's good pracitve to uncheck the "Run on Startup" setting (as shown below) in the "Scripts and Add-Ins" dialog so Fusion doesn't automatically start it on start-up. Add-ins that are running will have the little wheel beside them. if it's running, click the "Stop" button. Now you can debug the add-in.

Start debugging the add-in from within VS Code the same way as you would debug a script. Fusion loads the add-in and calls the run method, just like it does for scripts. Typically an add-in will create it's user-interface and connect to events in the run method and then run in the background waiting for an event to fire. Starting to debug the add-in will execute the run method and then appear to be done but the add-in is still running but waiting to respond to an event which is typically the execution of one of its commands. Switch to Fusion and run the add-in command. Any break points in the command created event handler will now be hit and you can debug the command execution.

When an add-in is stopped using the "Stop" button in the "Script and Add-Ins Dialog", Fusion calls the add-in's stop method to allow it to clean up before it's unloaded. Typically, the stop function removes any user-interface items the add-in added when it was loaded. To stop an add-in in a controlled way, you can switch back to Fusion and from the "Scripts and Add-Ins" dialog, choose the add-in and click "Stop". This will cause the stop method to be called and any break points will be hit allowing you to debug the stop function.

If you intentionaly disconnect the debugging session or are forced to stop debugging because of a bug, you'll halt the execution of the add-in before it has a chance to stop. Even though you've disconnected the debugger, the add-in is still running in Fusion. You can stop it using the "Scripts and Add-Ins" dialog. However, if you start debugging the add-in from VS Code, Fusion will call the add-in's stop method before starting the new debug session.

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 and Arrays

Fusion 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 Python interface support the standard Python container iteration and length syntax so you can choose between 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 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.
    •

The API also frequently uses what is referred to in the documentation as an "array". The term "array" is used generically in the API documentation and describes different things depending on the language being used. When using C++, std::vector is used to input and output a list of items. When an array is specified as input, you can create a Python List or Tuple and use that. However, when an array is returned from a method or property, it's not returned as a standard Python List but is a special API-specific object called "vector". Typically, you won't notice this isn't a List because it supports Python iteration like a List does. However, there are other things that a list supports that a vector does not. For example, you can't use append to add items. You can easily convert the vector into a standard Python List, as shown in the example below.

# Explode the sketch text and get the resulting curves.
curves = skText.explode()

# Convert the returned vector into a Python List.
curvesList = list(curves)

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 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 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 you type the period after app, it shows the list of methods and properties supported by the Application object. The same is true when you 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 return 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 type that is derived from Product. When working with a model 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 help the IDE understand the type of variables so it can show the appropriate code hints. There are two ways to do this in Python; type hints and casting. You do this in Python by using the static "cast" function.

Type hints is a Python feature that is new since Python 3.5. It let's you declare variables with the type. This information is not used by Python at runtime but is only used by the IDE to provide better code hints. The code below is an example of specifying the variable "des" is a Design object. The IDE will now treat this variable as Design type. Because Python doesn't use this information, there isn't any validation performed at runtime. If the Manufacturing workspace is active when this code is run, the des variable will be assigned a CAM object and the execution will continue where it will likely fail later when a call is made that expects it to be a Design product. See the section above on Object Types for ways to determine the type of an object.

# Get the active Design product.
des: adsk.fusion.Design = app.activeProduct

# Now there will be good code hints for the variable "des".

Type hints can also be used for function arguments and the return value of a function, as shown below. See the Python documentation more information about the full capabilities of type hints.

def CheckIfHollow(body: adsk.fusion.BRepBody) -> bool:
    if body.shells.count > 1:
        return True
    else:
        return False

Another method of getting better code hints is the "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, which is different than using type hints.

Here's an example of where using the "cast" function can be useful. When using the UserInterface.activeSelections property you can get back any type of object that can be selected. The actual entity being selected is returned by the Selection.entity property which is typed to return a Base object, which is what all Fusion objects are derived from and is not very useful for code hints. If you know the type of object that will be selected or only want to handel a specific object type, you can use the cast function to check if the expected type is selected, 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

Additional Python Modules

Many modules have been written for Python to expand its capabilities. The Python provided with Fusion 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 process and also runs in the main Fusion thread. Because of this, when your program is running must of Fusion 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 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 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 a chance to react.
                adsk.doEvents()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Using the Python Add-in Template

Introduction to the Python Add-In Template

Since add-ins were first supported in Fusion, the code shown below was created when you created a new 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 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()))

This code is a valid add-in and demonstrates the bare minimum functionality of an add-in: automatically load at start-up, continue running the entire fusion session or until the user explicitly unloads it, and handle when the add-in is unloaded. This add-in has these capabilities but does nothing to illustrate how to take advantage of them and create a useful add-in.

When you create a new add-in now, a small add-in (referred to as the add-in template) is created that demonstrates the API capabilities typically used within an add-in and provides a framework to simplify development. If you run the add-in after creating it, you will see that it adds three new commands into the ADD-INS panel, as shown below.

Here's a quick summary of the functionality each of the three commands demonstrates.

Command Dialog Sample – This command illustrates what at least 95% of all commands do; add a button to the UI, display a command dialog to get information from the user, and do something when the OK button is clicked. When you run this command, the dialog shown below is displayed.

Python Command Dialog Sample

You can use this command to jump-start the creation of your commands that use a dialog. The things you'll change are the location of the command button in the UI, the icon, the name of the command, the inputs in the dialog you need the user to provide, and the action that occurs when the user clicks OK. How you'll make these changes is described in more detail below when we look at the add-in code.

Show My Palette – This command illustrates the basics of using the palette functionality of the API, and when you click it, the dialog shown below is displayed. A palette is a dialog whose content is defined by rendering an HTML file. This sample command demonstrates how to display a palette and how your HTML and associated JavaScript can interact with your add-in.

Python Show Palette Sample

Send to Palette – This command works with the palette created by the previous command and demonstrates how your add-in can interact with the HTML and JavaScript associated with the palette. Before running this command, you should run the Show My Palette command, so the palette is displayed. When you run this command, the dialog shown below is displayed. You can edit the values in the dialog and click OK; the information will be displayed in the palette.

Python Send To Palette Sample

Modifying the New Add-In

In addition to demonstrating the add-in functionality, the newly created add-in also uses an architecture that makes extending the add-in to support additional commands much easier than it has been in the past. First, let's look at the details of what is created when you create a new Python add-in. Below is the complete folder structure of a new add-in.

Python Template Files

Add-In Library Files

Before looking at the files you'll want to change, some utility functions are provided to simplify things, especially when working with events. These are all defined in the "lib" folder, and you won't need to do anything to these files. You'll see import statements to "fusion360utils," which results in referencing functions defined in event_utils.py and general_utils.py.

Basic Add-In Files

There are three files in the top-level folder of the add-in; config.py, MyFirstAddIn.manifest, and MyFirstAddIn.py. The .py and .manifest files that have the same name as the add-in, are the two files required for any add-in.

The MyFirstAddIn.py file contains the run and stop functions, which are called by Fusion when the add-in is loaded and unloaded. The code in this .py is very simple since all the run function does is call another function to load the commands. And all the stop function does is call two functions; one to clean up the UI and another to unload the commands, as shown below. Because this code is generic, you don't need to edit this .py file.

# Assuming you have not changed the general structure
# of the add-in no modification is needed in this file.
from . import commands
from .lib import fusion360utils as futil

def run(context):
    try:
        # This will run the start function in each of your
        # commands as defined in commands/__init__.py
        commands.start()
    except:
        futil.handle_error('run')

def stop(context):
    try:
        # Remove all of the event handlers your app has created.
        futil.clear_handlers()

        # This will run the stop function in each of your
        # commands as defined in commands/__init__.py
        commands.stop()
    except:
        futil.handle_error('stop')

The .manifest file contains information about the add-in that Fusion uses to display the add-in in the "Scripts and Add-Ins" dialog and know when to load it. The contents of the .manifest file is explained in detail in the Creating Scripts and Add-Ins topic.

The config.py is used to manage global variables. Unfortunately, Python doesn't support global variables between components, but this serves as a workaround to define them in a module and then import the module where access is needed. There are three variables here that you need to be aware of. The first is the DEBUG setting which defines if your add-in should run in debug mode or not. If it is in debug mode, it will print out information to the TEXT window as it is running. Having this information is useful when you're writing and debugging your add-in. When you are ready to deliver your add-in, you can set this to False. The other setting you should change is the value assigned to the COMPANY_NAME variable. This name is used to help create unique names for UI elements. Finally, you'll want to edit the sample_pallete_id to a name that makes sense for your palette, or if you're not using palettes in your add-in, you can delete this line.

# Application Global Variables
# This module serves as a way to share variables across different
# modules (global variables).

import os

# Flag that indicates to run in Debug mode or not. When running in Debug mode
# more information is written to the Text Command window. Generally, it's useful
# to set this to True while developing an add-in and set it to False when you
# are ready to distribute it.
DEBUG = True

# Gets the name of the add-in from the name of the folder the py file is in.
# This is used when defining unique internal names for various UI elements
# that need a unique name. It's also recommended to use a company name as
# part of the ID to better ensure the ID is unique.
ADDIN_NAME = os.path.basename(os.path.dirname(__file__))
COMPANY_NAME = 'ACME'

# Palettes
sample_palette_id = f'{COMPANY_NAME}_{ADDIN_NAME}_palette_id'

If you need to share information between commands, you can add your variables to this file.

Defining Your Commands

The area where you'll be doing most of the work when writing your add-in is in the "commands" folder. Each sub-folder within the commands folder represents a command. For example, the commandDialog, paletteSend, and paletteShow folders are in the add-in template. You can delete and add new folders as needed. See the "Quick Helps" section at the bottom of this topic for step-by-step help with common workflows like deleting the palette functionality, so you only have one command dialog command and adding a second command.

Whatever folders you're left with, you'll want to rename them to something that makes sense for your add-in. For example, if I'm writing an add-in to create bevel gears and it has a single command with a dialog, I would delete the two palette folders and rename the "commandDialog" folder to something like "bevelGearDialog".

Once you have a folder for each command your add-in will support, you must edit the __init__.py file in the "commands" folder. For example, for the Bevel Gear command, an import is added for the bevelGearDialog folder, and it is added to the command list. You also need to remove the commands that are no longer needed. The code below shows the changes that were made to do this.

# Here you define the commands that will be added to your add-in.

# TODO Import the modules corresponding to the commands you created.
# If you want to add an additional command, duplicate one of the existing
# directories and import it here.
#
# You need to use aliases (import "entry" as "my_module") assuming you have
# the default module named "entry".
from .bevelGearDialog import entry as bevelGearDialog
from .commandDialog import entry as commandDialog
from .paletteShow import entry as paletteShow
from .paletteSend import entry as paletteSend

# TODO add your imported modules to this list.
# Fusion will automatically call the start() and stop() functions.
commands = [
    bevelGearDialog,
    commandDialog,
    paletteShow,
    paletteSend
]

# Assumes you defined a "start" function in each of your modules.
# The start function will be run when the add-in is started.
def start():
    for command in commands:
        command.start()

# Assumes you defined a "stop" function in each of your modules.
# The stop function will be run when the add-in is stopped.
def stop():
    for command in commands:
        command.stop()

Writing Your Command

As described above, for each command, you should have a folder with your command's name in the "commands" folder. When creating a new add-in, the folders for sample commands have two files (__init__.py and entry.py) and a "resources" folder. The __init__.py folder is empty, and you can ignore it. The resources folder contains the images used for the command button. You'll want to create appropriate images for your command and replace the example images. More information about this can be found in the User-Interface Customization topic. The main code for the command is in the entry.py file, and this is where you'll do most of your work.

Defining the Command's Identity

Each command is unique and has its own identity. Part of that identity is the icon used for the command button. The other parts of the command identity are a unique name, the name the user will see, and the tooltip displayed when the user moves the mouse over the command's button. As shown below, these are all defined in the top portion of entry.py. The "CMD_ID" variable defines the unique ID for this add-in. The ID must be unique to all commands, including the native Fusion commands and commands added by other add-ins. The code below uses the company name defined in config.py and combines it with the name of the add-in and the name of the command to create a unique name. The only thing you need to edit here is the command name portion, which is "cmdDialog" by default. The "CMD_NAME" variable is the command's name that will be displayed to the user, and the value of the "CMD_DESCRIPTION" variable will be used as the tooltip.

# TODO *** Specify the command identity information. ***
CMD_ID = f'{config.COMPANY_NAME}_{config.ADDIN_NAME}_cmdDialog'
CMD_NAME = 'Command Dialog Sample'
CMD_Description = 'A Fusion Add-in Command with a dialog'

Defining the Button Location

Most commands will have a button in the user interface to allow the user to execute the command. You define the location of your command using the section of code in the entry.py file shown below. The IS_PROMOTED variable defines if the command should be displayed in the toolbar for the panel instead of only being available in the panel's drop-down. Promoting is equivalent to the "Pin to Toolbar" option in the user interface. The WORKSPACE_ID, PANEL_ID, and COMMAND_BESIDE_ID are used to define the location where the command will be added to the user interface. Detailed information about the user interface and how to determine the names to use can be found in the Positiong Your Controls section of the User Interface Customization user manual topic.

# Specify that the command will be promoted to the panel.
IS_PROMOTED = True

# TODO *** Define the location where the command button will be created. ***
# This is done by specifying the workspace, the tab, and the panel, and the
# command it will be inserted beside. Not providing the command to position it
# will insert it at the end.
WORKSPACE_ID = 'FusionSolidEnvironment'
PANEL_ID = 'SolidScriptsAddinsPanel'
COMMAND_BESIDE_ID = 'ScriptsManagerCommand'

Writing Your Add-In

The rest of the code in the template is the code that calls the API to define the command, create the button, and react when the button is clicked by creating the command dialog and reacting to some command-related events. This is in the entry.py file for each command. Below is the start function, which is called when the add-in is loaded. The call to the addButtonDefinition function is a standard API call. But you can see all the arguments are coming from the previously defined variables at the top of the file. API functions are also used to add the button into the user interface. Still, the most interesting is the futil.add_handler call that connects to the commandCreated event. The event functionality is described in more detail in the section below.

# Executed when add-in is run.
def start():
    # Create a command Definition.
    cmd_def = ui.commandDefinitions.addButtonDefinition(CMD_ID, CMD_NAME,
                                                        CMD_Description, ICON_FOLDER)

    # Define an event handler for the command created event.
    # It will be called when the button is clicked.
    futil.add_handler(cmd_def.commandCreated, command_created)

    # ******** Add a button into the UI so the user can run the command. ********
    # Get the target workspace the button will be created in.
    workspace = ui.workspaces.itemById(WORKSPACE_ID)

    # Get the panel the button will be created in.
    panel = workspace.toolbarPanels.itemById(PANEL_ID)

    # Create the button command control in the UI after the specified existing command.
    control = panel.controls.addCommand(cmd_def, COMMAND_BESIDE_ID, False)

    # Specify if the command is promoted to the main toolbar.
    control.isPromoted = IS_PROMOTED

Using Events

The add-in template primarily serves as an example showing how to use the API to create a command. It also provides an architecture that makes adding additional commands to an add-in easier. It does not create a wrapper for the API except for one exception: working with events. Previously, it required several lines of code to connect to and handle events when using Python. In addition, using events was more difficult in Python than in C++. Therefore, an event library is included in the add-in template to simplify using events.

The highlighted line below is from the start function and is all that's needed to connect to the command's commandCreated event. futil is the alias for the fusion360utils library, which is imported at the top of the file and contains the add_handler function. cmd_def.commandCreated is referencing the commandCreated event associated with the command definition created at the beginning of the start function. command_created is referencing the function that will act as the event handler.

# Define an event handler for the command created event.
# It will be called when the button is clicked.
futil.add_handler(cmd_def.commandCreated, command_created)

Below is the command_created function, which serves as the commandCreated event handler. The command_created function is called when the user clicks the command button, and it is within this function where you create command inputs to define the different inputs that will be displayed in the dialog. You'll replace the add methods here with the add methods for the inputs you need for your command. Notice at the bottom of this function, there are several more calls to the add_handler function to connect to other command-related events. See the user manual topic on commands to better understand how commands work and the various command-related events.

# Function that is called when a user clicks the corresponding button in the UI.
# This defines the contents of the command dialog and connects to the command related events.
def command_created(args: adsk.core.CommandCreatedEventArgs):
    # General logging for debug.
    futil.log(f'{CMD_NAME} Command Created Event')

    # https://help.autodesk.com/view/fusion360/ENU/?contextId=CommandInputs
    inputs = args.command.commandInputs

    # TODO Define the dialog for your command by adding different inputs to the command.

    # Create a simple text box input.
    inputs.addTextBoxCommandInput('text_box', 'Some Text', 'Enter some text.', 1, False)

    # Create a value input field and set the default using 1 unit of the default length unit.
    defaultLengthUnits = app.activeProduct.unitsManager.defaultLengthUnits
    default_value = adsk.core.ValueInput.createByString('1')
    inputs.addValueInput('value_input', 'Some Value', defaultLengthUnits, default_value)

    # TODO Connect to the events that are needed by this command.
    futil.add_handler(args.command.execute, command_execute, local_handlers=local_handlers)
    futil.add_handler(args.command.inputChanged, command_input_changed, local_handlers=local_handlers)
    futil.add_handler(args.command.executePreview, command_preview, local_handlers=local_handlers)
    futil.add_handler(args.command.validateInputs, command_validate_input, local_handlers=local_handlers)
    futil.add_handler(args.command.destroy, command_destroy, local_handlers=local_handlers)

The help for events has also been enhanced by adding a "Python Using fusion360utils" tab so you can get example code for this new style of using events, as shown below.

Quick Helps

Deleting the Palette Commands

The most common command is one that uses a command dialog so a common workflow will be to create a new add-in and delete the palette commands. Here are the steps to do that.

  1. Delete the lines highlighted below from YourAddIn/config.py.

    # part of the ID to better ensure the ID is unique.
ADDIN_NAME = os.path.basename(os.path.dirname(__file__))
COMPANY_NAME = 'ACME'

# Palettes
sample_palette_id = f'{COMPANY_NAME}_{ADDIN_NAME}_palette_id'

  2. Delete the lines highlighted below from your YourAddIn/commands/__init__.py.

    # Here you define the commands that will be added to your add-in.

# TODO Import the modules corresponding to the commands you created.
# If you want to add an additional command, duplicate one of the existing
# directories and import it here.
#
# You need to use aliases (import "entry" as "my_module") assuming you have
# the default module named "entry".
from .commandDialog import entry as commandDialog
from .paletteShow import entry as paletteShow
from .paletteSend import entry as paletteSend

# TODO add your imported modules to this list.
# Fusion will automatically call the start() and stop() functions.
commands = [
    commandDialog,
    paletteShow,
    paletteSend
]

# Assumes you defined a "start" function in each of your modules.
# The start function will be run when the add-in is started.
def start():
    for command in commands:
        command.start()

# Assumes you defined a "stop" function in each of your modules.
# The stop function will be run when the add-in is stopped.
def stop():
    for command in commands:
        command.stop()

  3. Delete the palleteSend and palletShow folders from the YourAddIn/commands/ folder.

Adding a Command to an Existing Add-in

Another common workflow will be the need to add an additional command to an existing add-in. Here are the steps for that.

  1. Copy the command folder of a similar command. For example, if you already have a makePocket command you can copy the folder and its contents to a new folder in add-in’s commands folder called whatever your new command will be; makePizza in this example.

  2. In the new folder change the names of the .py and .manifest files to use the new name. For example, makePizza.py and makePizza.manifest.

  3. Edit YourAddIn/commands/__init__.py and add the two lines shown below.

    # Here you define the commands that will be added to your add-in.

# TODO Import the modules corresponding to the commands you created.
# If you want to add an additional command, duplicate one of the existing
# directories and import it here.
#
# You need to use aliases (import "entry" as "my_module") assuming you have
# the default module named "entry".
from .makePocket import entry as makePocket
from .makePizza import entry as makePizza

# TODO add your imported modules to this list.
# Fusion will automatically call the start() and stop() functions.
commands = [
    makePocket,
    makePizza
]

# Assumes you defined a "start" function in each of your modules.
# The start function will be run when the add-in is started.
def start():
    for command in commands:
        command.start()

# Assumes you defined a "stop" function in each of your modules.
# The stop function will be run when the add-in is stopped.
def stop():
    for command in commands:
        command.stop()

  4. Edit the contents of entry.py to change the name of the command, its location in the UI and its behavior.


rectangularPattern.add

Description

Demonstrates the rectangularPattern.add method using a selected body and two selected edges to define the directions.

Code Samples

  • Python
def demo_rectangularPatternFeatures_add(rootComp: adsk.fusion.Component):
    body = _ui.selectEntity('Select a body to pattern.', 'Bodies').entity
    directionEdgeOne = _ui.selectEntity('Select direction edge one.', 'LinearEdges').entity
    directionEdgeTwo = _ui.selectEntity('Select direction edge two.', 'LinearEdges').entity

    bodies = adsk.core.ObjectCollection.create()
    bodies.add(body)
    quantityOne = adsk.core.ValueInput.createByReal(4)
    distanceOne = adsk.core.ValueInput.createByReal(5)
    quantityTwo = adsk.core.ValueInput.createByReal(3)
    distanceTwo = adsk.core.ValueInput.createByReal(4)
    patternDistance = adsk.fusion.PatternDistanceType.SpacingPatternDistanceType

    rectangularPatterns = rootComp.features.rectangularPatternFeatures
    input = rectangularPatterns.createInput(bodies, directionEdgeOne, quantityOne, distanceOne, patternDistance)
    input.setDirectionTwo(directionEdgeTwo, quantityTwo, distanceTwo)
    rectangularPattern = rectangularPatterns.add(input)


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.


shellFeatures.add

Description

Demonstrates creating a shell feature.

Code Samples

  • Python
def demo_shellFeatures_add(rootComp: adsk.fusion.Component):
    face = _ui.selectEntity('Select a face to open as part of a shell feature.', 'Faces').entity
    bodiesAndFaces = adsk.core.ObjectCollection.create()
    bodiesAndFaces.add(face)

    shellFeatures = rootComp.features.shellFeatures
    input: adsk.fusion.ShellFeatureInput = shellFeatures.createInput(bodiesAndFaces, True)
    input.insideThickness = adsk.core.ValueInput.createByReal(0.25)
    shellFeature = shellFeatures.add(input)


SketchArcs.breakCurve

Description

Demonstrates the SketchArc.breakCurve method.

Code Samples

  • Python
def demo_Arcs_breakCurve(sketch: adsk.fusion.Sketch):
    # Define three points and create an arc along those points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    alongPoint = adsk.core.Point3D.create(5, 0, 0)
    endPoint = adsk.core.Point3D.create(8, 7, 0)
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByThreePoints(startPoint, alongPoint, endPoint)

    # Draw two lines that cross the arc.
    lines = sketch.sketchCurves.sketchLines
    lineStart = adsk.core.Point3D.create(3, 4, 0)
    lineEnd = adsk.core.Point3D.create(4, -2, 0)
    line1 = lines.addByTwoPoints(lineStart, lineEnd)
    lineStart = adsk.core.Point3D.create(6, 5, 0)
    lineEnd = adsk.core.Point3D.create(7, -1, 0)
    line2 = lines.addByTwoPoints(lineStart, lineEnd)

    # break the arc
    segmentPoint = adsk.core.Point3D.create(5, 1, 0)
    breakCurve = arc.breakCurve(segmentPoint)


SketchArcs.extend

Description

Demonstrates the SketchArc.extend method.

Code Samples

  • Python
def demo_Arcs_extend(sketch: adsk.fusion.Sketch):
    # Define three points and create an arc along those points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    alongPoint = adsk.core.Point3D.create(5, 3, 0)
    endPoint = adsk.core.Point3D.create(8, 0, 0)
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByThreePoints(startPoint, alongPoint, endPoint)

    # Create a line to extend the arc to.
    lineStart = adsk.core.Point3D.create(-2, -3, 0)
    lineEnd = adsk.core.Point3D.create(10, -3, 0)
    lines = sketch.sketchCurves.sketchLines
    line = lines.addByTwoPoints(lineStart, lineEnd)

    # Extend the end point of the arc.
    extendedCurve = arc.extend(endPoint)


SketchArcs.split

Description

Demonstrates the SketchArc.split method.

Code Samples

  • Python
def demo_Arcs_split(sketch: adsk.fusion.Sketch):
    # Define three points and create an arc along those points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    alongPoint = adsk.core.Point3D.create(5, 0, 0)
    endPoint = adsk.core.Point3D.create(8, 7, 0)
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByThreePoints(startPoint, alongPoint, endPoint)

    # Get the midpoint of the arc.
    curveEval = arc.geometry.evaluator
    (_, startParam, endParam) = curveEval.getParameterExtents()
    (_, midPoint) = curveEval.getPointAtParameter((startParam + endParam) / 2)

    # Split the arc
    splitArc = arc.split(midPoint)


SketchArcs.trim

Description

Demonstrates the SketchArc.trim method.

Code Samples

  • Python
def demo_Arcs_trim(sketch: adsk.fusion.Sketch):
    # Define three points and create an arc along those points
    startPoint = adsk.core.Point3D.create(0, 0, 0)
    alongPoint = adsk.core.Point3D.create(5, 0, 0)
    endPoint = adsk.core.Point3D.create(8, 7, 0)
    arcs = sketch.sketchCurves.sketchArcs
    arc = arcs.addByThreePoints(startPoint, alongPoint, endPoint)

    # Creat a line that crosses the arc that will be used to trim to.
    lines = sketch.sketchCurves.sketchLines
    lineStart = adsk.core.Point3D.create(4, -2, 0)
    lineEnd = adsk.core.Point3D.create(5, 3, 0)
    line = lines.addByTwoPoints(lineStart, lineEnd)

    # trim the arc keeping the side where start point is.
    trimmedArc = arc.trim(arc.startSketchPoint.geometry)


Sketches.addToBaseOrFormFeature

Description

Demonstrates the Sketches.addToBaseOrFormFeature method.

Code Samples

  • Python
def demo_Sketches_addToBaseOrFeature(rootComp: adsk.fusion.Design.rootComponent):
    # Create a base feature
    baseFeats = rootComp.features.baseFeatures
    targetBaseOrFormFeature  = baseFeats.add()

    # To make changes to a base feature, it must be in an edit state.
    targetBaseOrFormFeature.startEdit()

    # Create a sketch in the base feature on the XY base plane.
    sketches = rootComp.sketches
    includeFaceEdges = True
    sketch = sketches.addToBaseOrFormFeature(rootComp.xYConstructionPlane, targetBaseOrFormFeature, includeFaceEdges)

    # Exit from the base Feature.
    targetBaseOrFormFeature.finishEdit()


surfaceDeleteFeatures.add

Description

Demonstrates the surfaceDeleteFeatures.add method.

Code Samples

  • Python
def demo_surfaceDeleteFaceFeatures_add(rootComp: adsk.fusion.Component):
    face = _ui.selectEntity('Select a face to delete.', 'Faces').entity
    faces = adsk.core.ObjectCollection.create()
    faces.add(face)

    surfaceDeleteFaceFeatures = rootComp.features.surfaceDeleteFaceFeatures
    deleteSurface = surfaceDeleteFaceFeatures.add(faces)


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 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 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 API, as you'll see in the example below.

It's important to remember that most of Fusion 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. Let's look at how this works with an add-in and a command. When an add-in is loaded, Fusion calls its run function. At that point, your add-in is actively running in the main thread and nothing else is happening in Fusion. Once the run function has completed Fusion 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 takes over to allow the user to interact with the command dialog. As the user does interact with the dialog, Fusion 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 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 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 because it is monopolizing the main thread. Fusion does support a doEvents function which temporarily returns control back to Fusion 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 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 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 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 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 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 (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 API functions within the worker thread. Even calling the messageBox method can sometimes result in Fusion 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 specific work needs to be done by your add-in in the main thread.


Understanding Units in Fusion

Understanding how Fusion uses units is very important in successfully using the API. When using the API the units used by Fusion 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 uses internally and how data is saved in the file. There are some differences in the unit types used in Design and CAM. For Design, these units are:

Lengths - Centimeters (cm)
Angles - Radians (rad)
Mass - Kilograms (kg)

For CAM, the units used by the API are:

Length - centimeters (cm)
Angle - degrees (deg)
Linear velocity – millimeters per minute (mm/min)
Rotational velocity - revolutions per minute (rpm)
Time - seconds (s)
Weight - kilograms (kg)
Power - Watts (W)
Flow rate - liters/minute (l/min)
Area - square centimeters (cm²)
Volume - cubic centimeters (cm³)
Temperature - degrees Celsius (C)

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 works internally. Any time a user enters any data, it is a string and Fusion 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. 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.
isValid = False
input = '1 in'  # The initial default value.
while not isValid:
    # Get a string from the user.
    (input, isCancelled) = ui.inputBox('Enter a distance', 'Distance', input)

    # Exit the program if the dialog was cancelled.
    if isCancelled:
        adsk.terminate()
        return

    # Check that a valid length was entered.
    unitsMgr = design.unitsManager
    if unitsMgr.isValidExpression(input, unitsMgr.defaultLengthUnits):
        realValue = unitsMgr.evaluateExpression(input, unitsMgr.defaultLengthUnits)
        isValid = True
    else:
        # 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 + '\nResult: ' + str(realValue) + ' cm')

When you get a value from Fusion 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.
unitsMgr = design.unitsManager
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 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".

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 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.
extrudes = rootComp.features.extrudeFeatures
extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

# Define that the extent is a distance extent and is half the depth of the part.
distVal = adsk.core.ValueInput.createByReal(partDepth / 2)
distExtentDef = adsk.fusion.DistanceExtentDefinition.create(distVal)
extInput.setOneSideExtent(distExtentDef, adsk.fusion.ExtentDirections.PositiveExtentDirection)

# Create the extrusion.
extrude = 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 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 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 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's API

There are two concepts when customizing Fusion’s user interface: adding buttons to allow the user to run commands and creating custom dialogs for your commands. This topic discusses adding buttons to Fusion’s user interface. The creation and use of command dialogs are discussed separately as part of the discussion on commands.

Whenever you add a button to Fusion’s user interface, you must carefully consider where it will go. There is a limited amount of room, and if every add-in writer puts their command in a permanently visible area, there won’t be room for all the commands. Consider what your command does and where the user would logically look for similar functionality. For example, if a command modifies an existing model, it should probably be added to the MODIFY panel in the Design workspace. If it helps control how the design is viewed, it should probably go in the Navigation toolbar at the bottom of the window. You should only consider adding new tabs or panels if your command does something unique from other Fusion functionality.

When dissecting Fusion’s user interface, it can be broken down into two main topics; structure and contents.

Structure

As shown below, several elements structure how the commands are presented in the user interface. The workspace is shown in blue, the toolbars in red, the toolbar tabs in yellow, and the toolbar panels in green. The toolbar controls represent the buttons in toolbars and panels, which are discussed in the “Contents” section below.

User Interface Elements

Toolbars

A toolbar is a container for controls. A control can be a command button or a drop-down containing more controls, as described below. There are several available toolbars, but three are always displayed. The content of these three is context-independent, so it remains the same regardless of what’s happening in Fusion. Each toolbar and all other user interface elements have unique IDs that you can use to access a specific toolbar.

The toolbar in the upper left is 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”. Finally, the toolbar at the bottom center of the window is the navigation toolbar and has all the view-related commands, and its ID is “NavToolbar”.

All toolbars are accessible from the UserInterface object through its toolbars property, which returns a Toolbars object. When you know a specific toolbar's ID, you can use the itemById property on this object to get it. 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')

Workspace

Workspaces are the top-level owner of the UI structure. The user chooses the active workspace usingWorkspaces are the top-level owners of the UI structure. The user chooses the active workspace using the large drop-down at the upper left of the Fusion window, as shown below. When changing workspaces, the entire UI morphs to show what’s appropriate for the workflow needed by the workspace. For this discussion, we’ll focus on the toolbar tabs and their contents, but changing the workspace can also change the contents of the browser and even the model graphics.

Toolbar Tabs

Each workspace has its own set of toolbar tabs. Toolbar tabs provide a way to organize the commands the workspace needs into logical groups. For example, you have the SOLID, SURFACE, MESH, SHEET METAL, and TOOLS tabs in the Design workspace, and each tab represents a different type of data and workflow. For example, by choosing the SOLID tab, you can access the commands for creating and modifying a solid model. However, only the commands useful when working with a mesh are shown when the MESH tab is selected.

Toolbar Panels

A toolbar tab contains one or more toolbar panels. Toolbar panels organize commands into groups within the toolbar tab. Each toolbar panel consists of two parts: the panel and a drop-down. For example, in the picture below, the ASSEMBLE panel is outlined in red, and its drop-down is outlined in yellow.

The panel shows a subset of the commands in the drop-down and provides easy access to commonly used commands. The user can control which commands from the drop-down are shown in the panel by clicking the More button More Button and checking or unchecking the “Pin to Toolbar” option, as shown below.

There are two ways to access toolbar panels through the API; from the toolbar tab that contains the panel or from a WorkSpace. Panels are guaranteed to be unique within a workspace, so you can access a specific panel if you know the workspace and panel ID. Getting the panel from a toolbar tab is another way to access the same panel.

If you iterate through the toolbar panels in a workspace, you will find the isVisible property for many of them is False, meaning that the panel is not currently visible. When the user selects a different tab, Fusion turns the visibility of toolbar panels on and off, so only those that apply to the active tab are seen.

Contents

We’ve examined the elements that define the structure, and now we’ll examine the content of the toolbars and panels, which are defined using controls.

Controls

Both toolbars and toolbar panels act as containers for toolbar controls. There are four types of controls: command, drop-down, split-button, and separator. In the picture below, all the buttons in the sketch toolbar panel and the associated drop-down menu are command controls, and a command is started when clicked. The Rectangle, Circle, Arc, and Polygon items are drop-down controls because they display a menu when clicked. The line between the “Create Sketch” and “Line” commands is a separator control used to separate and structure a menu's contents visually.

The control below is a split 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 serves as a placeholder within a toolbar, and we see that all of the intelligence (text, icon, tooltip, etc.) comes from an associated command definition. Therefore, every control references a command definition to be able to display itself.

Command Definitions

Command definitions contain all the information defining how a control looks and behaves. A command definition isn’t directly visible but is referenced by a control, which uses the information in the command definition to display itself. Having the command definition separate from the control makes it possible to have the same command in more than one place in the user interface. For example, you can add your command to the DESIGN and MANUFACTURE workspaces. Even when you add your command to a single toolbar panel, there are two controls when the user has pinned the command to the toolbar. 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 when clicked. If you modify a property of the command definition, that change is automatically reflected in all controls referencing that command definition. For example, if the isEnabled property of the command definition is set to False, all controls referencing that command definition will become disabled. Also, when the user clicks any of the controls associated with the command definition, the commandCreated event of the command definition is fired so you can do whatever action the command is supposed to do.

To create a new control, you must first create a command definition. A one-to-one relationship typically exists between a command definition and what the user thinks of as a command. There are three types of command definitions (button, check box, and list), and you choose the type based on how you want the command displayed in the user interface. For example, a button command definition creates 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). It also contains two button commands (Grid Settings and Set Increments).

Check Box Button

The list command definition defines a command displayed as a drop-down with an associated list of checkboxes, radio buttons, or text items. Below is an example of a checkbox list. When “Effects” is clicked, the drop-down is displayed while the user checks and unchecks items in the list. The list remembers any changes, showing 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, then the drop-down is dismissed. As you expect with radio controls, users can only select one item at a time. The list remembers the selected item, so it will show it the next time it is displayed.

Radio Button List

Below is an example of a standard item list consisting of text items. When “Programming Resources” is clicked, the drop-down menu is displayed, and the user can pick a single item from the list, and then the drop-down menu 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.

The API has a single CommandDefinition object type, but each CommandDefinition has an associated ButtonControlDefinition, CheckBoxControlDefinition, or ListControlDefinition object. These three derive from the generic ControlDefinition class. This structure is represented in the object model chart below, along with the Toolbar, Workspace, ToolbarPanel, and 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 commandCreated event of the button definition 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 "DESIGN" workspace.
designWS = ui.workspaces.itemById('FusionSolidEnvironment')

# Get the "ADD-INS" panel from the "DESIGN" workspace.
addInsPanel = designWS.toolbarPanels.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, you’ll add commands when your add-in is loaded, which modifies the Fusion user interface only for the current Fusion session. Fusion does not remember any edits made to the user interface, so everything is restored to its default state the next time Fusion runs, and your add-in will need to re-create its commands each time it starts up. If the user unloads an add-in using the Scripts and Add-Ins command, all of its commands will be displayed for that session but are dead because the add-in is no longer running to handle the commandCreated events. Your add-in must clean up and delete any user interface elements it has created to prevent this. It does this in its stop function, which Fusion calls when the add-in is unloaded. Your add-in should delete both the command definitions and controls.

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 the "DESIGN" workspace.
designWS = ui.workspaces.itemById('FusionSolidEnvironment')

# Get panel the control is in.
addInsPanel = designWS.toolbarPanels.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 the use of icons. In Fusion, an icon is defined using a folder containing all the images for that command. Each icon has a folder of resource images. Icons can be defined using a PNG file (bitmap) or an SVG file (vector). Icons can be displayed in two different sizes: small and large. For example, when a command is added to a toolbar panel running on a standard resolution display, the small icon is shown in the drop-down. However, if the user pins the command to the panel, it will use a large icon. For a standard resolution resolution screen, small icons are 16x16 pixels, and large icons are 32x32 pixels. On a high-resolution screen, small icons are 32x32 pixels, and large icons are 64x64 pixels. When using PNG files, you should provide a PNG file for all three sizes to get the best results. The names of the PNG files are shown below.

  • 16x16.png – A 16x16 pixel image shows the small icon on a standard-resolution display.
  • 32x32.png – A 32x32-pixel image shows the large icon on a standard-resolution display and the small icon on a high-resolution display.
  • 16x16@2x.png - 32x32 pixel image shows the small icon on a high-resolution display.
  • 32x32@2x.png - 64x64 pixel image shows the large icon on a high-resolution display.

For each size, Fusion also supports a disabled version of the image. Typically, it's a gray version of the standard image. Fusion will create one from the standard image if you don't provide one. The images are:

  • 16x16-disabled.png
  • 32x32-disabled.png
  • 16x16@2x-disabled.png
  • 32x32@2x-disabled.png

Finally, Fusion also supports a version of the image that’s used when the command is active. In this case, the button appears depressed, and the background is dark blue. You can create a custom image for this case so that dark colors don’t disappear into the background. Fusion will create one from the standard image if you don't provide one. The images are:

  • 16x16-dark.png
  • 32x32-dark.png
  • 16x16@2x-dark.png
  • 32x32@2x-dark.png

For example, the images used for the Fusion extrude command are below.

Extrude Image Example

SVG files can also be used to define icons. Creating icons using an SVG editor is typically easier than using a bitmap editor. Another significant advantage is that the resolution isn't baked into the icon because an SVG is vector data. However, you can still define different sizes for your icons, which allows you to create a simpler design for the small icon and one with more detail for the large icon. For SVG, only two sizes are needed, and they'll be used to generate the small and large icons. When designing your SVG, the size of the SVG doesn't matter, but the page should be square, or you can get unexpected results. The filenames of the SVG files are shown below.

  • 16x16.svg - The SVG image used to display a small icon.
  • 32x32.svg - The SVG image used to display a large icon.

    • You can also define the other variations of icons with SVG files, as shown below.

  • 16x16-disabled.svg - The SVG image used to display a small disabled icon.
  • 32x32-disabled.svg - The SVG image used to display a large disabled icon.

  • 16x16-dark.svg - The SVG image used to display a small icon on a dark background.
  • 32x32-dark.svg - The SVG image used to display a large icon on a dark background.

If you don’t provide a required image, Fusion will automatically use another size or 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, 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 the resource folder can be defined using a relative or full path. A relative path is relative to the main .py, .dll, or .dylib 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

As you can see from the example above, there is a folder for each command. Each folder contains its own set of icon image files, as described above.

Positioning Your Controls

There are two steps to positioning your command within the Fusion user interface. The first is to determine where you want to add your command. The ideal location is where someone familiar with Fusion would intuitively look for your command. The best approach is to run Fusion and see if you can find any existing commands similar to your command. For example, if your command does something with a sketch, it should be with the other sketch commands. It will help if you are critical about your choice to create a new tab or panels. Creating tabs and panels only makes sense when your functionality is unique from existing commands. This choice is subjective, and you can do anything you choose, but your users will be annoyed if you do something illogical or take up unneeded space.

The second step is the most challenging part of adding a new command to Fusion's user interface. This step is to get the information you need to position the control in the desired location. For example, to create a new control in a panel, you'll need the ID of the workspace that contains the panel, the ID of the panel, and the ID of the command you want your command to be next to.

Let's look at a typical example and the process used to get the information you need. For this example, we want to insert a button for a command called "Custom Pocket". The command creates new geometry in a solid model, so we want to add it to the DESIGN workspace. In addition, because it works on solid models, we want to add it to the CREATE panel on the SOLID tab beneath the "Emboss" command, as shown below.

Adding Buttom Example

To position the button, we need the ID’s of the DESIGN workspace, the CREATE panel, and the "Emboss" command. A complete list of user interface IDs is not published because the user interface is dynamic since add-ins can customize it however they want. Instead, what's provided is a script that creates a report of the current state of the user interface. The script is the Write user interface to a file Sample sample script. To use it, create a new Python script, copy the sample code into the script, and run it. It will read your Fusion user interface layout and export it as an XML file.

You can open the XML file in VS Code or any editor that works with XML files. The file is exported as XML to allow the data to be structured and make it easier to read and manipulate. The file is large, and looking through it for a specific item would be tedious. However, if you take advantage of the XML structure, it becomes much more manageable. If you press Ctrl + K and then Ctrl + 0 (zero), you'll invoke the Fold command to collapse the structure to one visible level. Ctrl + K, Ctrl + J will unfold it, making the entire tree visible. You can also fold to a specific level using Ctrl + K and Ctrl + (number), where (number) defines the number of levels to display. Clicking the > sign to the left of an element will expand the structure below it. The picture below shows the tree fully folded; the middle picture shows it expanded to one level, where we can easily see there are 16 workspaces and 11 toolbars defined. The picture on the right shows the Workspaces node expanded, where we can see all the workspaces' names and IDs. It's now relatively easy to scan this list and find the "Design" workspace where we want to insert the button.

2 Levels of UI Export Shown

Now that we've found the workspace we want to use, we can expand the tree to find the SOLID tab, the CREATE panel, and the Emboss command. The names underlined in yellow are the same as those in the Fusion interface and are what you would use when searching. However, we need the IDs of each of these elements, which are underlined in green.

Expanded UI Structure

The code below adds the command button to the user interface using the IDs underlined above.

# Get the DESIGN workspace.
designWS = ui.workspaces.itemById('FusionSolidEnvironment')

# Get the CREATE panel.
createPanel = designWS.toolbarPanels.itemById('SolidCreatePanel')

# Add a new button after the Emboss control.
buttonControl = createPanel.controls.addCommand(customPocketCmdDef, 'EmbossCmd', False)

You might notice that the code doesn't use the toolbar tab. Because panels are unique within a workspace, having the ID of the workspace and the panel is enough to get the panel. The code below will also work since getting the panel from the tab is possible.

# Get the DESIGN workspace.
designWS = ui.workspaces.itemById('FusionSolidEnvironment')

# Get the SOLID tab.
solidTab = designWS.toolbarTabs.itemById('SolidTab')

# Get the CREATE panel.
createPanel = solidTab.toolbarPanels.itemById('SolidCreatePanel')

# Add a new button after the Emboss control.
buttonControl = createPanel.controls.addCommand(customPocketCmdDef, 'EmbossCmd', False)

Here's another example that adds a command to the QAT toolbar. In this case, we want to insert "My Special File Command" in the file drop-down of the QAT above the "3D Print" command, as shown below.

Expanded UI Structure

To do this, you need the ID of the QAT toolbar, the ID of the File drop-down, and the ID of the "3D print command." Expanding the Toolbars sections of the XML allows you to identify each and find their corresponding ID, as shown below.

Insert Control Example

Knowing the IDs, here's the code that adds the new button.

# Get the QAT toolbar.
qat = ui.toolbars.itemById('QAT')

# Get the drop-down that contains the file-related commands.
fileDropDown = qat.controls.itemById('FileSubMenuCommand')

# Add a new button before the 3D Print control.
buttonControl = fileDropDown.controls.addCommand(myCommandDef, 'ThreeDprintCmdDef', True)


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 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 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\API\Scripts
    • Add-In: %appdata%\Autodesk\Autodesk Fusion\API\AddIns

  • Mac OS:
    • Script: ~/Library/Application Support/Autodesk/Autodesk Fusion/API/Scripts
    • Add-In: ~/Library/Application Support/Autodesk/Autodesk Fusion/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 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, 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, 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 will remember the script or add-in for all subsequent sessions.

Add Script or Add-In


Fusion Custom Graphics

Volumetric Modeling With the API

Creating custom volumetric features is considered an advanced use of the API, and you should have previous experience using the API and creating custom commands.

Table of Contents

Implicit Modeling Overview
Signed Distance Fields
Levelset Functions
Volumetric API Overview
Graphs
Nodes, Properties, and Pins
Connections
Channels
Directed Acyclic Graph (DAG)
Functions
Detailed API Structure
DataTypes
Features and Models
Primary Graph
Cell Graph
Levelset Calculation
ModelToMesh Conversion
Example

What is Implicit Modeling

Implicit modeling is a technique used in computer graphics and computational geometry where shapes and objects are defined using mathematical functions rather than explicit geometric representations. This approach allows for more flexible and powerful manipulations of complex shapes, as it relies on mathematical expressions to describe the surfaces and volumes of objects. Implicit modeling is beneficial in applications such as computer-aided design (CAD), computational fluid dynamics, and medical imaging.

What is a Signed Distance Field

A signed distance field (SDF) is a scalar field that represents the distance from any point in space to the closest surface of an object. The field's value is positive if the point is outside the object, negative if it is inside, and zero on the object's surface. This representation allows for efficient calculations of distances and interactions between objects, making it a key component in implicit modeling. SDFs are used in various applications, including collision detection, path finding, and shape blending.

How is the Boundary of the Geometry Determined (Levelset Calculation)

The boundary of the geometry in implicit modeling is determined through a process called levelset calculation. A levelset is a contour where the implicit function (e.g., the signed distance field) has a constant value. The levelset calculated for any constant value defines an isosurface in 3D space. By identifying the zero levelset, the surface of the object is extracted. This method allows for precise and smooth representations of complex geometries, as it can effectively handle changes in topology and surface details. Levelset calculations are used in various fields such as fluid simulation, shape optimization, and computer graphics.

Volumetric API Overview

The Volumetric API provides an effective way to perform implicit modeling through the concept of graphs. These graphs are composed of nodes and connections, enabling users to define and manipulate complex shapes and geometries efficiently. The graph editing capabilities provided in this API do not have an equivalent User Interface.

Volumetric Object Model

Graphs

Graphs in the API represent the overall structure of the implicit modeling process, comprising multiple nodes and connections that perform mathematical operations and calculations necessary for defining shapes. Each model has two graphs: the PrimaryGraph and the CellGraph, which will be defined later.

Nodes

Nodes are fundamental building blocks of the graph, representing specific mathematical operations or calculations. Nodes have properties, input pins, and output pins:

  • Properties: Inputs to the node set by the user, defining parameters for mathematical operations.

  • Input Pins: Receive information from other nodes.

  • Output Pins: Send information to other nodes.

Connections

Connections link nodes within the graph, providing the path for information to flow throughout the graph. Connections ensure that the data moves from one node to another, enabling the evaluation of complex operations and calculations.

Channels - Nodes

Graph channels are nodes with one input and no output pins, representing pathways through which information flows from the graph, ultimately leading to the volume evaluation.

Directed Acyclic Graphs (DAG)

Graphs created using the API must be Directed Acyclic Graphs (DAG), meaning no path in the graph should create a loop. Ensuring the graph is acyclic prevents infinite loops and ensures a clear, logical flow of information from input to output.

The Volumetric API enables users to construct sophisticated and efficient models for various applications by leveraging nodes, connections, and graph channels. The DAG requirement ensures the modeling process remains well-structured and computationally feasible.

Functions

The API provides several nodes that allow the user to specify ‘functions’ to be evaluated on the Node inputs. These functions are specified as a string property belonging to the Node. There is a specific syntax that must be followed when writing these functions, and the supported operations are detailed below:

  • Predefined Inputs
    The predefined inputs are variables, similar to constants, that change depending on whether your function takes a Scalar, Vector, or Color input:

    • Scalar - 'x' - scalar input

    • Vector - 'x', 'y', and 'z' are the inputs that match the input vector format.

    • Color – No function node has a color input.

  • Predefined Outputs:
    Each of the functions is a scalar function. Therefore, Vector outputs require 3 functions to be defined; color outputs require four functions.

    • Scalar output property name: 'function'.

    • Vector output property names: 'x', 'y', and 'z'.

    • Color output property names: 'r', 'g', 'b', and 'a'.

  • Binary Operators:

    • Addition '+'
       Usage: 'a + b'

    • Subtraction '-'
       Usage: 'a - b'

    • Multiplication '*'
       Usage: 'a * b'

    • Division '/'
       Usage: 'a / b'

    • Exponentiation '^'
       Usage: 'a^b'

    • Modulo 'mod'
       Usage: 'mod(a, b)'

    • Maximum 'max'
       Usage: 'max(a, b)' or 'max(a, b, c)'
       Note: Maximum can have a variable number of inputs

    • Minimum 'min'
       Usage: 'min(a, b)' or 'min(a, b, c)'
       Note: Minimum can have a variable number of inputs

    • Power 'pow'
       Usage: 'pow(a, b)'
       Note: a raised to the power of b

    • Norm 'norm'
       Usage: 'norm(a, b)'

    • Norm Squared 'norm2'
       Usage: 'norm2(a, b)'

    • Clamp 'clamp'
       Usage: 'clamp(value, minimum, maximum)
       Returns: max(b, min(a, c))

    • Select 'select'
       Usage: 'select(value1, value2, outVal1, outVal2)'
       Arguments:
        value1: First value to compare
        value2: Second value to compare
        outVal1: First output value
        outVal2: second output value
       Returns: if a < b ? c else d

  • Unary Operators

    • Floor 'floor'
       Usage: 'floor(a)'

    • Ceil 'ceil'
       Usage: 'ceil(a)'

    • Round 'round'
       Usage: 'round(a)'

    • Sine 'sin'
       Usage: 'sin(a)'

    • Cosine 'cos'
       Usage: 'cos(a)'

    • Tangent 'tan'
       Usage: 'tan(a)'

    • ArcSine 'asin'
       Usage: 'asin(a)'

    • Arccosine 'acos'
       Usage: 'acos(a)'

    • Arctangent 'atan'
       Usage: 'atan(a)'

    • Absolute Value 'abs'
       Usage: 'abs(a)'

    • Logarithm 'log'
       Usage: 'log(a)'

    • Exponential 'exp'
       Usage: 'exp(a)'

    • Square Root 'sqrt'
       Usage: 'sqrt(a)'

    • Arctangent2 'atan2'
       Usage: 'atan2(a, b)'

  • Constants

    • Pi - 'pi'

    • Pi multiplied by 2 - 'pi2'

    • Euler’s Number - 'e'

Detailed API Structure

DataTypes

To ensure maximum flexibility in graph design, pin types are standardized. There are three DataTypes used for graph pins:

  • Scalar: Contains one scalar value, which can be any real number.

  • Vector: Contains three scalar values (x, y, z) defining a position. These values can be any real number.

  • Color: Contains four scalar values (r, g, b, a). Where r is red, g is green, b is blue, and a is alpha or opacity.

Features and Models

Each feature created using the Volumetric API has an associated model. The model is central to defining and manipulating the geometry of the feature. A model is composed of two distinct graphs: the PrimaryGraph and the CellGraph. The CellGraph is a special graph which allows users to define repeating patterns throughout the volume and has valid coordinate inputs between the ranges of 0 and 1 in the x, y, and z dimensions. This provides a hexahedral element which enables one to define a unit cell. This unit cell is then patterned throughout the field. There are two channels in the cell graph, a Lattice Cell, and a Texture Cell. The lattice cell applies throughout the volume whereas the texture cell is only applied to the surface of the boundary.

PrimaryGraph

The PrimaryGraph is the main graph that defines all the elements that do not have repetition and act globally. There are 6 channels in the PrimaryGraph, all of which are Nodes with:

  • BoundarySDF: This channel receives an SDF that defines the limits of the geometry being evaluated. When the SDF of the lattice is evaluated, the maximum of the meso-structure SDF and the boundary SDF serves for limiting the meso-structure to the desired boundary. The BoundarySDF channel has a Scalar input.

  • Color: This channel is used to define the color of the model anywhere within the field. The Color channel has a Color input.

  • LatticeDensity: This channel is used to control the “Density” of the model. It modulates the output distance value of the Lattice Cell Shape, eventually pushing the zero level-set outwards by the density value. This helps to achieve the intended solid density for the meso-structure (see the figure below for an illustration in 2D.)

  • LatticeCoordinates: This channel is used to transform (map) a global coordinate to a Cell coordinate. Applying different types of transformations, scaling, shrinking, twisting and other manipulations of a Lattice will be possible.

  • TextureDensity: This channel is used to define the “Density” of the model as modified by the texture cell. This only affects the field near the Boundary of the volume.

  • TextureCoordinates: This channel is used to translate a global coordinate to a Cell coordinate for scaling shrinking, twisting and other manipulations of a Texture.

CellGraph

The CellGraph is a supplemental graph that defines repeated patterns throughout the volume. There are two outputs which define the shape of the lattice and textures which are then combined with the densities in from the PrimaryGraph.

  • CellLatticeShape: Defines distance value for the lattice shape in cell coordinates from the PrimaryGraph.

  • CellTextureShape: Defines distance value for the texture shape in cell coordinates from the PrimaryGraph.

Volumetric Object Model

Levelset Calculation

The levelset of the Volumetric Model is calculated by combining all of the output channels of the two graphs in a very specific way to create highly customizable geometric outputs. The two contributing cell outputs each follow the same process for their creating their “MesoStructure” value, which is scalar. The Coordinates channel provides a mapping from a global point to a unit cell point which is then wrapped in [0, 1] space and evaluated for the cell shape, which results in a scalar output. After these evaluations We have reduced the outputs to be considered from 8 to 6 by combining the Coordinate and Shape channels. The Lattice or Texture densities are then combined with the Lattice or Texture shapes. Lattices create their MesoStructure by subtracting the Lattice Density from the Lattice Shape, where Textures multiply their Density and Shape. We have now reduced the remaining channels from 6 to 4.

Then the Texture and Lattice MesoStructures are sequentially combined with the BoundarySDF. First the Texture is added to the BoundarySDF, then the maximum of that output and the Lattice is taken. The result is the levelset function. All the channels are used in this workflow except for the color channel which exists and is evaluated independently.

Volumetric Object Model

ModelToMesh Conversion

Implicit models lack explicit edges and faces. The exact geometry is determined at evaluation time, influenced by resolution. Therefore, converting Volumetric Models to Mesh objects is sometimes necessary. The VolumetricModelToMeshFeature facilitates this, closely matching the User Interface with the same parameters. There are many options in this command, but a couple inputs deserve to be highlighted.

Refinement determines how course or fine the resulting mesh will be. The options are Low, Medium, High, or Custom. These settings will keep a similar number of sampled points regardless of the object size and are supposed to reflect the calculation time. If there is a known required resolution, it would be best to use the Custom option to have explicit control over the element size.

The Meshing Approach distinguishes between a traditional “Marching Cubes” meshing approach and a more advanced approach that preserves the sharp features on the boundary of the boundary body. The more advanced approach does require more processing time for mesh generation.

Example Script

You can see this discussion put into practice in the Volumetric Custom Feature Sample.

To show what a user defined graph might look like, a visualization of the graph generated from the Sample Script is shown below. The connections to the input point are implicitly defined for any Node with a vector input that doesn’t have an input connection.

Volumetric Object Model


What's New

What's New For the July 2025 Release

Enhancements

  1. Support for the New Assembly Constraints
    The API has support for the equivalent of the new Constrain Components command which results in the creation of an assembly constraint to control the relationships between occurrences in an assembly. This is provided through the new AssemblyConstraints collection object. The new AssemblyConstraint acts as a group of GeometricRelationship objects. You'll see that it is currently designated as a "preview" feature, and we would appreciate feedback about the new functionality; both the interactive functionality and the API.

  2. API Support for Mesh Modeling
    The API to support the functionality available in the Mesh workspace is supported in this release. It is in preview state, so please try it out and let us know about your successes and any problems or suggestions you might have to make it better. To provide comments, you can create a new topic in the Fusion API and Scripts Forum.

  3. Assembly User Interface Changes
    This release contains a major change to how the assembly functionality is provided in the user interface. However, it's still in a private preview state with the default being the existing user interface. When the user enables the new UI in their preferences they first see the dialog below, and if the user continues, the ASSEMBLE panel will be replaced by a new ASSEMBLY tab. All of the assembly-related functionality will be available in new panels within the new tab. This doesn't change the API, but it does change the layout of the user interface. If you currently add any of your custom commands into the ASSEMBLE panel, you'll need to update your code that adds your buttons to the user interface. There's still nothing you can do yet, but you need to watch for when this becomes available and be ready to make changes to your add-in.

    New Assembly Tab

    The change you'll need is to get the ASSEMBLY toolbar tab and add your command to one of it's panels. You can get this tab using the code below. If the isVisible property is True, it means the user has enabled it. Currently, you can add your command to both the original ASSEMBLE panel and the new ASSEMBLY tab, so no matter which is active the user will have access to your commands. At some point, the ASSEMBLE panel will go away, so you'll want your code to be tolerance of that.

    assemblyTab = ui.allToolbarTabs.itemById('AssemblyTab')

if assemblyTab.isVisible:
    app.log('The new ASSEMBLY tab has been enabled.')
else:
    app.log('The old ASSEMBLE panel is enabled.')

  4. Part Number and Description Changes
    As part of new functionality coming to support collaborative editing some changes have been made to Fusion and the API. The biggest change is that the part number and description properties of the Component object now get and save data on the cloud and not in the design. This change only applies to files that exist within a hub where concurrent editing has been enabled, so the impact is limited. You can check for this by using the new DataHub.isCollaborativeEditingEnabled property.

    When this is enabled, there are two things you'll likely notice. The first is a difference in performance when using the partNumber and description properties of the Component object. This is because getting and setting these values is no longer a local operation but uses the cloud to get and set them.

    Another change is that the cloud data associated with a component, where this data is saved doesn't exist until the document that contains the component has been saved. The bigger change is that the part number and description can no longer be set until the document containing the component has been saved. These properties can't be set until the document is saved because the component and its properties aren't available on the cloud until it has been saved. You can read more about this in the new MFGDM API user manual topic.

  5. Sheet Metal Refactoring
    The API for sheet metal functionality was split between two different header files, Features.h and SheetMetal.h. The sheet metal specific features in Features.h have been moved to SheetMetal.h. Any existing C++ programs that used any of these features will need to reference SheetMetal.h and be recompiled. It was determined the impact of this change would be very minor because of the limited support of sheet metal features. This will provide a more logical organization for the future as more API support for sheet metal features is added.

  6. Selection Support of Custom Graphics Groups
    A limitation with custom graphics was recently discovered. The problem is that when you set custom graphics to be selectable, the individual graphic entities can be selected, but not the group that owns them. The idea of a graphics group is to create more complex objects by combining many different primitive entities. For example, you might create a triad using multiple solid primitives and some text. It would be desirable to have the entire triad selected and not the individual entities that make it up. To support this a new isChildrenSelectable property is available on the GraphicsGroup object. When a new group is created, this default to true, indicating the entities within the group are selectable. However, when set to false, the entire group will be selected as a single object.

  7. Arrange Feature Statistics
    The statistics about an arrangement are now available through the API by using the new arrangeStatistics property on the ArrangeFeature object.

  8. More Enhancements to Volumetric Modeling
    The API for volumetric modeling was introduced in the last release. This has been enhanced with a couple of new capabilities in this release. The Graph object now supports the canEvaluateGraph property and the GraphNode Object has the hasValidProperties property. In addition, the BeamNetwork object has been added which is accessed through the GeometryGraphNodeProperty.beamNetwork property

CAM API Changes

  1. API support for machine tool stations is now available through the MachineToolStationInput and MachineToolStation objects.

  2. API support for the post processing machine element is now available through the newPostProcessingMachineElement object.

  3. The tool change position can now set and modifed when creating and working with existing linear and rotary machine axes. Power, peak torque, and peak torque speed can also be set and modified for machine spindles.

Fixes

  1. A problem was reported with the PhysicalProperties.getPrincipalMomentsOfInertia method where the result was returned relative to the base coordinate system. This has been corrected so it is now returned relative to the principal axes.

  2. We had a report where the planarEntity property of a ConstructionPlaneTangentDefinition was failing instead of returning the entity the tangent plane is based on. This is now fixed.

  3. shubham.shinde54DT9 reported a problem on the forum when working with TextBoxCommandInput objects within a TableCommandInput. This has been fixed.

Custom Features

Custom Features is a new functionality that is currently in a preview state. This release has nothing new for custom features, but you're still encouraged to try it and let us know your thoughts. You can learn more about it in the Custom Feature topic in the API User Manual. There are also two add-in samples referenced in that document you can use to see the functionality.

This functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Custom Features pinned topic in the Fusion 360 API and Scripts forum. However, because this previews future functionality, it may change, breaking any existing programs that use it. Because of that, you should never deliver programs that use any preview capabilities.

New Objects

Name | Description
AssemblyConstraint | Represents an assembly constraint.
AssemblyConstraintInput | Defines all of the information required to create a new assembly constraint. This object provides equivalent functionality to the Assembly Relationships command dialog in that it gathers the required information to create an assembly constraint.
AssemblyConstraints | The collection of assembly constraints in this component. This provides access to all existing assembly constraints and supports the ability to create new assembly constraints.
BeamNetwork | A geometry reference property that defines a BeamNetwork object which is commonly used in discrete lattice structures.
GeometricRelationship | This object represents a pair of entity inputs that are used when inferring a joint from geometry or for an assembly constraint.
GeometricRelationships | This object represents a set of geometry relationships. They are used when creating a new inferred joint or assembly constraint and querying an existing one.
MachineToolStation | Object representing a tool station on the machine
MachineToolStationInput | Object representing the set of inputs required to create a new MachineToolStation.
MeshConvertFeature | Object that represents an existing mesh convert feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
MeshConvertFeatureInput | This class defines the methods and properties that pertain to the definition of a mesh convert feature.
MeshConvertFeatures | Collection that provides access to all of the existing mesh convert features in a component and supports the ability to create new mesh Convert features.
MeshReverseNormalFeature | Object that represents an existing MeshReverseNormal feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
MeshReverseNormalFeatureInput | This class defines the methods and properties that pertain to the definition of a MeshReverseNormal feature.
MeshReverseNormalFeatures | Collection that provides access to all of the existing MeshReverseNormal features in a component and supports the ability to create new MeshReverseNormal features.
MeshSeparateFeature | Object that represents an existing MeshSeparate feature in a design. To change the properties of this feature, you need to position the timeline marker to immediately before this feature. This can be accomplished using the following code: thisFeature.timelineObject.rollTo(True)
MeshSeparateFeatureInput | This class defines the methods and properties that pertain to the definition of a MeshSeparate feature.
MeshSeparateFeatures | Collection that provides access to all of the existing MeshSeparate features in a component and supports the ability to create new MeshSeparate features.
MFGDMDataEvent | A MFGDMDataEvent represents an event related to the state of the MFGDM data structure.
MFGDMDataEventArgs | The MFGDMDataEventArgs provides information associated with the MFGDM event.
MFGDMDataEventHandler | The MFGDMDataEventHandler is a client implemented class that can be added as a handler to a MFGDMDataEvent.
PostProcessingMachineElement | Machine element representing the post processor and post properties.

New Methods, Properties and Events

Name | Description
Application.mfgdmDataReady | The mfgdmDataReady event fires when the MFGDM data structure for a document has been updated and properties to IDs and structure from the data model is ready.
ArrangeFeature.arrangeStatistics | Returns statistics about the arrangement in JSON format as a string. Each item in the JSON is identified with its English name, and the current localized name is also provided. The values follow the API rules, where all length values are in centimeters, and areas are in square centimeters. The returned JSON may include additional values in the future, so code consuming this output should be tolerant of new fields.
Component.allAssemblyConstraints | Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, when manipulating an assembly.
Component.assemblyConstraints | Returns the collection of assembly constraints associated with this component.
Component.mfgdmModelId | Returns the MFGDM model ID for this component.
CustomGraphicsGroup.isChildrenSelectable | Defines if the child custom graphic entities are selectable or if the entire group is selected in the UI. By default this is true. If false, the isSelectable property defines if this group is selectable. If true, the isSelectable property of each child entity defines if it is selectable.
DataComponent.component | Get the fusion.Component that corresponds to this data component.
DataComponent.mfgdmModelId | Get the MFGDM model Id.
DataComponent.timestamp | Get the resolution timestamp.
DataHub.isCollaborativeEditingEnabled | Returns true if Concurrent Editing is enabled.
DataHub.mfgdmId | Get the MFGDM ID for this hub.
DataHub.version | Returns the version of the hub.
Design.rootDataComponent | Get the root DataComponent in this design. This is only available for top level designs.
FlatPatternComponent.allAssemblyConstraints | Returns all assembly constraints in this component and any sub components. The assembly constraints 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 flattens the assembly structure, including joints, when manipulating an assembly.
FlatPatternComponent.assemblyConstraints | Returns the collection of assembly constraints associated with this component.
FlatPatternComponent.mfgdmModelId | Returns the MFGDM model ID for this component.
FlatPatternProduct.rootDataComponent | Get the root DataComponent in this design. This is only available for top level designs.
GeometryGraphNodeProperty.beamNetwork | Set the value of the property. The value should be a BeamNetwork object, which defines the geometry by defining vertices, beams and radii of the beams.
Graph.canEvaluateGraph | Check if all the channels in the graph can be evaluated and in a good state.
GraphNode.hasValidProperties | Check if the graph node properties are valid.
Joint.geometricRelationships | Returns the set of geometric relationships that were used to infer this joint. This property is only valid when the jointType property returns InferredJointType. Otherwise, it returns null.
LinearMachineAxis.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.
LinearMachineAxisInput.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.
Machine.hasSimulationModel | Returns true if the machine has a simulation model attached.
MachineAxis.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.
MachineAxisInput.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.
MachinePart.toolStation | Get the tool station object for this part. Will return null if the part has no tool station assigned.
MachinePartInput.createToolStationInput | Creates a new MachineToolStationInput object to be used to create a new MachineToolStation.
MachinePartInput.toolStationInput | Gets or sets an tool station input object to create a new MachineToolStation with this part. Only valid when partType is not Axis.
MachineSpindle.peakTorque | Specifies the peak torque (Nm) for this spindle.
MachineSpindle.peakTorqueSpeed | Specifies the speed (rpm) at which this spindle reaches peak torque (Nm).
MachineSpindle.power | Specifies the power (kW) for this spindle.
MachineSpindleInput.peakTorque | Specifies the peak torque for this spindle.
MachineSpindleInput.peakTorqueSpeed | Specifies the peak torque speed for this spindle.
MachineSpindleInput.power | Specifies the power for this spindle.
MeshBody.copy | Copies the mesh body to the clipboard.
MeshBody.copyToComponent | Creates a copy of this mesh body into the specified target.
MeshBody.cut | Cuts the mesh body to the clipboard.
MeshBody.moveToComponent | Moves this mesh body from it's current component into the root component or the component owned by the specified occurrence.
Occurrence.dataComponent | Gets the DataComponent for the target component in the source component's document. This only applies for Occurrence's with an assembly context whose source component is a top level opened design.
RotaryMachineAxis.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes. Will return NaN if tool change position isn't set.
RotaryMachineAxisInput.toolChangePosition | Specifies the value that this axis returns to, prior to a tool change. Units are cm for linear axes or radians for rotary axes.
WorkingModel.rootDataComponent | Get the root DataComponent in this design. This is only available for top level designs.

Help created: Monday, July 14, 2025 8:23 PM


Creating a Script or Add-In

Creating a Script or Add-In Using the Old Dialog

Creating, Editing, and Running Your First Script

Technically, there is not much difference between a script and an add-in. The process of creating, editing, 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, edit, and run a Python script or add-in. The process is very similar for creating a C++ script or add-in.

  1. Run the Scripts and Add-Ins command from the UTILITIES 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.

  4. Now you have a script and will see it in the list of programs in the "Scripts" tab. To edit it, select it and click the "Edit" button, as shown below.

    5. For Python programs, Fusion uses Visual Studio Code (VS Code) as the development environment. If it is not already installed when you try to edit or debug, Fusion will display the dialog below to install VS Code. You only need to do this the first time you edit any script or add-in. When VS Code finishes installing, do the Edit step again to open the script in VS Code.

    The first time you run VS Code from Fusion, you will see a window pop-up saying an extension is being installed. Fusion is installing the Python extension for VS Code. This also only needs to be done once. Finally, once everything is installed VS Code will open, as shown below.

  5. You can now use VS Code to edit your program. For this simple example, edit the text for the messageBox to any message you would like, such as shown below, and save the changes.

  6. Congratulations, you have just written your first script. To run your script, run the Scripts and Add-Ins command, choose your script from the list, and then click “Run” as shown below.

    The script will run and do whatever it is programmed to do. In this case it will display the message box shown below.

  7. The most important feature of a development environment is the ability to debug your program. Debugging is very different between Python and C++. You can learn about debugging your Python and C++ programs in the language specific topics.

Script and Add-In Details

Now that you have 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 or edit it. The "Debug" option in the drop-down under the "Run" button does the same thing as "Edit" so there's no reason to use 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 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 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, for example, “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 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 in that folder. The default locations for add-ins and scripts are shown below, but you can edit the default path in the "General" -> "API section" in the Preferences command to point to any location you want.

    Add-Ins
    Windows – %appdata%\Autodesk\Autodesk Fusion\API\AddIns
    Mac – $HOME/Library/Application Support/Autodesk/Autodesk Fusion/API/AddIns
    Scripts
    Windows – %appdata%\Autodesk\Autodesk Fusion\API\Scripts
    Mac – $HOME/Library/Application Support/Autodesk/Autodesk Fusion/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 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 green “+” icon near the top of 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 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/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 uses to determine 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 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 does not have a specific description. The other properties define the text to use for the other languages supported by Fusion, using industry standard language codes.

    "Description":{
               "":"Default description",
               "1028": "說明在中國",
               "1031": "Beschreibung auf Deutsch",
               "1033": "Description in English",
               "1034": "Descripción en Español",
               "1036": "Description en Français",
               "1040": "Descrizione in Italiano",
               "1041": "日本語での説明",
               "1042": "한국어 설명"
}

  • 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 when Fusion 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 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 separately for each platform so it is 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 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 is 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, except for 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 will automatically call the run function when the script is executed. Fusion also passes in information through the “context” argument as to whether the script is being run at Fusion 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 session and never at startup. The run function is the entry point into your script and once it is complete, the script is finished and Fusion unloads it.

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 a minimal add-in. Notice that it is exactly the same as a new script except that it also contains a “stop” function. When you create a new Python add-in using the Scripts and Add-Ins command, it creates much more than this to help you get started. You can read more about it in the Python Add-in Template topic.

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 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 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 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 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 are 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 is done.

An add-in is typically automatically loaded by Fusion when Fusion starts up. An add-in also usually creates one or more custom commands and adds them to the user interface during start up. The add-in continues to run throughout the Fusion session so it can react whenever any of its commands are executed by the user. The add-in remains running until Fusion 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 API is not any different from a script. It is 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 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 starts up so they are always available to the user and appear as a standard Fusion 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 detailed 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.

Managing Scripts and Add-Ins

Contents

  • Managing, Running, and Creating Scripts and Add-Ins Using the New Dialog
  • Working with Installed Scripts and Add-Ins
    • Filtering the List of Displayed Scripts and Add-Ins
    • Installing, Linking, and Removing Scripts and Add-Ins
      • Default Folders for Scripts and Add-Ins
      • User Defined Folder for Scripts and Add-Ins
      • Linking Scripts and Add-Ins
      • Uninstalling Scripts and Add-Ins
    • Running Scripts and Add-Ins
  • Creating, Editing, and Running Your First Script
  • Script and Add-In Details
    • Script and Add-In Files
      • The Manifest File
      • Script Code
      • Add-In Code
  • Scripts vs. Add-Ins
  • Editing and Debugging
  • Known Issues

Managing, Running, and Creating Scripts and Add-Ins Using the New Dialog

This release makes the new dialog for the "Scripts and Add-Ins" command the default dialog. Most of the known issues have been addressed, with a couple of other fixes coming in the next release. If, for some reason, you need to use the old dialog there is now a preference setting to switch back. If you're doing this, please let us know in the forum why would prefer the old dialog.

New Scripts Dialog Preference

Working with Installed Scripts and Add-Ins

The purpose of the Scripts and Add-Ins dialog is to provide the needed functionality to manage your scripts and add-ins. It provides the following capabilities:

  • List all the currently available scripts and add-ins and show additional related information.
  • Search and filter that list in different ways.
  • Run a script.
  • Start an add-in, see if an add-in is running, and stop a running add-in.
  • Specify if an add-in should start running automatically when Fusion starts.
  • See where a script or add-in is located on your machine and open a new File Explorer or Finder window in that folder.
  • Create new scripts and add-ins.
  • Create links to scripts and add-ins that exist anywhere on your computer.

Below is the Scripts and Add-Ins dialog with the three main sections highlighted. The section to the left provides the various filters to control which scripts and add-ins are displayed. The center section displays the list of scripts and add-ins. The section on the right displays detailed information for the selected script or add-in. Each of these is described in more detail below.

New Scripts Dialog

Filtering the List of Scripts and Add-Ins

The left side of the Scripts and Add-Ins dialog provides different filters for controlling what's displayed in the list in the center section of the dialog. If "Favorites" is selected, only scripts or add-ins that have been marked as a favorite will be displayed and the selected filters are applied to further filter the list. Clicking "Favorites again will show all scripts that meet the current filters. Clicking "All scripts and add-ins" clears all filters and "Favorites", so all scripts and add-ins will be displayed.

Selecting a filter displays the scripts and add-ins with that attribute. For example, if you select "Add-ins", only add-ins will be displayed, and then if you select "Running", it will combine the filters so only the currently running add-ins will be displayed. Any number of filters can be selected at once. You can deselect individual filters to remove that filter.

A powerful filtering feature is an ability to identify any script or add-in as a "Favorite". You can set a script or add-in to be a favorite by using its context menu or by clicking on the star beside its name in the right-hand section of the dialog, as shown below. Clicking the "Favorites" option at the top of the "Browse" section on the left panel will display your favorite scripts and add-ins. You can select other filters to filter the list of favorites further.

Add as Favorite Script or Add-In

Selecting a script or add-in in the list of scripts and add-ins will display its details in the right-hand section of the dialog. In this dialog section, you can view current state information and perform various operations for the selected script or add-in using the associated context menu, as shown below.

List of Scripts Functionality

The first column displays the script or add-in's name. The second column indicates its current running state. From this, you can also infer whether the item is a script or an add-in. The four possible icons are shown below.

  • - Indicates a script that is not running. Clicking this icon will run the script.
  • - Indicates a script that is currently running. It is rare to see this state because scripts typically run and end. However, creating a script that doesn't end automatically when the run function finishes is possible.
  • - Indicates an add-in that is currently not running. Clicking this icon will start the add-in.
  • - Indicates an add-in that is running. Clicking this icon will stop the add-in.

The third column indicates if the add-in is set to run automatically on start-up. If this is checked, the add-in will be automatically started by Fusion when Fusion starts and will remain running for the entire session or until you manually stop it. This setting is only available for add-ins. The fourth column shows the version of the add-in

The fourth column shows the version of the add-in.

A small toolbar with several commands is at the top of the list section. The button on the left displays a pop-up menu where you can go to the Autodesk App Store, add a local script or add-in to the list (linking), or create a new script or add-in. Linking and creation are discussed in more detail below. The command with the pencil icon will open the code editor for the currently selected script or add-in to allow you to edit and debug the script or add-in. The command with the folder icon will open the folder where the script or add-in is located using Window's File Explorer or Mac's Finder. The command with the broken paper clip will unlink a linked script or add-in.

Scripts Dialog Toolbar

Installing, Linking, and Removing Scripts and Add-Ins

An "installed" script or add-in is one that exists locally on your computer and that Fusion is aware of. A script or add-in is a folder that contains the code and other associated files, like icon files. Fusion automatically searches several directories on your machine for scripts and add-ins.

Default Folders for Scripts and Add-Ins

Several default folders are always searched for scripts and add-ins when Fusion starts. These folders are listed below.

  • The default path when creating new scripts. As described below, the default path can be redefined by setting a user preference. However, even if the default path is changed, this path is still searched.
    Windows - C:\Users\<userName>\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\Scripts
    Mac - ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts

  • The default path when creating new add-ins. As described below, the default path can be redefined by setting a user preference. However, it is still searched even if the default path has changed.
    Windows - C:\Users\<userName>\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\AddIns
    Mac - ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns

  • This is the location where apps downloaded from the Autodesk App Store are installed. It is a shared location where apps for all Autodesk applications, not just Fusion apps, are installed. The folder structure of apps in this location is different. Each add-in is in a .bundle folder. Even though this location is intended for Autodesk App Store apps, other applications sometimes also install in it. Still, they have to follow the rules for having the .bundle folder and a PackageContents.xml file that identifies it as a Fusion app.
    Windows - C:\Users\<userName>\AppData\Roaming\Autodesk\ApplicationPlugins<
    Mac - ~/Library/Application Support/Autodesk/ApplicationPlugins

  • The location is intended for apps to be installed that are not from the Autodesk App Store. Apps in this location are Fusion-specific and follow the standard folder structure, with each add-in in a folder with the same name as the add-in. You DO NOT need to use a .bundle folder for this location.
    Windows - C:\Users\<userName>\AppData\Roaming\Autodesk\FusionAddinscode>
    Mac - ~/Library/Application Support/Autodesk/FusionAddins

User Defined Folder for Scripts and Add-Ins

A user preference defines the path when creating a new script or add-in. The default path is shown above, but you can set this to any location using the preference shown below. Fusion will search for scripts and add-ins in this defined path in the "Scripts" and "AddIns" folders. If you change this path from the default, Fusion will continue to search the default location.

Preference Default Path

Linking Scripts and Add-Ins

Fusion also supports using a script or add-in that can exist anywhere on your computer. This is done by adding a "link" to the script or add-in folder. You create a link using the "Script or add-in from device" option in the drop-down of the "+" plus command at the top of the list section, as shown below. When running the command, you can browse for any script or add-in folder on your computer. Fusion will remember it and add it to the list of scripts and add-ins. When a linked script or add-in is selected in the list, you can use the "Unlink" command at the top of the list section of the dialog to remove the script or add-in from the list and have Fusion forget about it. Unlinking does NOT delete the folder but only causes Fusion to forget about the script or add-in.

Scripts Dialog Toolbar

Uninstalling Scripts and Add-Ins

To permanently remove a script or add-in, delete it from your computer. If it was installed on Windows using an installer, it's best to uninstall it using the uninstaller, if it has one. The installed app will often be in the Start menu where you will find a command to uninstall it or right-clicking on the app will show an "Uninstall" command. You can also use the "App and Features" tool in Window 10 or the "Installed Apps" in Windows 11 where the installed apps should be listed and you can choose to uninstall it.If an installer was not used, or you're using a Mac, you can delete the folder containing the add-in by browsing to it using Window's File Explorer or Mac's Finder and deleting or moving it to the trash.

To determine the location of a script or add-in, select it in the list and it's path is shown in the right-hand section of the dialog with other details about the selected script or add-in. You can also click the "Open File Location" link to open that folder in Window's File Explorer or Mac's Finder.

Find path of script or add-in.

Running Scripts and Add-Ins

Through the "Scripts and Add-Ins" dialog, you can see your existing scripts and add-ins and run them. You do this by finding the script or add-in in the list and clicking either the [image] or [image] icon beside it in the "Run" column. When running a script, the Scripts and Add-Ins dialog is immediately dismissed so the script can perform whatever action it does. When starting an add-in, the dialog remains open so you can continue to start other add-ins if desired.

Creating, Editing, and Running Your First Script

Technically, there is not much difference between a script and an add-in. Creating, editing, and debugging them are mostly the same, so the description below applies to both. Before getting into the details, here are the basic steps to create, edit, and run a Python script or add-in. The process is very similar when creating a C++ script or add-in.

  1. Run the Scripts and Add-Ins command from the UTILITIES tab in the toolbar, as shown below.

  2. In the Scripts and Add-Ins dialog, click the “+” near the top of the dialog, and then choose "Create script or add-in" from the drop-down list, as shown below.

  3. In the “New App” dialog, make sure “Script” and “Python” are selected. Enter a name for the script name, and optionally enter the “Description”, and “Author” fields and then click “Create”. This will take you back to the “Scripts and Add-Ins” dialog.

  4. The new script will now be shown in the list. To edit it, use the "Edit in code editor" command from the toolbar at the top of the list section or the context menu, as shown below.

    5. For Python programs, Fusion uses Visual Studio Code (VS Code) as the development environment. If it is not already installed when you try to edit or debug, Fusion will display the dialog below to install VS Code. You only need to do this the first time you edit any script or add-in. When VS Code finishes installing, do the Edit step again to open the script in VS Code.

    The first time you run VS Code from Fusion, you will see a window pop-up saying an extension is being installed. Fusion is installing the Python extension for VS Code. This also only needs to be done once. Finally, once everything is installed VS Code will open, as shown below.

  5. You can now use VS Code to edit your program. For this simple example, edit the text for the messageBox to any message you would like, such as what's shown below, and save the changes.

  6. Congratulations, you have just written your first script. To run your script, run the Scripts and Add-Ins command, find your script in the list, and click the [image] icon beside it.

    The script will run and do whatever it is programmed to do. In this case it will display the message box shown below.

  7. A development environment provides two important capabilities; code hints as you write your code to speed up development and reduce mistakes and the ability to debug your program. Debugging is very different between Python and C++. You can learn about debugging your Python and C++ programs in the language specific topics.

Script and Add-In Details

Now that you have 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 lists all known scripts and add-ins. From the list you can select a script or add-in and run or edit it.

When creating a new script or add-in, the “New App” dialog is displayed where you enter information about the script or add-in you want to create.

Create New Script or Add-In

The various settings in the dialog are described below.

  • Create a new – Choose whether you want to create a 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 will also be used to name the script or add-in code files.

  • Description – An optional description of the script or add-in. The description is shown in the properties section of the "Scripts and Add-Ins" dialog.

  • Author – You can optionally specify the author's name. The author is shown in the properties section of the "Scripts and Add-Ins" dialog.

  • Programming Language – Choose whether you want to create a Python or C++ 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 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 starts.

  • 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 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 in that folder. By default, this uses the default location as described earlier. You can also browse to any folder, and the script or add-in will be created there, and a link will be created so Fusion will remember it and display it in the dialog.

    Scripts and add-ins can exist at any location on the machine, but it's only in the locations listed above where Fusion automatically searches for add-ins when it starts up. A script or add-in in any other location must be explicitly located using the green "+" icon near the top of 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 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 are created in that folder. In addition to the code files, a couple of other files are created; 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/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 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 uses to determine 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":	"Fusion",
    "type":	"addin",
    "id":	"",
    "author":	"Roger Rabbit",
    "description":	{
        "":	"This is my first add-in"
    },
    "version":	"",
    "runOnStartup":	true,
    "supportedOS":	"windows|mac",
    "editEnabled":	true,
    "iconFilename":	"AddInIcon.svg"
}

Below is a description of each of the items in the manifest.

  • autodeskProduct – This property will always have the value “Fusion”.
  • type – This property can be “addin” or “script” to indicate if this program is an add-in or script.
  • id – This property is not used and can be left empty.
  • 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 add-in's description. Using the JSON format, it is defined as an object with one or more properties so that you can specify descriptions for more than one language. The example below has one property with an empty name, which is the default description and will be used for any language without a specific description. The other properties define the text for the other languages supported by Fusion using Microsoft-defined language codes.

    "Description":{
               "":"Default description",
               "1028": "說明在中國",
               "1031": "Beschreibung auf Deutsch",
               "1033": "Description in English",
               "1034": "Descripción en Español",
               "1036": "Description en Français",
               "1040": "Descrizione in Italiano",
               "1041": "日本語での説明",
               "1042": "한국어 설명"
}

    • Below is a list of the language codes for the languages supported by Fusion.

    2052 : Peoples Republic of China Chinese
    1028 : Taiwan Chinese
    1029 : Czech
    1033 : English
    1036 : French
    1031 : German
    1038 : Hungarian
    1040 : Italian
    1041 : Japanese
    1042 : Korean
    1045 : Polish
    1046 : Brazilian Portuguese
    1049 : Russian
    1034 : Spanish
    1055 : Turkish

  • 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 Fusion should automatically start this add-in when Fusion is started. By default, this is false, which is the desired setting when writing and debugging your code. However, once developed, this value is typically true.
  • 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 when an add-in uses OS-specific libraries so that 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 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 separately for each platform, so they may more likely 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 opens the associated project file using the application 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 is defined within Windows as the associated application for .vcxproj files. You can use any code editor you want by changing this file or the application associated with that file type on your computer.

        "sourcewindows":	"NewCPPTest.vcxproj",
    "sourcemac":	"NewCPPTest.xcodeproj"

Notice that, except for the sourcewindows and sourcemac properties, the script or add-in's name is not specified in the manifest file. The name is defined by the name used for the main directory. The primary source file, and the manifest file also have this name. 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 automatically written when a new Python script is created. Notice the "run" function, which Fusion calls when executing the script. Fusion also passes in information through the "context" argument as to whether the script is being run at Fusion startup or is being loaded during a session. The context can be ignored for a script because it is always run during a Fusion session and never at startup. The run function is the entry point into your script, and once it is complete, the script is finished, and Fusion unloads it.

"""This file acts as the main module for this script."""

import traceback
import adsk.core
import adsk.fusion
# import adsk.cam

# Initialize the global variables for the Application and UserInterface objects.
app = adsk.core.Application.get()
ui  = app.userInterface

def run(_context: str):
    """This function is called by Fusion when the script is run."""

    try:
        # Your code goes here.
        ui.messageBox(f'"{app.activeDocument.name}" is the active document.')
    except:  #pylint:disable=bare-except
        # Write the error message to the TEXT COMMANDS window.
        app.log(f'Failed:\n{traceback.format_exc()}')

Add-In Code

The code below is a minimal add-in. Notice that it is the same as a new script except that it also contains a "stop" function. This code differs from what is created when you create a new Python add-in using the "Scripts and Add-Ins" command. That add-in has much more structure to support an add-in that supports different types of commands. You can read more about it in the topic in the API User's Manual.

"""This file acts as the main module for this add-in."""

import traceback
import adsk.core
import adsk.fusion
# import adsk.cam

# Initialize the global variables for the Application and UserInterface objects.
app = adsk.core.Application.get()
ui  = app.userInterface

def run(_context: str):
    """This function is called by Fusion when the add-in is run."""

    try:
        # Your code goes here.
        ui.messageBox(f'"{app.activeDocument.name}" is the active document.')
    except:  #pylint:disable=bare-except
        # Write the error message to the TEXT COMMANDS window.
        app.log(f'Failed to run add-in:\n{traceback.format_exc()}')

def stop(context):
    """This function is called by Fusion when the add-in is terminated."""

    try:
        ui.messageBox('Stopping the add-in')

    except:  #pylint:disable=bare-except
        # Write the error message to the TEXT COMMANDS window.
        app.log(f'Failed to stop add-in:\n{traceback.format_exc()}')

The “stop” function is called by Fusion whenever the add-in is 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 is shutting down and all add-ins are stopped. The stop function is where the add-in can perform any needed cleanup, like removing any user-interface elements that it created.

Both the run and the stop functions have a single argument called “context” 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 as a Dictionary object, and C++ passes it 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 of automatic loading during Fusion 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 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 are executed and their lifetime. The user executes a script through the “Scripts and Add-Ins” command, and the execution stops immediately after the run function is complete. A script runs, and then it is done.

An add-in is typically automatically loaded by Fusion when Fusion starts up. An add-in also usually creates one or more custom commands and adds them to the user interface during startup. The add-in continues to run throughout the Fusion session, so it can react whenever the user executes any of its commands. The add-in remains running until Fusion 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 API is not any different from a script. It is the same API, and none of the API calls are limited to scripts or add-ins. However, there are a few areas of the API that are more useful to an add-in than a script. The first is the portion that deals with working with the Fusion 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 starts up, so they are always available to the user and appear as a standard Fusion 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. Commands are not limited to add-ins, and there are sometimes reasons to use the command functionality within a script, but they are typically used and make more sense within an add-in. This is described in the Commands topic.

A third area of the API that is useful for add-ins is events. Various events can be subscribed to, and then Fusion will fire the event when a specific action occurs within Fusion. Because the program needs to be running to receive the event, add-ins are the logical choice since they run throughout the Fusion session.

Editing and Debugging

For more detailed information about editing and debugging your scripts and add-ins, see the language-specific topics (Python or C++) . The process is different depending on which programming language you're using.

Known Issues

Here's a list of known issues that couldn't be addressed in time for this release but will be in the next release.

  • Sorting the list of names should not be case sensitive.